Initially I used 'ie-set-select-field' tag. It is setting the required index, where as JavaScript 'openOnlineForm' is not getting called. Then I tried explicitely calling the JavaScript as following.
<ie-session baseUrl="localhost://staging.com" beginSession="true">
<ie-set-select-field functionId="Select from a List" name="select1" optionIndex="2"/>
<ie-execute-javascript functionId="openOnlineForm" script="openOnlineForm.value='select1'"/>
</ie-session>
Still the script is not getting called. Am I missing something? Or I'm incorrectly handling the Select element?
Following is the simple code of the JavaScript function.
function openOnlineForm(path)
{
window.location=path.options[path.selectedIndex].value;
}
Thanks in anticipation.
Regards.
Dhanraj
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm trying to set following select tag
<select onChange="openOnlineForm(this)" name=select1 class="field1">
<option value="/pfsuser/uGrad/UGAppliprocess1.htm">Under Graduate
<option value="/Pfsuser/pGrad/PGAppliprocess1.htm">Post Graduate
</select>
Initially I used 'ie-set-select-field' tag. It is setting the required index, where as JavaScript 'openOnlineForm' is not getting called. Then I tried explicitely calling the JavaScript as following.
<ie-session baseUrl="localhost://staging.com" beginSession="true">
<ie-set-select-field functionId="Select from a List" name="select1" optionIndex="2"/>
<ie-execute-javascript functionId="openOnlineForm" script="openOnlineForm.value='select1'"/>
</ie-session>
Still the script is not getting called. Am I missing something? Or I'm incorrectly handling the Select element?
Following is the simple code of the JavaScript function.
function openOnlineForm(path)
{
window.location=path.options[path.selectedIndex].value;
}
Thanks in anticipation.
Regards.
Dhanraj
Please only post once. I will responde in your other post:
https://sourceforge.net/forum/message.php?msg_id=4308737