"sam" <> skrev i melding
news: oups.com...
> Hi All,
>
> I have a form with 4 checkboxes and 4 text boxes and one submit button.
> The form should work such a way when I select a particular checkbox and
> give a url in text box, the form should get submitted to that url
> entered in the text box. Is this possible. I know to submit form by
> metioning the action attribute only. How do this with one button but
> submitting to different locations on different selection...Can any one
> help me proceed further. My form will look something like this.
>
> Thanks,
> Sam
>
> <html>
> <head>
> </head>
> <script>
> function submitme()
> {
> var form = document.forms['test_submit'];
> var selected = form.elements.chk;
>
> if (selected[0].checked)
> {
> var url = document.test_submit.text1.value;
> form.submit(url); // is this correct at all, I get an error
<snipped/>
Try something like
frm.action=url;
instead, and terminate your onSubmit function with
return true;
--
Dag.
|