Forum Moderators: open

Message Too Old, No Replies

Replacing The Default Search Box "Button"?

Could someone please help !!!

         

Village Idiot

2:08 am on May 30, 2002 (gmt 0)



Hello all....

I am wanting to "Replace" the Standard "Default" Search box "BUTTON" on my Search Box from the standardized Gray form Button, to a Gif Search Button that I created myself... Only problem is is that I cant figure out where exactley in the short string of form code to take out whatever to replace my Gif image source code to make it (the search form) function properly...!!! Could someone please lend a helping hand, Im getting desperate..!!! Can this be done..? But then again perhaps not, maybe the way the Form Code is written itself maybe this isnt possible.... I hope it is possible, but if not, well at least we tried...:) Listed below is the snippit of form code to the search box and below that is the path to my Gif that I created that I want to replace the Standardized Gray Default Button.... Does somebody know where to paste my Gif into this string of form <code> to make it properly...? Hope someone can help.....!!
I really appreciate it...!!!

Village Idiot...

<form action="/cgi-sys/entropysearch.cgi" target=searchwindow>
Search Query <input type="text" name="query" value="">
<input type="hidden" name="user" value="fragrant">
<input type="hidden" name="basehref" value="http://example.com">
<input type="hidden" name="template" value="default">
<input type="submit" value="Search">
</form>

-----------

and my Gif code

<img src="images/searchbutton.gif" width="50" height="14">

(edited by: tedster at 9:33 am (utc) on May 30, 2002)

justa

2:25 am on May 30, 2002 (gmt 0)

10+ Year Member



VI,

I did a quick check and came up with this as the submit button.

<input type="image" src="submit.gif" alt="Submit!">

I noticed in the <form> tag you didn't specify a method of delivery
<form action="/cgi-sys/entropysearch.cgi" method="post" target=searchwindow>

That should work.

Village Idiot

3:08 am on May 30, 2002 (gmt 0)



Hello Justa...

Well it kinda worked.... The form works... Cept now instead of seeing the Button I made I keep coming up with a broken image.... mmmmmmmmm well, I`ll keep pluggin away at it.....!!!

Thanks Justa...!

justa

3:20 am on May 30, 2002 (gmt 0)

10+ Year Member



Mine was just an example,

you would be coding

<form action="/cgi-sys/entropysearch.cgi" method="post" target=searchwindow>

Search Query <input type="text" name="query" value="">
<input type="hidden" name="user" value="fragrant">
<input type="hidden" name="basehref" value="http://example.com">
<input type="hidden" name="template" value="default">
<img src="images/searchbutton.gif" width="50" height="14">

</form>

Goodluck!

(edited by: tedster at 9:33 am (utc) on May 30, 2002)

Village Idiot

3:36 am on May 30, 2002 (gmt 0)



Sorry Justa I dont wanna be takin all your time so I understand Im probly on my own here before too long here with all this.... Well now EVERYthing shows up like its supposed to BUT now the form dosent work.... When I click on the button it goes Nowhere/Nothing...!!! Dont figure though cause EVERYthing is in the <form> box as should be, but with no Action...?!?!?

Sorry to be such a Pain Royal.....

Village Idiot....

justa

3:40 am on May 30, 2002 (gmt 0)

10+ Year Member



My fault. Try.......
<form action="/cgi-sys/entropysearch.cgi" method="post" target=searchwindow>

Search Query <input type="text" name="query" value="">
<input type="hidden" name="user" value="fragrant">
<input type="hidden" name="basehref" value="http://example.com">
<input type="hidden" name="template" value="default">
<img type="image" alt="Submit!" src="images/searchbutton.gif" width="50" height="14">

</form>

(edited by: tedster at 9:34 am (utc) on May 30, 2002)

Village Idiot

4:01 am on May 30, 2002 (gmt 0)



Dang ........ Still Nothing...

Before when I was useing the standard form without any altering it worked just fine but now its a no go..... Guess we must be leaving / or have taken / changed something pretty functional that........ well, made it function.???

justa

4:10 am on May 30, 2002 (gmt 0)

10+ Year Member



I just tested a page which included the following....

<form action="action_bulletin.cfm" method="post">

<INPUT TYPE="image" src="images/banner1.jpg" width="20" height="10" alt="submit">

....and it submitted fine. Can you show the source code, or put a link to the page in your profile?

Village Idiot

4:23 am on May 30, 2002 (gmt 0)



Thanks Justa.....

I justa :) put my link on my profile.... Just uploaded the page, and now Ive opened up the Root directory...

justa

6:33 am on May 30, 2002 (gmt 0)

10+ Year Member



Take out the Target=search window from the <form> tag.

If you are going to use the target="" you have the following chioces.

_blank opens a new window
_parent for frames, opens next page in parent frame
_self again for frames, opens window in own frame
_top can't recall at the moment, which is rather slack on my behalf.

Let me know how you go.

Acutally, I've read somewhere you can specify the window in your target, but I don't think I've tried that before. It's been a long day, so maybe I have and just can't remember.

BlobFisk

12:11 pm on May 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



With regard to the original question about replacing the standard Search (Submit) button, you have two choices:


  1. You can use CSS to control the style of your button.

  2. You can remove the
    <input type="submit" value="Search">
    button and place a graphic outside the <form> tags.

    On this graphic you can use:

    href="javascript:document.yourFormName.submit()"

    to submit your form when the user clicks the image.

    This choice gives you full control over the look and feel of the image.

I've also noticed that your form:

<form action="/cgi-sys/entropysearch.cgi" target=searchwindow>
)
has no
name="yourFromName"
attribute... you need this.

HTH!

Village Idiot

12:24 am on May 31, 2002 (gmt 0)



Hello Blob and Justa....

Thanks for all the fantastic input and advise..... I`ll give it a shot...!!!!

Thank you again, I appreciate it very much...!!! :)

Village Idiot...