[Javascript] Form submission problem

Lau lau at goldenweb.com.au
Mon Aug 20 10:17:17 CDT 2001


I'm using the <a href="javascript:window.document.generate.submit();">submit</a> format in a framed
page without any problems.

Double-check the spelling and capitalisation of "Generate"

If its not that then create a html page with nothing in it but the FORM, a single field, and the
submit url.... that should work (if it doesn't post the code) then add the rest of your code a bit a
time, testing after each addition to check whether it still works. When it stops working you know
that the problem is in the last bit of code you added.

On many occasions I've done this process and the code never stops working! .... sometimes you just
got to convince the bloody computer that it really can do it.

good luck
Lau



----- Original Message -----
From: TomMallard <mallard at serv.net>
To: <javascript at LaTech.edu>
Sent: Tuesday, August 21, 2001 12:45 AM
Subject: Re: [Javascript] Form submission problem


> Versions of NS don't honor using forms[0] if there's only one element.
>
> Most browsers will have trouble with a forms submission from inline js if
> the pages are in frames, layers or iframes...
>
> <a href="javascript:document.generate.submit();">submit</a>
>
> ...to distinguish the call, use "this"...
>
> <a href="javascript:this.document.generate.submit();">submit</a>
>
> HTH,
>
> tom mallard
> seattle
> ----- Original Message -----
> From: "Rees, Mark (TWIi London)" <mrees at twii.net>
> To: <javascript at LaTech.edu>
> Sent: Monday, August 20, 2001 7:15 AM
> Subject: RE: [Javascript] Form submission problem
>
>
> > Hello
> >
> > The first makes no difference - I have also tried
> document.foms[0].submit()
> > (and shouldn't it be document.forms('generate').submit() btw
> >
> > No there isn't. It's like I say, the submit button works fine and I can
> > refer to and manipulate form elements via the DOM no problem
> >
> > Thanks
> >
> > mark
> >
> >
> >
> > -----Original Message-----
> > From: Peter Brunone [mailto:peter at brunone.com]
> > Sent: 20 August 2001 15:04
> > To: javascript at LaTech.edu
> > Subject: RE: [Javascript] Form submission problem
> >
> >
> >
> > Try referencing the forms collection as well, e.g.
> > document.forms.generate.submit() .
> >
> > If that doesn't work, make sure there's no other object in your page
> > named
> > "generate".
> >
> > |-----Original Message-----
> > |From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
> > |Behalf Of Rees, Mark (TWIi London)
> > |Sent: Monday, August 20, 2001 6:14 AM
> > |To: 'javascript at LaTech.edu'
> > |Subject: [Javascript] Form submission problem
> > |
> > |
> > |Hello
> > |
> > |I'm trying to submit a form using a text link rather than an image/submit
> > |button. The form is called generate (not a reserved word as far as I can
> > |see) so my syntax is like so:
> > |
> > |<a href="javascript:document.generate.submit();">submit</a>
> > |
> > |This gives me a line 1 char 1 Document does not support this property or
> > |method error (in ie). In netscape I get document.generate.submit is not a
> > |function. However the submit button right next to it works fine.
> > |
> > |I've used this syntax before on other forms - I'm totally
> > |mystified. I would
> > |post code but it's a bit massive.
> > |
> > |Any ideas?
> > |
> > |Thanks for any help you can provide
> > |
> > |Mark
> > |_______________________________________________
> > |Javascript mailing list
> > |Javascript at LaTech.edu
> > |http://www.LaTech.edu/mailman/listinfo/javascript
> > |
> >
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > http://www.LaTech.edu/mailman/listinfo/javascript
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > http://www.LaTech.edu/mailman/listinfo/javascript
> >
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript
>
>




More information about the Javascript mailing list