• Resolved wen.wainwright

    (@wenwainwright)


    In another post I was given the following code to paste into the text widget in order to create a search form:

    <form id="searchform" method="get" action="search.php">
    <input class="textbox" value="Looking for something?" name="s" id="s" onfocus="if (this.value == 'Looking for something?') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Looking for something?';}" type="text">
    <input type="submit" id="searchsubmit" value="" class="searchsubmit" />
    </form>

    At first it seemed perfect, it was right where I wanted it to be, etc. But when I type in a word to search I just get the following error: Not Found
    The requested URL /search.php was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I added a published post but that didn’t make it work either. The previous forum post provided me with the code I show above but didn’t mention anything about placing any other code anywhere else. Have I made an error, do I need more code elsewhere? Any insight is appreciated. This is the site: https://marginalia.wendywainwright.com

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try this.

    <form id="searchform" method="get" action="https://marginalia.wendywainwright.com/">
    <input class="textbox" value="Looking for something?" name="s" id="s" onfocus="if (this.value == 'Looking for something?') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Looking for something?';}" type="text">
    <input type="submit" id="searchsubmit" value="" class="searchsubmit" />
    </form>

    All I did was remove search.php from the action and inserted your url.

    Thread Starter wen.wainwright

    (@wenwainwright)

    perfect! thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Text Widget Search Form’ is closed to new replies.