Help! Submitting to FormMail through JavaScript Submit

  • Thread starter Margaret Werdermann
  • Start date
M

Margaret Werdermann

Hi all:

I'm having a nasty time with a particularly difficult piece of code
and was hoping someone might be able to help me. I have a FormMail
form that originally worked perfectly.

Then, I had to add a JavaScript function to the Submit button to make
a server function run when the form was submitted. Unfortunately,
this JavaScript wouldn't run when the button was designated as a
Submit, so I changed the button and placed a JavaScript submit into my
JavaScript function. Great! The JavaScript worked
perfectly...BUT...that broke my original FormMail submit, so now I'm
not getting e-mails anymore!

Here's the JavaScript function:

function autoURL (realname) {
window.document.forms[0].submit();
window.location.href="http://ceridianet.ceridian.ca/applications/accreditation.nsf/MarkPreComplete?Openagent&test=Base
Builder Pre-test &pname=" + realname;
}

....and here's the Submit button's code:

<input type="button" value="Submit" id="feedback" name="Submit"
onclick="autoURL(document.forms[0].realname.value);">

Can anyone help me with this? I'm about to tear my hair out over it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top