View Single Post
  #6  
Old 04-13-2005, 10:27 AM
 
sstillwell@aerostich.com sstillwell@aerostich.com is offline
 

eXpert
  
Join Date: Jun 2004
Location: Duluth, MN
Posts: 242
 

Default

wow, cool! I have implemented this but added a few polishing touches.

1. I don't want the "Javascript Disabled" showing when that is not the case.
2. I want the button only present if JS is indeed disabled.
3. I don't want the "Please wait" text if JS is disabled and they have to hit the submit button.
4. I also changed the URL variable to q (after the great Google)
5. Added the proper way to get php variables from an HTML GET string.

So here is my polished version

Code:
<?php $substr = $_GET['q']; ?> <HTML> <BODY onLoad="document.process.submit();"> <TABLE width="100%" height="100%"> <TR> <TD align="center" valign="middle" /> <FORM action="search.php" method="POST" name="process" /> <INPUT type="hidden" name="simple_search" value="Y" /> <INPUT type="hidden" name="mode" value="search" /> <INPUT type="hidden" name="posted_data[by_title]" value="Y" /> <INPUT type="hidden" name="posted_data[by_shortdescr]" value="Y" /> <INPUT type="hidden" name="posted_data[by_fulldescr]" value="Y" /> <script>document.write('Please wait while searching...') </script> <noscript> <h3>JavaScript is disabled in your browser.</h3> <INPUT type="submit" name="submit1" value="Continue >>" /> </noscript> <INPUT type="hidden" name="posted_data[substring]" size="16" value="<?php echo $substr ?>"> </FORM> </TD> </TR> </TABLE> </BODY> </HTML>
__________________
No longer using Xcart, was good while it lasted.
Reply With Quote