passing the URL in a parameter on the form ACTION event for SUBMIT button..

liunx

Guest
I know how the form SUBMIT button works, when you hardcode the URL on the onclick event of the FORM..<br />
<br />
But what i want to do here is, when the submit button is clicked, i want to pass the URL in a variable for object oriented purposes..<br />
<br />
Is this possible, and if yes, HOW??<br />
<br />
In the code below,<br />
v_psppagename is the variable local to the page. And i fetch the data in the v_psppagename from a SELECT statement, which fetches the value from the database..<br />
<br />
A part of my code looks like,<br />
<br />
<form name="f3" method="GET" action= "v_psppagename"><br />
<br />
<input type="submit" value="Submit" onClick="get_values();"> <br />
<input type="hidden" name="i_startdate"> <br />
<input type="hidden" name="i_enddate"> <br />
<input type="hidden" name="i_lob"><br />
</td><br />
</form><br />
<br />
<br />
Everything else works the way it should, the form passes the parameters the way it should.. but when it SUBMITs the page the webpage address right now looks like,<br />
<!-- m --><a class="postlink" href="http://159.225.218.59/pls/portal30/v_psppagename?i_startdate=1-Jan-2003&i_enddate=1-Jul-2003&i_lob=6">http://159.225.218.59/pls/portal30/v_ps ... 03&i_lob=6</a><!-- m --><br />
<br />
instead of<br />
<!-- m --><a class="postlink" href="http://159.225.218.59/pls/portal30/showwebpage?i_startdate=1-Jan-2003&i_enddate=1-Jul-2003&i_lob=6">http://159.225.218.59/pls/portal30/show ... 03&i_lob=6</a><!-- m --><br />
<br />
showwebpage is the value that is being captured in the v_psppagename variable from the database.<br />
<br />
Thank you.<!--content-->Can someone please tell me, if this is even possible..?<!--content-->You can get the value from the action attirbute and pass it to a hidden input field, like this:<br />
<br />
document.f3.action_url.value=document.f3.getAttribute("action");<br />
<br />
I'm pretty sure that this will work but I have only ever getAttribute with forms that have id's.<!--content-->
 
Back
Top