Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    need help with a searh form issue

    Hi, I'm kind of a newbie and amd trying to get a simultaneous search engine to work. you can see it www.cosearch.net It works for the most part in firefox. won't work in google and is buggy in IE. what I would like to be able to do is reset the tabs when a new search is entered. as it is it just keep opening u new tabs.

    this is what I have so far

    Code:
    <script type="text/javascript">
        function pointconversion() {
        var patrn = document.getElementById("patrn");
        if ( screen.deviceXDPI > 100 || patrn.offsetWidth>= 100) {
          var WSarr=new Array('div','font');
          var WSj='0';
          var WSy = document.getElementsByTagName(WSarr[WSj]);
          while(WSj<='2'){
            for (var WSi=0;WSi<WSy.length;WSi++) {
              var strlength =document.getElementsByTagName(WSarr[WSj])[WSi].style.fontSize.length;
              var pointsorpixels =document.getElementsByTagName(WSarr[WSj])[WSi].style.fontSize.substr(strlength-2,2);
              if (pointsorpixels=="pt")
              {
                var newsize=Math.ceil(parseFloat(document.getElementsByTagName(WSarr[WSj])[WSi].style.fontSize)*1.3);
                document.getElementsByTagName(WSarr[WSj])[WSi].style.fontSize = newsize + "px";
              }
            }
            WSj++;
            WSy = document.getElementsByTagName(WSarr[WSj]);
          }
        }
      }
    </script>
    
     <body onload='hideResultDiv();'>
    
    
                <div id='formcontainer'>
                <!-- Form Code Start -->
                <form id='search' action='' method='get' onsubmit='javascript: return SubmitForm();'>
                <fieldset >
                <legend>CoSearch</legend>
    
                <div class='container'>
                    <input type='text' name='q' id='q'  maxlength="250" />
                    <input type='submit' name='Submit' value='Search' />
                </div>
                </fieldset>
                <legend>Best Used With Mozilla Firefox Web Browser!</legend>
                </form>
                <script type='text/javascript'>
    
                function SubmitForm()
                {
    
                    showResultDiv();
                    document.forms['search'].action='http://www.bing.com/search?q=';
                    document.forms['search'].target='_blank';
                    document.forms['search'].submit();
    
                    	
                	  showResultDiv();
                    document.forms['search'].action='http://www.google.com/search?q=';
                    document.forms['search'].target='_blank';
                    document.forms['search'].submit();
                    
                    showResultDiv();
                    document.forms['search'].action='http://search.yahoo.com/search?p=';
                    document.forms['search'].target='_blank';
                    document.forms['search'].submit();
                    
    
                   
                }
    
    
                function showResultDiv()
                {
                    var result_div = document.getElementById('resultcontainer');
                    result_div.style.display="";
                }
    
                function hideResultDiv()
                {
                    var result_div = document.getElementById('resultcontainer');
                    result_div.style.display='none';
                }
    
    
                </script>
                <!--
                Form Code End
                -->
                </div >
    any help with this would be great. thanks.
    Last edited by eeeprom; 10-28-2012 at 05:48 PM. Reason: added code BB tags

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,666
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    If you post any code please put it in between [CODE][/CODE] tags. It makes scanning your posts much easier. You can do this by clicking the small ‘#’ icon above the reply field.

  • #3
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, Thanks for the advice. I will remember that in the future.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •