Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input type

Status
Not open for further replies.
Mar 11, 2004
127
GB
I'm going to add a guest book to my website, but I would like to make it so it fits with the rest of the site and doesn't look like something that doesn't belong.

I can get most of it to an acceptable degree, but its the "Submit" button that is doing me in. I know you can change what is said on the button, but can the actual button be changed to a specified gif at all??

This is the code before I've fitted it to my web style.

Code:
<HTML>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<FONT SIZE=2>Guest Book Script by
<A HREF="[URL unfurl="true"]http://bignosebird.com">BigNoseBird.Com</A>[/URL]
</FONT>
<TABLE WIDTH=560 BORDER=0 BGCOLOR="#660000">
<TR>
<TD VALIGN=MIDDLE>
<CENTER>
<FONT COLOR="#EEEEEE">
<FONT COLOR="#EEEEEE" FACE="ARIAL" SIZE=4>
<B>PLEASE SIGN OUR GUESTBOOK!</B>
</FONT>
</CENTER>

<BLOCKQUOTE>
Thank you so much for stopping by our site. We invite you to leave
your mark. If you are so inclined, feel free to use HTML. After you submit
your entry, you will be returned to the guestbook. If for some strange
reason you do not see what you wrote, please press <I>RELOAD</I> on your
browser.
</BLOCKQUOTE>
</FONT>
<CENTER>
<FORM METHOD="POST" ACTION="/gbook//bnbbook.cgi">
<TABLE BGCOLOR="#CCE6FF" CELLPADDING=1 CELLSPACING=1 BORDER=0 WIDTH=540>
<TR>
<TD>Your Name</TD>
<TD><INPUT NAME="name" TYPE="TEXT" SIZE=40 MAXLENGTH=100></TD></TR>
<TD>E-mail</TD>
<TD><INPUT NAME="signer_email" TYPE=TEXT SIZE=40 MAXLENGTH=100></TD></TR>

<TD>City/State</TD>
<TD><INPUT NAME="city" TYPE="TEXT" SIZE=40 MAXLENGTH=100></TD></TR>
<TD>Country</TD>
<TD><INPUT NAME="country" TYPE="TEXT" SIZE=40 MAXLENGTH=100></TD></TR>
<TD>Your URL</TD>
<TD><INPUT NAME="url" TYPE="TEXT" SIZE=40 MAXLENGTH=100></TD></TR>
<TD>How did you get here</TD>
<TD> <SELECT NAME="howfound">
       <OPTION VALUE="By my best recollection, I don't remember" SELECTED>
                      By my best recollection, I don't remember
       <OPTION VALUE="Search Engine">

                      Search Engine
       <OPTION VALUE="Resource Directory Listing">
                      Resource Directory Listing
       <OPTION VALUE="Word of mouth">
                      Word of mouth
       <OPTION VALUE="Your kidding, right? I used a computer!">
                      Your kidding, right? I used a computer!
       <OPTION VALUE="A link someplace">
                      A link someplace
       <OPTION VALUE="BigNoseBird.Com is my default browser page">
                      BigNoseBird.Com is my default browser page
       <OPTION VALUE="Other">

                      Other
     </SELECT>
</TD></TR>
<TD>Private Message</TD>
<TD> <SELECT NAME="private">
     <OPTION VALUE="NO" SELECTED>NO
     <OPTION VALUE="YES">YES
     </SELECT>
</TD></TR>
<TD>Your Message</TD>
<TD><textarea name="message" wrap=virtual rows=6 cols=40></textarea>
<INPUT TYPE="HIDDEN" NAME="required" VALUE="name,message">

<BR>
<INPUT TYPE="submit" VALUE="SIGN BOOK!">
<BR>
</TD>
</TR>
</TABLE>
</FORM>
</TD>
</TR>
</TABLE>

<!--NEVER EVER REMOVE THE bookmark line!!! This tells the script where
    your reader entries begin -->
<!--bookmark-->
 
Change:

<INPUT TYPE="submit" VALUE="SIGN BOOK!">

into

<INPUT TYPE="image" SRC="images/submit.gif" HEIGHT="30" WIDTH="173" BORDER="0" ALT="SIGN BOOK!">




____________________________________
Just Imagine.
 
ok, I've given this a go locally with a reset button.

I used initally...
<INPUT TYPE="RESET"> and that worked on, that would clear the form.
However, when I changed it to...
<INPUT TYPE="image" SRC="images/reset.gif" HEIGHT="30" WIDTH="173" BORDER="0"> it doesn't seem to work.

Anyone offer me some ideas on this?

Thanks,
Ant
 
cantfindausername, you need to use JavaScript with the reset image to make the form reset.

Code:
<a [COLOR=red]onclick="document.theform.reset();return false;"[/color]
href="#"><img alt="Clear" src="clear.gif" border="0"></a>

The portion in red tells the browser to reset the form when the reset image is clicked.



____________________________________
Just Imagine.
 
Ok, some good points there. Consider the reset button gone.

So back to my original post then, of having a submit/ok button that is a different image to the windows default "button"

Is it really as simple as
Code:
<INPUT TYPE="image" SRC="images/submit.gif" HEIGHT="30" WIDTH="173" BORDER="0" ALT="SIGN BOOK!">
????

Thanks,
 
Yes, it's that simple if all you want to do is submit the form. But if you have other criteria then it can get complicated.


____________________________________
Just Imagine.
 
No, thats all I want to do. I'm just being impatient as I haven't set up the test page properly yet so can't see that its commiting the entries.

Thanks for your help.

Ant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top