L
larry
I'm a newbie in Internet programming. I have created an HTML form
using a Perl script. I previously wrote about a question which I still
need some assistance with. In previous postings I received similar
advice which I greatly appreciate. What I want to happen is that when
I click on the submit button, a javascript function will run and then a
perl script will be called:
The advice I received was of the following form: To create a form
using the onsubmit form attribute and to set any values I wanted to be
sent to the perl script in hidden values input controls.
The examples given were of the form:
<form action="myPerlScript.pl" onsubmit="return
someJavaScriptFunction()>
A Javascript function which populates hidden fields and return value
true
<input type = submit...>
</form>
This is not working for me and I'd appreciate if someone can tell me
why. I'm guessing this a glaring error. First of all, the entire
script is contained in one form:
<form action="toBeChanged.pl" onsubmit="return do_processForm()">
After this form declaration the Javascript function is declared
,followed by hidden fields which are populated when the Javascript
function runs, followed by the HTML that creates the form and then
ultimately the submit button.
I am also trying to change the action value in the Javascript using the
DOM document.form.action = x.pl because depending on certain form
selections I want different script to be called. Any advice would be
most appreciated.
Thanks,
Larry
using a Perl script. I previously wrote about a question which I still
need some assistance with. In previous postings I received similar
advice which I greatly appreciate. What I want to happen is that when
I click on the submit button, a javascript function will run and then a
perl script will be called:
The advice I received was of the following form: To create a form
using the onsubmit form attribute and to set any values I wanted to be
sent to the perl script in hidden values input controls.
The examples given were of the form:
<form action="myPerlScript.pl" onsubmit="return
someJavaScriptFunction()>
A Javascript function which populates hidden fields and return value
true
<input type = submit...>
</form>
This is not working for me and I'd appreciate if someone can tell me
why. I'm guessing this a glaring error. First of all, the entire
script is contained in one form:
<form action="toBeChanged.pl" onsubmit="return do_processForm()">
After this form declaration the Javascript function is declared
,followed by hidden fields which are populated when the Javascript
function runs, followed by the HTML that creates the form and then
ultimately the submit button.
I am also trying to change the action value in the Javascript using the
DOM document.form.action = x.pl because depending on certain form
selections I want different script to be called. Any advice would be
most appreciated.
Thanks,
Larry