|
User Details |
message
|
|
Don Leonard
post date:
2010-02-02 08:25:35
|
|
Is it possible to submit a form (instead of a hyperlink) through a menu selection? If so, can you provide a coding example? Thanks in advance.
|
|
|
Brad Lawryk
post date:
2010-02-02 09:36:01
|
Hi Don,
Could you give an example of what you are trying to do?
Brad
|
|
|
Don Leonard
post date:
2010-02-02 09:48:32
|
|
Thanks for the quick response Brad! I have an online form, and I'd like to add a vertical or horizontal menu wit "Save", "Exit", etc. Clicking on any of the menu items would submit the form (i.e., onsubmit(), like an html button.
|
|
|
Andrei Rinciog [Extend Studio]
post date:
2010-02-02 10:20:32
|
Hello,
The form can be submitted from javascript function, like this:
function submitForm() {
document.myForm.submit();
}
Then you can execute that function when you click a button. To assign a javascript function to a button you need to put this in the URL box:
javascript:submitForm()
Hope it helps.
Regards,
Andrei Rinciog
|
|
|
Don Leonard
post date:
2010-02-02 10:36:53
|
|
Thank you. Can you tell me how to identify which menu selection was made before processing the submitted form?
|
|
|
Andrei Rinciog [Extend Studio]
post date:
2010-02-02 10:54:32
|
Well, you can either use a different javascript function for each button or use send a paramter when you call the function. E.g. Button 1 can have:
javascript:submitFormButton1()
or
javascript:submitForm(button1)
The second method, using a parameter, would be a more clean solution.
Regards!
|
|