Just wondering, when you go to yahoo or altavista or most major search engines, the cursor pops up in the search box automatically, how would you make it do that for LinksSQL??? Thanks
Now, at the top of all your templates, you can change the <%body_tag%> to:
<body <%body_tags%> >
And you can now add items to the <body> tag without having to re-edit page after page. Just make changes to _both_ the body_tag and body_tags globals, and they should be next to each other in globals.txt so it's easy to remember to do. :)
(It's probably better to do it this way, so you can specifically decide what pages you want the javascript (or any other page-specific tag) on, and keep "default" and basic tags in the <%body_tags%> and <%body_tag%> globals. You could also make a <%body_tag_search_java%> global, and use that... but I like the idea of being able to edit/change the HTML <body ....> tag in a document, while keeping the the default <%body_tags%> )
<form action="<%db_cgi_url%>/search.cgi" method="GET"> to <form name="searchform" action="<%db_cgi_url%>/search.cgi" method="GET">
If you do the same thing to include_search_bar.html (name the form "searchform"), and make the change to the top of the files you include it on (the expanded <body onload.... <%body_tags%> >), when the page loads, the cursor will be on that form.
Going back to the above, if you keep the javascript code in the actual <body ... > tag, then if you have 2 or 3 forms on a page, like on home.html, you can pick which form you want highlighted or selected on a page by page basis. You can use searchform as your default, unless you pick soemthing else (I didn't want to use 'default', since it's not automatic, you have to edit each page, but you only need to do that once.).
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email. Please leave a PM here.
The first function is focusing the search field, the second is adding a hidden element to the form when the function is run and then it submits the form.