Re: How to make submit buttons work in text format
by "Frank Boumphrey" <bckman(at)ix.netcom.com>
|
Date: |
Sat, 12 May 2001 23:55:25 -0400 |
To: |
<cbirds(at)earthlink.net>, "HWG" <hwg-techniques(at)mail.hwg.org> |
References: |
mediaone |
|
todo: View
Thread,
Original
|
|
pressing the submit button returns the content of your form as
name/value pairs either in the HTTP header, or as a query string to
the URL referenced in the form (in your case
http://www.google.com/search ). As you are using the 'get 'method,
this will appear as a string after a '?' sign. There needs to be
something at http://www.google.com/search to process this string.
On your server you need to process the form using some method.
CGI, ASP, CFM, PPH are some of the popular methods of processing
forms.
OTH you can retrieve a query string using javascript, and do some
elementary processing without having access to a server.
HTH
Frank
Frank Boumphrey
President, HTML Writers Guild
Author:
Beginning XHTML
XML Unleashed
XML for Dummies
Professional Style sheets
XML applications
www.hypermedic.com
http://gutenberg.hwg.org
----- Original Message -----
From: <cbirds(at)earthlink.net>
To: "HWG" <hwg-techniques(at)mail.hwg.org>
Sent: Saturday, May 12, 2001 7:28 PM
Subject: How to make submit buttons work in text format
>
> Hello,
> I have multiple search forms on one page. They all work perfectly,
but
> ONLY when the return key is hit....
> I have them set up for TEXT as the submit buttons with a bit of
> javascript.
>
> Here is an example of the onClick I found that doesn't seem to work:
>
> <FORM method=GET action="http://www.google.com/search">
> <A HREF="http://www.google.com/"><IMG SRC="images/google.gif"
border="0"
> ALT="Google" align="absmiddle"></A><br>
> <input type="hidden" value="btnG">
> <INPUT TYPE=text name=q size=15 maxlength=255 value=""><a
> href="http://www.google.com/search"
> onClick="this.document.form_name_here.submit();"><font
> color="#990000"><b>.: Search :.</b></a>
> </FORM>
>
> The problem is that pressing the text only works part way...the
browser
> goes to the page but no results show. The ordinary google button has
a
> name="btnG" tag in it but I wasn't quite sure where that would
> go....doesn't work if substituted in form_name_here.
> Google code is available on the web if you want to check for
accuracy...
>
> thanks
>
>
>
> ********************
> Claris Emailer 2.0v3
> ********************
>
>
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA