Simple probably; javascript for form submission
linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Tue May 24 17:33:08 UTC 2005
Thanks!
I am having the same problem that I am having with Lance's example
though. When I try to submit the form by clicking on the text the
pagereloads properly but no data was sent. In this case I am also trying
to perform a login so I need to send the username and password which
doesn't seem to be happening. Do I need to do something special to pass
the values from the form?
Thanks!!
Madison
> /*
> * Function called to submit the page
> */
> function doSubmit(fname) {
> fname.submit();
> }
>
> -----Original Message-----
> From: linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org [mailto:linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org]
> Sent: May 24, 2005 1:23 PM
> To: tlug-lxSQFCZeNF4 at public.gmane.org
> Subject: RE: [TLUG]: Simple probably; javascript for form submission
>
>
>> I forgo the use of the input tag with type submit. This becomes to hard
>> to
>> manage when dealing with mutiple languages.
>> Instead I use something like this (this example is from my Login page):
>> <form name="login" action="/DocRoot/servlet/LoginServlet">
>> ...
>> <td align="center" background="/DocRoot/HTML/images/loginbttn.jpg" >
>> <a href="javascript: doSubmit(document.login)" >
>> Log In
>> </a>
>> </td>
>> ...
>> </form>
>> Where
>> 1) loginbttn.jpg is the image of a blank button, i.e. no text
>> 2) doSubmit is a javascript routine that submits the form
>> 3) document.login is my form (I'm using the Document Object Model
>> (DOM) here)
>> 4) "Log In" is the text for what would be my submit button
>>
>> I use an HTML table for my layout
>>
>> Jim.
>
> Thanks for the reply, Jim!
>
> What is the 'doSubmit' routine? I just get an 'Error: doSubmit is not
> defined' error in Mozilla when I tried to run it with just the html
> (though I wasn't surprised). :p
>
> Thanks!
>
> Madison
> --
> The Toronto Linux Users Group. Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
> --
> The Toronto Linux Users Group. Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
>
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list