I want to pass my javascipt variable value to idoc script.
Now acc. to the WinVer value need to use if loop.
* var WinVer="Unknown OS";*
* if (navigator.appVersion.indexOf("Windows NT 5.1")!=-1) WinVer="XP";*
* if (navigator.appVersion.indexOf("Windows NT 6.1")!=-1) WinVer="Win7";*
IDOC script is a server side script and Java script is a client side script.
The normal flow of execution is first service side script (IDOC) gets executed and then client side script (Java Script) is executed.
So by the time Java script starts its execution, IDOC is complete and is out of bound.
So in the same request we can not pass value of java script variable to IDOC. However you can create a new request and sent the value to IDOC but in that case the page will get refreshed.
The basic question, why do you want to do this? What is the business case scenario?