OnChange in htmlb:inputField
Hi,
I have 2 input fields with type DATE. When I change a second one I need to re-load a page again to :
1] Check a second value is greater than first value
2] Fill tabView with a some values.
I haven't found a on-change event for inputField.
Any proposed solutions ?
Thank you.
Marian
Hi,
thanks for your replies.
All of your answers are very helpfull and I learned from them a lot.
But unfortunatelly my problem is this : I have inputField with type "DATE" and showHelp="True" in my form.
When I enter a date manually I submit a form for a next processing by JavaScript. Thats OK. But when I choose a date from "dateNavigator" a value is changed but no event generated.
So I tried to hang up an event handler to next field in my form : "dropdownListBox-onClientSelect". A javascript function assigned to this event is not run and when I define onSelect event handled then "server side event" is triggered, but not client side Javascript.
My questions are:
1) is here any possibility how to react to date selection for inputField in dateNavigator help (javascript or server side)
2) what can be a reason of a not triggered javascript function for dropdownListBox defined as onClientSelect parameter ?
Thank you for your answer.
I would like to mark your answers as a "very helpfull" but this radiobutton is dissabled so I can mark it as helpfull answer.
Thanks again.
Marian
Similar Messages
-
HTMLb InputField ValueHelpContext
Hi,
Does anybody know how to use the ValueHelpContext (com.sapportals.htmlb.valuehelp.ValueHelpContext) related to an HTMLb InputField? I cannot find any documentation.
I like to develop an InputField for a material number with some kind of popup value help where a user can search a material by name.
Thanks in advance!
Best regards,
EricHi, have you done it?
-
Getting onchange event for inputfield
Hi all,
How can I get onChange() event for inputfield in webdynpro
and how can i use that.
Thanks
FahadHi anil,
In my application, I am having one inputfield and a dropdown.As per the input field entry, I have to load values in dropdown even if the end user is using Tab button or mouse for changing the focus.
How can I do that? -
Style in HTMLB:INPUTFIELD
Hello All,
We are using HTMLB:INPUTFIELD to display dates in our BSP. In some cases it is required to display the date n display mode, for that we have set the attribute Disabled.
However in this case we get a background couloyr as blue as well as a box (which is in change mode as well). We do not want the box as well as the color to be displayed in case th field is in display mode.
We observed that there is an attribute called as style available, however even this didnt work.
Request for your help.
Thanks,
DevendraDear Davendra,
You can achieve this requirement. You can set a flag or you can use the disabled flag itself.
If the flag is set as disabled u can color the inputfield. Or else no need to call the coloring option.
Have a look on the following code snippet,
if val EQ '1'.
lv_disable = 'TRUE'.
else.
lv_disable = 'FALSE'.
endif.
<htmlb:label id = "l1"
text = "Label Text"
for = "inp1" />
<htmlb:inputField id = "inp1"
value = "Test"
width = "280"
maxlength = "50"
type = "STRING"
disabled = "<%= lv_disable%>"/>
<%IF lv_disable EQ 'TRUE'. %>
<s cript language="JavaScript">
set_textcolor("inp1","yellow");
</s cript>
<%ENDIF.%>
Here for eg i check with val is 1. you check your criteria.
Hope this will Helpful.
Regards,
AnitaVihi Arasi B -
How to fire an onblur event for htmlb:inputfield ?
Hi All,
I have a problem in creating in ONBLUR..for input field.
What i want is when i give input to the input it goes to DB and retriving some data and visible to next Dropdown.
For this if i give input to input field and press any key then it will goes to db and getting data.
I am stricking over here .
Please guide me for this.
Thanks
Nageswara.so what you need is a javscript function to get triggered onblur event and it should generate server event.
check out the following code sample.
<htmlb:inputField id = "test"
alignment = "LEFT"
size = "10"
type = "STRING" />
<bsp:htmlbEvent id = "myid"
onClick = "myonclick"
name = "ValueChanged" />
<script for="test" event=onblur type="text/javascript">
ValueChanged();
</SCRIPT>
Regards
Raja -
How to handle htmlb:inputField submitOnEnter
Hi Friends,
Iam using submitOnEnter = "true" in <htmlb:inputField> so that when I press enter in that input field some action should take place.
But Iam not sure how to handle that event.
When I use this it is giving page error.
Can anyone help me out how to handle this...
Regards,
Raju...if you set submitOnEnter = "true" for an inputfield, pressing enter key when the cursor is in that inputfield would trigger server event.
in the oninputprocessing you can capture the event.
also please be aware that submitonenter doesnt work in some SPs as per this thread
htmlb:submitOnEnter at inputField
to capture the value of the inputfield in oninputprocessing you can write the following code
ATA: data TYPE REF TO cl_htmlb_inputfield.
data ?= cl_htmlb_manager=>get_data( request = runtime->server->request
name = 'inputField'
id = 'IP1'
IF data IS NOT INITIAL.
<variable> = data->value .
endif .
Regards
Raja -
Hi,
I am using HTMLB inputField Control,its type is DATE.
I am using JSP tagLibs.
If the date entered by user is wrong it autimatically validates and makes the text of the inputfield red.
When user enters correct date the text does not become red.
I am using InputField Control for date and I have set the property of InputField showHelp="TRUE" so it is automatically showing Calendar Control next to the InputField.I can't make InputField disabled because the Calendar control also gets disabled when I disable the InputField.
Now my problem is
When I am using isValid() method for InputField class during programming it always returns true inspite of entering correct input.
Can sombody help me on this?
Parag.Hi Parag,
Just try creating a string before the inputField declaration and then using that (htmlb doesnt like the mix and match in the id like you're trying to do).
<%
String tempId;
for(int x=0;x<5;x++)
{ tempId = "a"+x;
%>
<tr>
<td><hbj:inputfield id ="<%=tempId%>"/></td>
<%}%>
Hope this helps,
Marty -
Htmlb InputField+showHelp
Hi Friends,
I am using htmlb InputField with type"DATE" in a JSP DynPage.The code is
<hbj:inputField
id="input_verificationDate"
type="DATE"
showHelp="TRUE" />
With this code,I am getting the date picker button after the inputfield.But the problem is,when I click that button It is not opening the date pop up window.It is displaying a message saying that "Error on Page".
Can plz tell me the problem,Urgent.
Thanks
Sampath .gHi,
u shud use the model also.
here in my jsp file,i ve given model="myBean.model"
in bean u get & set the datenavigator model ,using getter & setter methods
for more help ,refer this help file.
http://help.sap.com/saphelp_nw04/helpdata/en/aa/9b0e41a346ef6fe10000000a1550b0/frameset.htm
Regards
Bhargava
try to award points if it is helpful -
About HTMLB inputField value check....
I have one htmlb inputField in a bsp page.
this inputfield refer to numc(3) data element with fiexed value.
I wanna check input value automatically using fiexed value as domain....
How can I set this option?
How can I implement this function?
Regards etnaya.I would recommend you check into the doValidate feature of the inputField and check the examples under SBSPEXT_HTMLB in transaction SE80
-
Javascript in the htmlb:inputField
Here is the brief description of the problem:
I have a table view in which i display the htmlb:inputField which are created in the iterator. I need to capture the ENTER Key event and set the focus to the next field in the next row.
I have seen examples of the normal input field but couldnn't somehow figure out a way to do it in the htmlb:inputField. Here is the sample code which i tried to play around with (for normal input fields.)..
<i>function enter(nextfield) {
if(window.event && window.event.keyCode == 13) {
nextfield.focus();
return false; }
else
return true; }
</script>
Field 1: <input type="text" name="field1"
onkeypress="return enter(document.demo.field2)"><br>
Field 2: <input type="text" name="field2" onkeypress="return enter(document.demo.field1)"><br></i>
<b>How do i use this code in the iterator for my htmlb:inputField ? i did try the following attributes
1) submitOnEnter
2) onValueHelp
3) doValidate
but none on them could help me..
</b>..
Any help would be appriciated.
Amandeep.Hi Alwyn,
<b>
Works fine when i place it indivisually on the BSP.
I have not been able to figure out a way to do it in the iterator..</b>
<i><%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<script language = "javascript">
function func(nextfield)
if(window.event && window.event.keyCode == 13) {
nextfield.focus();
return false; }
else
return true;
</script>
<htmlb:content design="design2003" >
<htmlb:page title="detail " >
<htmlb:form>
<bsp:findAndReplace find = "<input"
replace = "<input onKeyPress=func(authorfname2);" >
<htmlb:inputField id = "authorfname1"
tooltip = "tooltip1"
value = "<%= authorfname %>" />
</bsp:findAndReplace>
<br>
<bsp:findAndReplace find = "<input"
replace = "<input onKeyPress=func(authorfname3);" >
<htmlb:inputField id = "authorfname2"
tooltip = "tooltip1"
value = "<%= authorfname %>" />
</bsp:findAndReplace>
<br>
<bsp:findAndReplace find = "<input"
replace = "<input onKeyPress=func(authorfname1);" >
<htmlb:inputField id = "authorfname3"
tooltip = "tooltip1"
value = "<%= authorfname %>" />
</bsp:findAndReplace>
</htmlb:form>
</htmlb:page>
</htmlb:content></i>
<b>in the iterator i am trying to do like this</b>
<i> MOVE: p_row_index TO l_rindx,
p_column_index TO l_cindx.
CONCATENATE 'INPUT_' l_cindx '_' l_rindx
INTO l_id.
CONDENSE l_id NO-GAPS.
IF gv_mode = 'P'.
CREATE OBJECT l_input.
l_input->width = '100%'.
l_input->style = 'celldesign:GROUP_LEVEL3'.
l_input->id = l_id.
l_input->cellvalue = 'X'.
l_input->maxlength = 11.
l_input->value = l_string.
p_isreadonly = 'X'.
p_style = 'celldesign:GROUP_LEVEL3'.
start test for the enter key
DATA: l_script TYPE string.
CONCATENATE ' "<input onKeyPress=func(' l_id ')"' INTO l_script.
CREATE OBJECT l_find_repl.
l_find_repl->find = '<input'.
l_find_repl->replace = l_script.
p_replacement_bee = l_find_repl.
end test for the enter key
p_replacement_bee = l_input.</i>
<b>and on the main page i have my same function but doesn't do anything..</b>
<i><script language = "javascript">
function func(nextfield)
if(window.event && window.event.keyCode == 13) {
nextfield.focus();
alert ('hello');
return false; }
else;
return true;
</script></i>
Any suggestions will be appriciated.
Thanks in advance
Amandeep. -
Htmlb:inputField always uses encode="TRUE"
Hi,
I have a inputField using data binding. The model field contains "Česká republika", and this code
<htmlb:inputField id="InpSupl" value="//model/edit_wa.supplier" encode="FALSE"/>
Renders to
<input class="sapEdfTxtEnbl" size="60" maxlength="60" name="cont_INVEST_invest_edit_wa.supplier" id="cont_INVEST_InpSupl" value="&#268;eská republika">
How can I prevent this HTML-encoding?
Version 6.40 SP 12.
Thanks,
ThiloHmm, I don't understand all this.
Look here, this is my complete output (sorry about that) of your example.
And you can see, the ampersand is encoded, but I want the letter È (a upper sized C with a ^ on top).
Why does it work at your place?
<html><head><title> </title><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" ><meta http-equiv="imagetoolbar" content="no"><script type="text/javascript" language="JavaScript" src="/sap/public/bsp/sap/htmlb/events.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bsp/sap/htmlb/event_dictionary.js"></script><link id="urstyle" rel="stylesheet" type="text/css" href="/sap/public/bc/ur/Design2002/themes/sap_tradeshow/ur/ur_ie6.css"><link rel="stylesheet" type="text/css" href="/sap/public/bc/ur/Design2002/themes/sap_tradeshow/ur/ur_pop_ie6.css"><script type="text/javascript" language="JavaScript">var popup_emptydoc="/sap/public/bsp/sap/htmlb/domainRelaxOff.htm";var HTMLB_SECTION508 = false;</script><script type="text/javascript" language="JavaScript">var sapUrDomainRelaxing = {NONE:"NONE",MINIMAL:"MINIMAL",MAXIMAL:"MAXIMAL"};ur_system={doc:window.document ,mimepath:"/sap/public/bc/ur/Design2002/themes/sap_tradeshow/common/",stylepath:"/sap/public/bc/ur/Design2002/themes/sap_tradeshow/ur/",emptyhoverurl:"/sap/public/bc/ur/Design2002/themes/sap_tradeshow/common/emptyhover.html",is508:false,direction:"ltr",domainrelaxing:sapUrDomainRelaxing.NONE,browser_abbrev:"ie6",dateformat:1,firstdayofweek:0}</script><script type="text/javascript" language="JavaScript" src="/sap/public/bc/ur/Design2002/js/sapUrMapi_ie6.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bc/ur/Design2002/js/popup_ie6.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bc/ur/Design2002/js/languages/urMessageBundle_de.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bsp/sap/htmlb/misc.js"></script></head><body class="urBdyStd" scroll="AUTO" style="margin-left:2;margin-right:2;margin-top:2;margin-bottom:2">
<input disabled type="hidden" id="htmlb_first_form_id" name="htmlb_first_form_id" value="htmlb_form_1"><form id="htmlb_form_1" name="htmlb_form_1" method="POST" autocomplete="off"><input type="hidden" name="htmlbScrollX"><input type="hidden" name="htmlbScrollY"><input type="hidden" name="htmlbevt_ty"><input type="hidden" name="htmlbdoc_id" value=""><input type="hidden" name="htmlbevt_frm" id="htmlbevt_frm" value="htmlb_form_1"><input type="hidden" name="htmlbevt_oid"><input type="hidden" name="htmlbevt_id"><input type="hidden" name="htmlbevt_cnt"><input type="hidden" name="htmlbevt_par1"><input type="hidden" name="htmlbevt_par2"><input type="hidden" name="htmlbevt_par3"><input type="hidden" name="htmlbevt_par4"><input type="hidden" name="htmlbevt_par5"><input type="hidden" name="htmlbevt_par6"><input type="hidden" name="htmlbevt_par7"><input type="hidden" name="htmlbevt_par8"><input type="hidden" name="htmlbevt_par9"><input type="hidden" name="onInputProcessing" value="htmlb"><input type="hidden" name="htmlb_form_1_complete" id="htmlb_form_1_complete" code="OK"><input type="hidden" name="sap-htmlb-design" id="sap-htmlb-design" value="">
<span id="InpSupl-r" class="urEdf2Whl"><input type="Text" class="urEdf2TxtEnbl" autocomplete="off" id="InpSupl" ct="InputField" name="InpSupl" st="" value="&#268;eská republika" onblur="sapUrMapi_InputField_Blur('InpSupl',event)" onkeydown="sapUrMapi_InputField_keydown('InpSupl',event)" onkeyup="sapUrMapi_InputField_KeyUp('InpSupl',event)" onfocus="sapUrMapi_InputField_focus('InpSupl',event)"></span>
</form>
<script language="JavaScript">
function sapArrErase(){if(typeof(sapUrMapi_PcTabSeq_Registry)=='undefined') return;sapUrMapi_PcTabSeq_Registry1=sapUrMapi_PcTabSeq_Registry;sapUrMapi_PcTabSeq_Registry=new Array();for(var p in sapUrMapi_PcTabSeq_Registry1){if(document.getElementById(p)!=null)sapUrMapi_PcTabSeq_Registry[p]=true;}}function sapOnResize(){sapArrErase();;}window.onresize=sapOnResize;window.attachEvent ('onload', sapOnResize);
</script><script language="JavaScript">sapUrMapi_initLinkStatus();</script><noscript><iframe style="position:absolute;top:0;left:0;width:100%;height:150%" src="?sap-bsp-exception=NO_JS"></iframe></noscript><script language="JavaScript">if(document.cookie==null||document.cookie.indexOf("sap-contextid")<0){location.assign("?sap-bsp-exception=NO_CK");}</script></body></html>
In my opinion the inputField always does a encode="TRUE" and I don't have a chance to set it to FALSE. -
htmlb:inputField id = "fecha_desde" type = "date"
GOOD, I HAVE THE FOLLOWING PROBLEM, AS I PLACE <HTMLB: inputField you go = fecha_desde type = dates " > SO THAT IT APPEARS IN SPANISH AND NOT IN ENGLISH
I believe you want to use OTR to define multiple languages. You can also search this forum for other OTR examples.
See /people/sap.user72/blog/2004/09/15/bsp-howto-exploring-bsp-development-and-the-miniwas-620-part-4b -
Hi,
Does anyone know, how to change the default white background color of the inputField in htmlb?Hi,
I could do it only with java script.
<script language="JavaScript">
function set_textcolor(name, col)
document.getElementById(name).style.color = col; "textcolor
document.getElementById(name).style.backgroundColor = col;
</script>
if you want to change the field static you can do that in following way:
<htmlb:inputField id = "IN_SCAN_NR"
value = "xxx" />
<script language="JavaScript">
set_textcolor("IN_SCAN_NR","red");
</script>
for dynamic change I did following:
Table it_fields contains IDs of fields I wanted ot set to red color (filled by an check routine).
<%
data:
lv_script type string,
lv_string type string.
loop at it_fields into lv_string.
concatenate
lv_script
'set_textcolor("'
lv_string
'","red");'
into lv_script.
endloop.
concatenate
lv_script
'</script>'
into lv_script.
%>
<%= lv_script %> *** put scripting to html coding
I hope that helps,
sincerely yours .
Bernhard
null -
Htmlb inputField type date: Failure
Hi
I am using a htmlb inpuField with type date.
Most of time it works fine.
However, sometimes it opens the calendar and closes imediately. After that, it does not open calendar anymore. It is necessary to submit in order to make it works normaly again.
Any ideas?
Regards,
Ronaldo.Hello.
I could not reproduce this with the following simple code:
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
<htmlb:page title = "test ">
<htmlb:form>
<htmlb:dropdownListBox id = "myDBLB">
<htmlb:listBoxItem key = "key_red" value = "Red" />
<htmlb:listBoxItem key = "key_green" value = "Green" />
<htmlb:listBoxItem key = "key_blue" value = "Blue" />
<htmlb:listBoxItem key = "key_black" value = "Black" />
</htmlb:dropdownListBox><br>
<htmlb:inputField id = "aabb"
value = "01.02.2005"
showHelp = "X"
type = "date"
/>
</htmlb:form>
</htmlb:page>
</htmlb:content>
Can you please give me some hint, what you are doing?
What SP level do you have? (Menu option System -> Status)
The two problem of yours may have something to do with each other but I am not sure.
Regards. -
Need help with htmlb:inputField and Currency format
Hi all,
i'm looking in vain for the possibility to prepare a field with currency.
I have a local field in which an amount is available.
Unfortunately, the amount is spent but not formatted for currency.
current layout: 123456.78
requestet layout: 123.456,78
How do I get through it?
Here is my code:
DATA: ld_betrag TYPE ZBETR.
definition: the domain of "ZBETR" = 'WRTV7'
LOOP AT.....
ADD wa-betrag TO ld_betrag.
ENDLOOP.
The amount will be added in a loop.
<htmlb:inputField id = "betrag"
disabled = "TRUE"
value = "<%= ld_betrag %>" />
Output is via a htmlb:inputField
I have the same definition for a amount field in a htmlb:tableView...
in this tableView i get the correct layout for my amount. But I haven´t give a special formatting to the tableView...
Why the BSP works differently at htmlb:inputField and htmlb:tableView
Thanks 4 help.
Regards
MarkusHi,
the Domain of ZBETR = WRTV7 (it´s SAP Standard)
Data Type CURR 'Currency field, stored as DEC'
No. Characters 13
Decimal Places 2
Output Length 18
Convers. Routine
X Sign
SBSPEXT_HTMLB Helps
I forgot the attribute 'type'.
Thank you...now it works!
Regards
Markus
Maybe you are looking for
-
New ipod touch won't sync with my iTunes
I am old time iTunes user who just got new Ipod touch. It starts to sync but at last step message is "Waiting for next stage" or something and it won't sync. I tried everything I can think of. I have lastes iTunes version. My old ipod still updates
-
OCR corrupt how to reinstall Acrobat 9 Pro
My OCR function in Acrobat 9 Pro says it is corrupt. I have tried to fix it and no repaid has worked. how do I reinstall 9 Pro, where do I get the download. It isn't in my account settings. I have my serial numbers.
-
I keep getting the upgrade notice for my apple tv software, start the upgrade, wait for download, then install, only to be notified that it failed to install. Over a week of this so far with more than 10 attempts.
-
Hi guy before the IOS6 I had downloaded Sonic 2 and it worked so well but only 1 week after, when Apple started the convert to IOS 6 this game does not work anymore,,, and it doesn't actualizated until now...could you say me how to upgrate this, or i
-
After Migrating from 4.7ITS to 6.0 version, HTML view is disabled
We have migrated from 4.7 to ecc6.0 (i.e from a stand alone ITS to integrated ITS). For these we have followed the steps given in SAP HELP. Now when I test a service, pages are displayed as in sap format and not in HTML format. Can anyone suggest me