SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: Javascript OnSubmit Question
-
Feb 5, 2001, 13:28 #1
- Join Date
- Jul 2000
- Posts
- 61
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What I want to do is have two buttons that point to different action web page on the same form. The reason why on the same form is because the require input information are the same. I want the user to be able to choose English or French. Is this possible with javascript?
Ken
Thanks in Advance!
-
Feb 6, 2001, 11:28 #2
- Join Date
- Feb 2000
- Location
- District of Columbia
- Posts
- 373
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Kenny,
I am not sure what you are asking. You want the page to display in either English or French when a button in a form is clicked?
-
Feb 6, 2001, 12:54 #3
- Join Date
- Jul 2000
- Posts
- 61
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What I meant is this, you each form can only have 1 action element, so it would go to a page on submit. While what I want to do have another button on the same form which would go to a different page other then the one set in the form tag.
I've actually manage to do this by write a function on onclick which would reset the action element to a different page.
Thanks gotta go!
-
Feb 6, 2001, 17:15 #4
- Join Date
- Jul 1999
- Location
- SC, USA
- Posts
- 390
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hey kenny,
It sounds to me like it'd be better jsut to change the form's action. This is possible with JavaScript. Just go:
document.formName.action="somePlace.php"
or something like that.
Hope that helps,
aDogModerator at www.javascriptcity.com/forums/
-
Feb 6, 2001, 17:17 #5
- Join Date
- Jul 2000
- Posts
- 61
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanks!
Bookmarks