Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Actions/Methods - JavaScript?

Status
Not open for further replies.

jeffcravener

Technical User
Apr 10, 2003
37
US
I have an HTML page that has the following code:

Code:
<FORM NAME="mainform" ACTION=[URL unfurl="true"]http://midp-pager-001/telalertscripts/telalerth.exe[/URL] NAME=SMS METHOD="post" ONSUBMIT="validate();">

I want another one that sens the same information in an e-mail.

Is there a way to do this having another ACTION in the form or maybe to run them both using JavaScript?

Thanks in advance!!
 
Have your server-side script handle the email when it processes the other things you want done. This can't be done with client-side Javascript.

Lee
 
You could do it in client-side JavaScript...

On submit, create a duplicate form (with all elements as per the original form), and also a hidden iframe. Submit the new duplicate form to that iframe, with the mailto action, and after a short delay, submit the original form.

You'd need to ask in the JavaScript forum (forum216) for more advice with this, however.

Hope this helps,
Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I have been working on another project the last couple days and some family troubles. But I plan on taking a look at the suggestion above in more depth this weekend sometime. I will keep you posted, thanks so much!

I am def looking to do this on client side as we may not be getting a web server. So the HTML file would just be located on a network folder.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top