1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Search engine script question

Discussion in 'Products & Tools' started by phpmx, Sep 7, 2004.

  1. #1
    Can the string: <INPUT TYPE="submit" VALUE="Search!"> be replaced by a .gif image, if so what is the proper syntax. I tried many ways and it appears to work, but it doesn't. check it out.
    Also, if you donot search a word and submit the query it gives you a list of answers where it should give you a warning to remind you you need to type a word isntead.
    Thanks in advance.

    :cool:
     
    phpmx, Sep 7, 2004 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    The no search phrase is intentional, it gives all documents then.

    I don't know about the image thing off the top of my head, although I know it's possible (it's more of an HTML thing).
     
    digitalpoint, Sep 7, 2004 IP
  3. Dji-man

    Dji-man Peon

    Messages:
    185
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,

    Feel free to "steal" my code to have an image instead of the standard grey search button. http://warmuseum.ca/cwm/newspapers/intro_e.html

    But do you really need to have an image instead? I mean, why do you simply apply a style to your button (class input.button)?

    As for your second question, use javascript to validate your form to check if your user had entered something in your search box, but I don't know what the script is. I don't use it in this site though, I leave it up to the user to decide if he wants to wait for the search engine to return all +144 000 documents... ;)

    Good Luck,

    Dji-man
     
    Dji-man, Sep 7, 2004 IP
  4. phpmx

    phpmx Peon

    Messages:
    55
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The code worked great. :)
     
    phpmx, Sep 8, 2004 IP