Google search in external file...

Discussion in 'HTML & Website Design' started by NewComputer, Feb 8, 2005.

  1. #1
    Is there a way to place google's site search file so that when you are spidered that bloated code is not getting crawled through? I know this is a little 'anal' but...
     
    NewComputer, Feb 8, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    What site search file?
     
    digitalpoint, Feb 8, 2005 IP
  3. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #3
    haha, thanks for making fun of me Shawn, I want to place the site search code in an external file, whether js or php...
     
    NewComputer, Feb 8, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    You could do it in an external JavaScript file...

    Something simple like:

    document.write('site search HTML code here');
    Code (markup):
    Then just include that file in your normal html file like so:

    <script type="text/javascript"
    	src="search.js">
    </script>
    Code (markup):
     
    digitalpoint, Feb 8, 2005 IP
  5. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #5
    Good Question. Great Answer. Thanks Guys! :)
     
    ResaleBroker, Feb 8, 2005 IP
  6. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #6
    Shawn,

    Are my .js skills that bad, is it not just a matter of putting the code in between the two ' ' and then calling the file search.js?

    I cannot get it to function...
     
    NewComputer, Feb 8, 2005 IP
  7. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #7
    Can anyone update me on how this should work? I have the necessary code. Do I need to have a .php extension on the page?
     
    NewComputer, Feb 18, 2005 IP
  8. Smart Links

    Smart Links Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    i'm not sure but if you find out please PM me.
     
    Smart Links, Feb 21, 2005 IP
  9. flawebworks

    flawebworks Tech Services

    Messages:
    991
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    78
    #9
    I would use a php include. something like: <?php virtual("oy.php"); ?>.

    A javascript will show in your page; but the php will not.
     
    flawebworks, Feb 21, 2005 IP