Form with diferrent action forms depending on the context

M

Michele

Hi all,
I have a form with 3 combobox whitin a asp page called data.asp, whose
action form is itself; the first combobox drives the behaviour of the other
two.
The onchange event of the first combobox is related to a javascript function
in which I call the submit method for the form, whose action form is itself.
This works fine.
The problem is that if I want to save the changes done by the user (clicking
the OK button) I need to set the action of the form to another page, for
example save.asp.
The question is: how to do this?
I had written a function inside the onclick method of the OK button that is
similar to the following one

document.MyForm.action = "save.asp";
document.MyForm.submit();

But it doesn't work properly, because the page save.asp is never invoked.

Thanks in advance for the help,
Michele.
 
B

Bob Barrows [MVP]

Change it to "Button" if you want to use its onclick event to submit the
form.

Please followup in a client-side script group if you ahve further questions
about this. .scripting.jscript will get you prompt answers.

Bob Barrows
 

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

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,162
Latest member
GertrudeMa
Top