craigdawg
Jun 7, 2004, 06:15 PM
OK I'm not well-versed in Javascript and was trying to combine a form that I downloaded that doublechecks entries on certain fields my original one that does not and I've run into a roadblock.
There's a conflict with the action of the original button:
<input type="submit" value="Send" name="submit">
And that of the "new" button:
<input type="button" value="Submit" name="SB" onClick="sendOff();">
I tried changing the type value to "submit" and that didn't work. The form was sent without the field values being checked by the sendOff routine.
Now I was wondering if it's possible to include a line in the routine that would submit the form values? I specify where to send the viewer (in this case a webpage) here:
function sendOff(){
nmcheck = document.TheForm.name.value
if (nmcheck.length <1) {
alert('Please enter your name.')
return
}
good = false
checkEmailAddress(document.TheForm.email)
if ((document.TheForm.email.value ==
document.TheForm.emx.value)&&(good)){
window.location= "http://www.pbrg.com/article_index.html"
}
if ((document.TheForm.email.value !=
document.TheForm.emx.value)&&(good)){
alert('Both e-mail address entries must match.')
}
I have very little idea what I'm doing and sure would appreciate some help. :)
There's a conflict with the action of the original button:
<input type="submit" value="Send" name="submit">
And that of the "new" button:
<input type="button" value="Submit" name="SB" onClick="sendOff();">
I tried changing the type value to "submit" and that didn't work. The form was sent without the field values being checked by the sendOff routine.
Now I was wondering if it's possible to include a line in the routine that would submit the form values? I specify where to send the viewer (in this case a webpage) here:
function sendOff(){
nmcheck = document.TheForm.name.value
if (nmcheck.length <1) {
alert('Please enter your name.')
return
}
good = false
checkEmailAddress(document.TheForm.email)
if ((document.TheForm.email.value ==
document.TheForm.emx.value)&&(good)){
window.location= "http://www.pbrg.com/article_index.html"
}
if ((document.TheForm.email.value !=
document.TheForm.emx.value)&&(good)){
alert('Both e-mail address entries must match.')
}
I have very little idea what I'm doing and sure would appreciate some help. :)
