on ‎2009 Sep 10 3:28 AM
Hi,
I need to attach a java script to a web item (text)! I believe that i need to create a script object with the necessary java script and then use this script object in text web item. But Im not sure how to do it. Plz let me know if you have any idea.
Request clarification before answering.
Hi,
all you need is a script item. You have to drag it to your web application. In this script item you can implement your javascript function, which can be called in other parts of the html file.
Regards
Erwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After we generate the script javascript, a Function will be generated and I believe we need to use this FUnction in calling the script into text web item. I follwed the below link to get the process, but Im not sure how to replicate the same with Text Web item.
http://help.sap.com/saphelp_nw70/helpdata/en/43/f5daaddfdb4c60e10000000a155369/frameset.htm
I have a java script code which will display some information after it gets executed. Now I need to use this java script code in a Text Web Item, so that I can show the script output as a webitem. After we run the report, I should see the javascript executed and displays the result in the text web item area.
I have very similar scenario in my web application, but for this purpose I use INPUT_FIELD_ITEM and not TEXT_ITEM.
You can choose the value of your INPUT_FIELD_ITEM with the following javascript code:
document.getElementById('INPUT_FIELD_ITEM_1_input_inp').value = 'dddddd';
I hope that is helps
Erwin
you wrote the you "have a java script code which will display some information after it gets executed". You have your code propably in SCRIPT_ITEM, so all you have to do is to put this line inside your function.
your function:
function yourfunction()
{
your code...
at the end you get some result, which you would like to show in the input item
document.getElementById('INPUT_FIELD_ITEM_1_input_inp').value ='your result'
}
that is all
Regards
Erwin
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.