PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

embedding search into javascript navigation?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • embedding search into javascript navigation?

    We are currently moving our website to a new server and as a result need to set up either the php or asp version of the zoom search on our existing site.

    We would like the zoom search box to appear exactly the same as our current search does (top right of every page), but we have been struggling to find a way of embedding the php/asp versions in the javascript file that displays our navigation & search. is there anyway of modifying the code below to achieve this?

    the section of the javascript which calls up our existing search is :

    document.write
    ('<td align="right" class="subnav">&nbsp;<br>
    <form name="search" method="get" action="/zoom/search.php">
    search our site
    <input name="s" value="" class="subnav" size="' + input_width + '">
    <a href="javascript:document.forms[\'search\'].submit();" class="subnav">go</a> &nbsp;
    </form>
    </td>');
    document.write('</tr>');
    document.write('</table>');

    an example of the full page can be seen here:
    http://www.mcgrigors.com/index_f.html

  • #2
    Why code up some complicated Javascript when you can just use some simple HTML?

    <form method="get" action="/zoom/search.php">
    <input type="text" name="zoom_query" size="20" />
    <input type="submit" value="Search" />
    </form>

    Comment

    Working...
    X