javascript URL redirect (setting value) not working
527623Dec 8 2009 — edited Dec 8 2009Hello All,
Apex 3.1
I am trying to write javascript that will execute off the click of an icon in a report. It will display a prompt box to the user, and when the user clicks "OK", I would like to re-direct the user to another page, setting the value in the prompt to a page item on the new page. Here is the javascript I'm trying to use:
<script language="JavaScript" type="text/javascript">
function copy_prompt()
{
var copies=prompt("Number of copies?","1");
if (copies!=null && copies!="" && copies !="0")
{
$s('P6_ITEM_COPY_COUNT',copies);
redirect('f?p=&APP_ID.:82:&SESSION.::NO:P82_ITEM_COPY_COUNT:&P6_ITEM_COPY_COUNT.')
}
}
</script>
The problem I'm having is that since session state is not being set, it is passing a null value to the new page. I can see on page 6 the item P6_ITEM_COPY_COUNT is getting set appropriately, but the value is not in session state. Any suggestions?
Thanks!