on 07-12-2006 7:04 AM
I have a variable "w_temp" in ABAP(defined in page attributes) and another variable "x" in javascript.
I can assign value of w_temp to x as follows :-
x = <% w_temp. %>
but I want to do vice versa i.e. assign value of x to w_temp.
How to do that ???????
can u give me an example of how to pass it using hidden field of form or via ajax.
its urgent.
thanks in advance !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This forums are meant for urgent support.
Anyway,
A form can look like this
<script language="javascript">
function submitform() {
document.aform.avar.val='some_val';
document.aform.submit();
}
</script>
<form name="aform">
<input type="hidden" name="avar">
<input type="button" name="abutton" onclick="submitform();">
</form>
If you define a page attribute avar (set it to auto), you have the 'some_val' in you abap var.
Eddy
PS.
Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
Spread the wor(l)d!
hey Eddy u r simply GREAT !!!!!!
thanks !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This has been the subject of many forum post already.
The answer is that you can't directly.
You need pass it via a (hidden) field of a form, URL or AJAX.
Eddy
PS.
Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
Spread the wor(l)d!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.