HTML Help
HTML Help Central . com

» Online Users: 109

1 members and 108 guests
Most users ever online was 695, 02-16-2011 at 07:01 AM.

» Site Navigation

 > FAQ

» Domains For Sale

Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2012
    Posts
    5

    Help with search box

    Hi

    I hope i am posting this in the right section. I am working on my website and i want to have a search box that is nice and wide like you would see on google or yahoo just a nice visible search box to make it easy for visitors to type. Anyway i tried looking up ways to do this and everytime i try i end up screwing up the whole template of my site or part of it i just can't seem to make it fit the way i like it to. I photoshop how i like it to look from the original if anyone can help me with this i really really would appreciate it. I know this might be a simple fix, but i cant seem to figure it out
    thank you in advance

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title><?=$_SESSION['site_name']?></title>
    <meta name="keywords" content="<?=$meta_res['key_s']?>" />
    <meta name="description" content="<?=$meta_res['key_s']?>" /> 
    <link href="style/newstyle.css" rel="stylesheet" type="text/css" />
    <script language="javascript">
    var ServerTime = new Date("<?php echo $JavascriptTime?>");

    function ShowServerTime()
    {
    if(!document.all && !document.getElementById)
    {
    return;
    }
    var dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
    mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
    var hours = ServerTime.getHours();
    var minutes = ServerTime.getMinutes();
    var seconds = ServerTime.getSeconds();
    var day=dN[ServerTime.getDay()];
    var month=mN[ServerTime.getMonth()];
    var dat=ServerTime.getDate();
    ServerTime.setSeconds(seconds+1);
       
    if(hours<=9)
    {
    hours = "0" + hours;
    }
    if(minutes<=9)
    {
    minutes = "0" + minutes;
    }
    if(seconds<=9)
    {
    seconds = "0" + seconds;
    }
    ShowTime = day + "&nbsp;" + month + "&nbsp;" + dat + "," +hours + ":" + minutes + ":" + seconds;

    if(document.getElementById)
    {
    document.getElementById("STime").innerHTML = ShowTime
    }
    else if(document.all)
    {
    STime.innerHTML = ShowTime;
    }
    setTimeout("ShowServerTime()", 1000);
    }
    </script>
    <script type="text/JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }

    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    <script src="js/ajax_cat.js"></script>
    <script src="js/ajax.js"></script>
    <script  src="js/SpryEffects.js" type="text/javascript" ></script>
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/jquery-fx.js" type="text/javascript"></script>
    <script src="js/jrails.js" type="text/javascript"></script>
    <script>
    var page = 0;
    function showCategories(chk,firstchk)
    {
    var chkmode=parseInt(chk);

        if(makAx())
        {
          if(chkmode==1)
            {
                page=parseInt(page)-10;
                xm.onreadystatechange = displayCategories1;
            }
            else
            { 
            if(firstchk==0)
            page=0;
            else
            page=parseInt(page)+10;    
            xm.onreadystatechange = displayCategories;
            }
            
            url = "categorydisplay.php?page="+page;
            sendRequest(url)        
        }
    }

    function displayCategories()
    {
        if(xm.readyState==4)
        {
            response = xm.responseText.split("#");
            var s=0;
            for(var i=0;i<response.length-2;i++)
            {
            document.getElementById("category"+s).innerHTML = '<a href="subcat.php?cate_id='+response[i]+'&view=list"'+' class=linksrollovertxt>'+response[++i]+'</a>';
                s=s+1;
            }
            if(s<10)
            {
                var j=0;
                for(var j=s;j<10;j++)
                    {
                        document.getElementById("category"+j).innerHTML = "";
                        document.getElementById("image"+j).style.visibility = "hidden";
                    }
                document.getElementById("nextprev").innerHTML='<a href="javascript:showCategories(1,1);" class="moretxt">Prev</a>';
            }
            else{
                    if(page!=0)
                    {
                        
                        text='<a href="javascript:showCategories(1,1);" class="moretxt">Prev</a>';
                        document.getElementById("nextprev").innerHTML=text+'<a href="javascript:showCategories(2,1)" class="moretxt">Next</a>';
                    }
                                        
                }    
        }
    }

    function displayCategories1()
    {

        if(xm.readyState==4)
        {     
            response = xm.responseText.split("#");
            s=0;
            
            for(i=0;i<response.length-2;i++)
            {
            
                document.getElementById("category"+s).innerHTML = '<a href="subcat.php?cate_id='+response[i]+'&view=list"'+' class=linksrollovertxt>'+response[++i]+'</a>';
                document.getElementById("image"+s).style.visibility = "visible";
                s=s+1;
            }
            //alert(s);
            if(parseInt(page)==0)
            {
                document.getElementById("nextprev").innerHTML='<a href="javascript:showCategories(2,1);" class="moretxt">Next</a>';
                //page=parseInt(page)+10;
                //alert("chk"+page);
            }
            else
            {
            //alert("FF");
                text='<a href="javascript:showCategories(1,1);" class="moretxt">Prev</a>';
                document.getElementById("nextprev").innerHTML=text+'&nbsp&nbsp<a href="javascript:showCategories(2,1)" class="moretxt">Next</a>';
                //page=parseInt(page)-10;
            }
        }
    }
    </script>
    <script type="text/javascript" language="javascript">
           var page1=6;
           function makeRequest(url,modval) {
         //  alert(modval);
             var http_request =false;
              firstFade1.start();
            if (window.XMLHttpRequest) { // Mozilla, Safari,...
                http_request = new XMLHttpRequest();
                if (http_request.overrideMimeType) {
                    http_request.overrideMimeType('text/xml');
                    // See note below about this line
                }
            } else if (window.ActiveXObject) { // IE
                try {
                    http_request = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e) {
                    try {
                        http_request = new ActiveXObject("Microsoft.XMLHTTP");
                    } catch (e) {}
                }
            }

            if (!http_request) {
                alert('Giving up :( Cannot create an XMLHTTP instance');
                return false;
            }
            url+="?pag="+page1;
            if(modval==1)
            page1=page1+6;
            else
            page1=page1-6;
            http_request.onreadystatechange= function () {alertContents(http_request)}; 
            http_request.open('GET', url, true);
            http_request.send(null);

        }

        function alertContents(http_request) {
            if (http_request.readyState == 4) 
                {
                respnse=http_request.responseText
                //alert(respnse);
                setTimeout('demo(respnse)',500);
                }
           }
    function demo(respnse)

        response = respnse.split("<html>");
        response = response[response.length-1].split("</html>");
        eval(response[0]);
        firstFade.start();
           for(var i=0;i<param.length;i++){
                 for(var j=0;j<param[i].length;j++)
                 {
                document.getElementById('prod'+(i+1)+(j+1)).style.display='block';    
                document.getElementById('prod'+(i+1)+(j+2)).style.display='block';    
                 if(j==0||j==2||j==3)
                   document.getElementById('prod'+(i+1)+(j+1)).innerHTML=param[i][j];
                  if(j==1)
                      document.getElementById('prod'+(i+1)+(j+1)).src=param[i][j];    
                  if(j==4)
                  {
                    document.getElementById('prod'+(i+1)+(j+1)).href='detail.php?item_id='+param[i][j];    
                    document.getElementById('prod'+(i+1)+(j+2)).href='detail.php?item_id='+param[i][j];    
                }
                }
            }
            
            if(param.length<6)
         {
         for(var i=param.length;i<6;i++)
             for(var j=0;j<6;j++)
                 {
                //alert("I"+i+"J"+j);        
                    if(j==1)
                         document.getElementById('prod'+(i+1)+(j+1)).src='images/empty.gif';    
                    else
                       document.getElementById('prod'+(i+1)+(j+1)).style.display='none';    
                      
                }
            
        } 
    if(param.length==0)
    {
    document.getElementById    ('prod51').style.display='block';    
    document.getElementById('prod51').innerHTML="No More Items";
    }
            
            
            
            
                    if(param.length<6)
                {
        document.getElementById('hot_next').innerHTML="<a href=javascript:makeRequest('hotitems.php',2) class=moretxt><b>Prev</b></a>";
        page1=page1-12;
                }    
                if(page1==-6)
                {
        document.getElementById('hot_next').innerHTML="<a href=javascript:makeRequest('hotitems.php',1) class=moretxt><b>Next</b></a>";
                page1=6;
                }
            
        
    }
    </script>
    </head>
    <body onload="ShowServerTime();">
    <div id='divv' style=" position:absolute;left:200px;top:100px; background-color:#FFFFFF; display:none; z-index:10000"  onmouseout="hide()"></div>
    <div id="main">
      <div id="header_part">
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
          <td colspan="3"><table width="990" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><table id="Table_01" width="100%" height="133" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td><table id="Table_01" width="428" height="133" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index2_01.gif" width="428" height="8" alt="" /></td>
                          </tr>
                          <tr>
                            <td><table width="428" height="111" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                                <tr>
                                  <td height="111"><div align="center"><a href="index.php">
                                  <img src="http://images.htmlhelpcentral.com/messageboard/images/<?=$sitelogo_fetch['set_value'];?>" width="252" height="111" border="0"/></a></div></td>
                                </tr>
                            </table></td>
                          </tr>
                      </table></td>
                      <td><table id="Table_01" width="526" height="133" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td><table id="Table_01" width="526" height="36" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td><table width="93" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_01.gif">
                                      <tr>
                                        <td width="44">&nbsp;</td>
                                        <!--<td width="49" class="header_text4"><div align="left"><a href="javascript:makeReq('browse_categories.php')" class="header_text4">Buy</a></div></td>-->
                                        <td width="49" class="header_text4"><div align="left"><a href="browse_cate.php" class="header_text4">Buy</a></div></td>
                                      </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_02.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="77" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_03.gif">
                                  <tr>
                                  <td width="33">&nbsp;</td>
                                  <td width="44" class="header_text4"><div align="left"><a href="sell.php" class="header_text4">Sell</a></div></td>                   </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_04.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="113" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_05.gif">
                                      <tr>
                                        <td width="35">&nbsp;</td>
                                        <td width="78" class="header_text4"><div align="left"><a href="myauction.php" class="header_text4">My Auction </a></div></td>
                                      </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_06.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="121" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_07.gif">
                                      <tr>
                                        <td width="37">&nbsp;</td>
                                        <td width="84" class="header_text4"><div align="left"><a href="store_directory.php" class="header_text4">Stores</a></div></td>
                                      </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_08.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="114" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_09.gif">
                                      <tr>
                                        <td width="36">&nbsp;</td>
                                        <td width="78" class="header_text4"><div align="left"><a href="help.php" class="header_text4">Help</a></div></td>
                                      </tr>
                                  </table></td>
                                </tr>
                            </table></td>
                          </tr>
                          <tr>
                            <td><table id="Table_01" width="526" height="97" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td><table width="526" height="42" border="0" cellpadding="0" cellspacing="0" background="images/menu.jpg">
                                      <tr>
                                        <td width="69">&nbsp;</td>
                                        <td width="92" class="header_text6"><div align="left"><a href="index.php" class="header_text6">Home</a></div></td>
                                        <td width="80" class="header_text6"><div align="left" class="header_text6"><a href="pay.php" class="header_text6">Pay</a></div></td>
                                        <td width="99" class="header_text6"><div align="left"><a href="sitemap.php" class="header_text6">Sitemap</a></div></td>
                                        <td width="100" class="header_text6"><div align="left"><a href="about_us.php" class="header_text6">About Us </a></div></td>
                                        <td width="86" class="header_text6"><div align="left"><a href="contact.php" class="header_text6">Contact Us </a></div></td>
                                      </tr>
                                  </table></td>
                                </tr>
                                <tr>
                               <td><table width="526" height="55" border="0" cellpadding="0" cellspacing="0" background="images/index5_02.gif">
         <form name=form2 action="search.php" method=post>
         <tr>
         
                                      </tr>
                                  </table></td>
                                </tr>
                            </table></td>
                          </tr>
                      </table></td>
                      <td><table width="51" height="133" border="0" cellpadding="0" cellspacing="0" background="images/index1_03.gif">
                        <tr>
                          <td width="51">&nbsp;</td>
                        </tr>
                      </table></td>
                    </tr>
                </table></td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td height="5"></td>
          
          
          
          
        </tr>
        <tr>
          <td height="27" colspan="3"><table width="990" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="21">&nbsp;</td>
              <td width="969"><table style="border:1Px solid #9eb1c5" width="962" height="25" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#d8ecff">
                <tr>
                <td width="22">&nbsp;</td>
                <td width="316"><?if(empty($_SESSION['userid'])){?>
                <div align="left"><span class="header_text1">Welcome !</span> <span class="header_text"><a href="signin.php" class="header_text">Sign in</a></span> <span class="header_text1">or</span> <span class="header_text"><a href="user_reg.php" class="header_text">Register.</a></span></div>
                <?}else{?><div align="left"><span class="header_text1">Welcome !</span> <span class="header_text"><a href="feedback.php?user_id=<?=$_SESSION['userid']?>" class="header_text"><?=$_SESSION['username'];?></a></span>  <span class="header_text"><a href="signout.php" class="header_text">Signout</a></span></div><?}?></td>
                <td width="514" class="header_text1"></td>
                <td width="21"><!--<img src="http://images.htmlhelpcentral.com/messageboard/images/livehelp.gif" alt="" width="19" height="20" />--></td>
                <td width="87" class="header_text" style="padding-right:20px"><!--<a href="help" class="header_text2">Live Help</a>--><div align="left" id="STime"></div></td>
              </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td height="4"></td>
        </tr>
      </table>
    </div>
    <script type="text/javascript" language="javascript">
    var element= document.getElementById('divv');

    function eff(msg)
        {
          element.innerHTML=msg;
          element.style.display='block';
          $(element).DropIn();

        }
    function hide()
        {
            $(element).DropOut();

        }
    </script>
    This is how it looks now


    And this is how i would like it to look

  2. #2
    Join Date
    Mar 2012
    Posts
    5

    Question

    Seems no one is replying to my questions. Here is what i have done to show that i have been trying but i just cant seem to make it work. As you can see when i try it only srews up the site with an error. Take a look

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title><?=$_SESSION['site_name']?></title>
    <meta name="keywords" content="<?=$meta_res['key_s']?>" />
    <meta name="description" content="<?=$meta_res['key_s']?>" /> 
    <link href="style/newstyle.css" rel="stylesheet" type="text/css" />
    <script language="javascript">

    var ServerTime = new Date("<?php echo $JavascriptTime?>");

    function ShowServerTime()
    {
    if(!document.all && !document.getElementById)
    {
    return;
    }
    var dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
    mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
    var hours = ServerTime.getHours();
    var minutes = ServerTime.getMinutes();
    var seconds = ServerTime.getSeconds();
    var day=dN[ServerTime.getDay()];
    var month=mN[ServerTime.getMonth()];
    var dat=ServerTime.getDate();
    ServerTime.setSeconds(seconds+1);
       
    if(hours<=9)
    {
    hours = "0" + hours;
    }
    if(minutes<=9)
    {
    minutes = "0" + minutes;
    }
    if(seconds<=9)
    {
    seconds = "0" + seconds;
    }
    ShowTime = day + "&nbsp;" + month + "&nbsp;" + dat + "," +hours + ":" + minutes + ":" + seconds;

    if(document.getElementById)
    {
    document.getElementById("STime").innerHTML = ShowTime
    }
    else if(document.all)
    {
    STime.innerHTML = ShowTime;
    }
    setTimeout("ShowServerTime()", 1000);
    }
    </script>
    <script type="text/JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }

    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    <script src="js/ajax_cat.js"></script>
    <script src="js/ajax.js"></script>
    <script  src="js/SpryEffects.js" type="text/javascript" ></script>
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/jquery-fx.js" type="text/javascript"></script>
    <script src="js/jrails.js" type="text/javascript"></script>
    <script>
    var page = 0;
    function showCategories(chk,firstchk)
    {
    var chkmode=parseInt(chk);

        if(makAx())
        {
          if(chkmode==1)
            {
                page=parseInt(page)-10;
                xm.onreadystatechange = displayCategories1;
            }
            else
            { 
            if(firstchk==0)
            page=0;
            else
            page=parseInt(page)+10;    
            xm.onreadystatechange = displayCategories;
            }
            
            url = "categorydisplay.php?page="+page;
            sendRequest(url)        
        }
    }

    function displayCategories()
    {
        if(xm.readyState==4)
        {
            response = xm.responseText.split("#");
            var s=0;
            for(var i=0;i<response.length-2;i++)
            {
            document.getElementById("category"+s).innerHTML = '<a href="subcat.php?cate_id='+response[i]+'&view=list"'+' class=linksrollovertxt>'+response[++i]+'</a>';
                s=s+1;
            }
            if(s<10)
            {
                var j=0;
                for(var j=s;j<10;j++)
                    {
                        document.getElementById("category"+j).innerHTML = "";
                        document.getElementById("image"+j).style.visibility = "hidden";
                    }
                document.getElementById("nextprev").innerHTML='<a href="javascript:showCategories(1,1);" class="moretxt">Prev</a>';
            }
            else{
                    if(page!=0)
                    {
                        
                        text='<a href="javascript:showCategories(1,1);" class="moretxt">Prev</a>';
                        document.getElementById("nextprev").innerHTML=text+'<a href="javascript:showCategories(2,1)" class="moretxt">Next</a>';
                    }
                                        
                }    
        }
    }

    function displayCategories1()
    {

        if(xm.readyState==4)
        {     
            response = xm.responseText.split("#");
            s=0;
            
            for(i=0;i<response.length-2;i++)
            {
            
                document.getElementById("category"+s).innerHTML = '<a href="subcat.php?cate_id='+response[i]+'&view=list"'+' class=linksrollovertxt>'+response[++i]+'</a>';
                document.getElementById("image"+s).style.visibility = "visible";
                s=s+1;
            }
            //alert(s);
            if(parseInt(page)==0)
            {
                document.getElementById("nextprev").innerHTML='<a href="javascript:showCategories(2,1);" class="moretxt">Next</a>';
                //page=parseInt(page)+10;
                //alert("chk"+page);
            }
            else
            {
            //alert("FF");
                text='<a href="javascript:showCategories(1,1);" class="moretxt">Prev</a>';
                document.getElementById("nextprev").innerHTML=text+'&nbsp&nbsp<a href="javascript:showCategories(2,1)" class="moretxt">Next</a>';
                //page=parseInt(page)-10;
            }
        }
    }
    </script>
    <script type="text/javascript" language="javascript">
           var page1=6;
           function makeRequest(url,modval) {
         //  alert(modval);
             var http_request =false;
              firstFade1.start();
            if (window.XMLHttpRequest) { // Mozilla, Safari,...
                http_request = new XMLHttpRequest();
                if (http_request.overrideMimeType) {
                    http_request.overrideMimeType('text/xml');
                    // See note below about this line
                }
            } else if (window.ActiveXObject) { // IE
                try {
                    http_request = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e) {
                    try {
                        http_request = new ActiveXObject("Microsoft.XMLHTTP");
                    } catch (e) {}
                }
            }

            if (!http_request) {
                alert('Giving up :( Cannot create an XMLHTTP instance');
                return false;
            }
            url+="?pag="+page1;
            if(modval==1)
            page1=page1+6;
            else
            page1=page1-6;
            http_request.onreadystatechange= function () {alertContents(http_request)}; 
            http_request.open('GET', url, true);
            http_request.send(null);

        }

        function alertContents(http_request) {
            if (http_request.readyState == 4) 
                {
                respnse=http_request.responseText
                //alert(respnse);
                setTimeout('demo(respnse)',500);
                }
           }
    function demo(respnse)

        response = respnse.split("<html>");
        response = response[response.length-1].split("</html>");
        eval(response[0]);
        firstFade.start();
           for(var i=0;i<param.length;i++){
                 for(var j=0;j<param[i].length;j++)
                 {
                document.getElementById('prod'+(i+1)+(j+1)).style.display='block';    
                document.getElementById('prod'+(i+1)+(j+2)).style.display='block';    
                 if(j==0||j==2||j==3)
                   document.getElementById('prod'+(i+1)+(j+1)).innerHTML=param[i][j];
                  if(j==1)
                      document.getElementById('prod'+(i+1)+(j+1)).src=param[i][j];    
                  if(j==4)
                  {
                    document.getElementById('prod'+(i+1)+(j+1)).href='detail.php?item_id='+param[i][j];    
                    document.getElementById('prod'+(i+1)+(j+2)).href='detail.php?item_id='+param[i][j];    
                }
                }
            }
            
            if(param.length<6)
         {
         for(var i=param.length;i<6;i++)
             for(var j=0;j<6;j++)
                 {
                //alert("I"+i+"J"+j);        
                    if(j==1)
                         document.getElementById('prod'+(i+1)+(j+1)).src='images/empty.gif';    
                    else
                       document.getElementById('prod'+(i+1)+(j+1)).style.display='none';    
                      
                }
            
        } 
    if(param.length==0)
    {
    document.getElementById    ('prod51').style.display='block';    
    document.getElementById('prod51').innerHTML="No More Items";
    }
            
            
            
            
                    if(param.length<6)
                {
        document.getElementById('hot_next').innerHTML="<a href=javascript:makeRequest('hotitems.php',2) class=moretxt><b>Prev</b></a>";
        page1=page1-12;
                }    
                if(page1==-6)
                {
        document.getElementById('hot_next').innerHTML="<a href=javascript:makeRequest('hotitems.php',1) class=moretxt><b>Next</b></a>";
                page1=6;
                }
            
        
    }

    </script>
    <style type="text/css">
    #searchwrapper {
    width:310px; /*follow your image's size*/
    height:40px;/*follow your image's size*/
    background-image:url(THE_SEARCH_BOX_IMAGE);
    background-repeat:no-repeat; /*important*/
    padding:0px;
    margin:0px;
    position:relative; /*important*/
    }
     
    #searchwrapper form { display:inline ; }
     
    .searchbox {
    border:0px; /*important*/
    background-color:transparent; /*important*/
    position:absolute; /*important*/
    top:4px;
    left:9px;
    width:256px;
    height:28px;
    }
     
    .searchbox_submit {
    border:0px; /*important*/
    background-color:transparent; /*important*/
    position:absolute; /*important*/
    top:4px;
    left:265px;
    width:32px;
    height:28px;
    }
    </style>
    </head>

    <body onload="ShowServerTime();">
    <div id='divv' style=" position:absolute;left:200px;top:100px; background-color:#FFFFFF; display:none; z-index:10000"  onmouseout="hide()"></div>
    <div id="main">
      <div id="header_part">
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
          <td colspan="3"><table width="990" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><table id="Table_01" width="100%" height="133" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td><table id="Table_01" width="428" height="133" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index2_01.gif" width="428" height="8" alt="" /></td>
                          </tr>
                          <tr>
                            <td><table width="428" height="125" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                                <tr>
                                  <td><div align="center"><a href="index.php">
                                  <img src="http://images.htmlhelpcentral.com/messageboard/images/<?=$sitelogo_fetch['set_value'];?>" width="252" height="111" border="0"/></a></div></td>
                                </tr>
                            </table></td>
                          </tr>
                      </table></td>
                      <td><table id="Table_01" width="526" height="133" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td><table id="Table_01" width="526" height="36" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td><table width="93" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_01.gif">
                                      <tr>
                                        <td width="44">&nbsp;</td>
                                        <!--<td width="49" class="header_text4"><div align="left"><a href="javascript:makeReq('browse_categories.php')" class="header_text4">Buy</a></div></td>-->
                                        <td width="49" class="header_text4"><div align="left"><a href="browse_cate.php" class="header_text4">Buy</a></div></td>
                                      </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_02.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="77" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_03.gif">
                                  <tr>
                                  <td width="33">&nbsp;</td>
                                  <td width="44" class="header_text4"><div align="left"><a href="sell.php" class="header_text4">Sell</a></div></td>                   </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_04.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="113" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_05.gif">
                                      <tr>
                                        <td width="35">&nbsp;</td>
                                        <td width="78" class="header_text4"><div align="left"><a href="myauction.php" class="header_text4">My Auction </a></div></td>
                                      </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_06.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="121" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_07.gif">
                                      <tr>
                                        <td width="37">&nbsp;</td>
                                        <td width="84" class="header_text4"><div align="left"><a href="store_directory.php" class="header_text4">Stores</a></div></td>
                                      </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_08.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="114" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_09.gif">
                                      <tr>
                                        <td width="36">&nbsp;</td>
                                        <td width="78" class="header_text4"><div align="left"><a href="help.php" class="header_text4">Help</a></div></td>
                                      </tr>
                                  </table></td>
                                </tr>
                            </table></td>
                          </tr>
                          <tr>
                            <td><table id="Table_01" width="526" height="97" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td><table width="526" height="42" border="0" cellpadding="0" cellspacing="0" background="images/menu.jpg">
                                      <tr>
                                        <td width="69">&nbsp;</td>
                                        <td width="92" class="header_text6"><div align="left"><a href="index.php" class="header_text6">Home</a></div></td>
                                        <td width="80" class="header_text6"><div align="left" class="header_text6"><a href="pay.php" class="header_text6">Pay</a></div></td>
                                        <td width="99" class="header_text6"><div align="left"><a href="sitemap.php" class="header_text6">Sitemap</a></div></td>
                                        <td width="100" class="header_text6"><div align="left"><a href="about_us.php" class="header_text6">About Us </a></div></td>
                                        <td width="86" class="header_text6"><div align="left"><a href="contact.php" class="header_text6">Contact Us </a></div></td>
                                      </tr>
                                  </table></td>
                                </tr>
                                <tr>
                               <td></td>
                              
                                </tr>
                            </table></td>
                          </tr>
                      </table></td>
                      <td><table width="51" height="133" border="0" cellpadding="0" cellspacing="0" background="images/index1_03.gif">
                        <tr>
                          <td width="51">&nbsp;</td>
                        </tr>
                      </table></td>
                    </tr>
                </table></td>
              </tr>
          </table></td>
        </tr>
        <tr>
         #searchwrapper {
    width:310px; /*follow your image's size*/
    height:40px;/*follow your image's size*/
    background-image:url(THE_SEARCH_BOX_IMAGE);
    background-repeat:no-repeat; /*important*/
    padding:0px;
    margin:0px;
    position:relative; /*important*/
    }
     
    #searchwrapper form { display:inline ; }
     
    .searchbox {
    border:0px; /*important*/
    background-color:transparent; /*important*/
    position:absolute; /*important*/
    top:4px;
    left:9px;
    width:256px;
    height:28px;
    }
     
    .searchbox_submit {
    border:0px; /*important*/
    background-color:transparent; /*important*/
    position:absolute; /*important*/
    top:4px;
    left:265px;
    width:32px;
    height:28px;
    }

          <td height="5"><div id="searchwrapper"><form action="">
    <input type="text" class="searchbox" name="s" value="" />
    <input type="image" src="THE_BLANK_SUBMIT_BUTTON_IMAGE" class="searchbox_submit" value="" />
    </form>
    </div></td>
        </tr>
        <tr>
          <td height="27" colspan="3"><table width="990" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="21">&nbsp;</td>
              <td width="969"><table style="border:1Px solid #9eb1c5" width="962" height="25" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#d8ecff">
                <tr>
                <td width="22">&nbsp;</td>
                <td width="316"><?if(empty($_SESSION['userid'])){?>
                <div align="left"><span class="header_text1">Welcome !</span> <span class="header_text"><a href="signin.php" class="header_text">Sign in</a></span> <span class="header_text1">or</span> <span class="header_text"><a href="user_reg.php" class="header_text">Register.</a></span></div>
                <?}else{?><div align="left"><span class="header_text1">Welcome !</span> <span class="header_text"><a href="feedback.php?user_id=<?=$_SESSION['userid']?>" class="header_text"><?=$_SESSION['username'];?></a></span>  <span class="header_text"><a href="signout.php" class="header_text">Signout</a></span></div><?}?></td>
                <td width="514" class="header_text1"></td>
                <td width="21"><!--<img src="http://images.htmlhelpcentral.com/messageboard/images/livehelp.gif" alt="" width="19" height="20" />--></td>
                <td width="87" class="header_text" style="padding-right:20px"><!--<a href="help" class="header_text2">Live Help</a>--><div align="left" id="STime"></div></td>
              </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td height="4"></td>
        </tr>
      </table>
    </div>
    <script type="text/javascript" language="javascript">
    var element= document.getElementById('divv');

    function eff(msg)
        {
          element.innerHTML=msg;
          element.style.display='block';
          $(element).DropIn();

        }
    function hide()
        {
            $(element).DropOut();

        }
    </script>
    Hope someone can shine a light my way because i am little confuse.
    thanks again in adavnce

  3. #3
    Join Date
    Mar 2012
    Posts
    5

    Unhappy

    Hi, Ok i have been working on it for a long time and i finally put the search box where i want it but now the problem i am having is making the search box height bigger. I managed to get the width the way i want it but now the height is the only thing i need help i really appreciate if someone can help me. I was thinking maybe i can add something on the CSS script to make its height bigger. In dreamweaver i tried but it only makes it into a larger text box with a scroll down option. So i am too sure how i can make search box height bigger. Here is the code.


    Thank you in advance.


    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title><?=$_SESSION['site_name']?></title>
    <meta name="keywords" content="<?=$meta_res['key_s']?>" />
    <meta name="description" content="<?=$meta_res['key_s']?>" /> 
    <link href="style/newstyle.css" rel="stylesheet" type="text/css" />
    <script language="javascript">
    var ServerTime = new Date("<?php echo $JavascriptTime?>");

    function ShowServerTime()
    {
    if(!document.all && !document.getElementById)
    {
    return;
    }
    var dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
    mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
    var hours = ServerTime.getHours();
    var minutes = ServerTime.getMinutes();
    var seconds = ServerTime.getSeconds();
    var day=dN[ServerTime.getDay()];
    var month=mN[ServerTime.getMonth()];
    var dat=ServerTime.getDate();
    ServerTime.setSeconds(seconds+1);
       
    if(hours<=9)
    {
    hours = "0" + hours;
    }
    if(minutes<=9)
    {
    minutes = "0" + minutes;
    }
    if(seconds<=9)
    {
    seconds = "0" + seconds;
    }
    ShowTime = day + "&nbsp;" + month + "&nbsp;" + dat + "," +hours + ":" + minutes + ":" + seconds;

    if(document.getElementById)
    {
    document.getElementById("STime").innerHTML = ShowTime
    }
    else if(document.all)
    {
    STime.innerHTML = ShowTime;
    }
    setTimeout("ShowServerTime()", 1000);
    }
    </script>
    <script type="text/JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }

    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    </head>

    <body onload="ShowServerTime();">
    <div id="main">
      <div id="header_part">
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
          <td colspan="3"><table width="990" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><table id="Table_01" width="100%" height="133" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td><table id="Table_01" width="428" height="133" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index2_01.gif" width="428" height="8" alt="" /></td>
                          </tr>
                          <tr>
                            <td><table width="428" height="125" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                                <tr>
                                  <td><div align="center">
                                  <a href="index.php">
                                  <img src="http://images.htmlhelpcentral.com/messageboard/images/<?=$sitelogo_fetch['set_value'];?>" width="252" height="111" border="0"/>
                                  </a>
                                  </div></td>
                                </tr>
                            </table></td>
                          </tr>
                      </table></td>
                      <td><table id="Table_01" width="526" height="133" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td><table id="Table_01" width="526" height="36" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td><table width="93" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_01.gif">
                                      <tr>
                                        <td width="44">&nbsp;</td>
                                        <!--<td width="49" class="header_text4"><div align="left"><a href="javascript:makeReq('browse_categories.php')" class="header_text4">Buy</a></div></td>-->
                                        <td width="49" class="header_text4"><div align="left"><a href="browse_cate.php" class="header_text4">Buy</a></div></td>
                                      </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_02.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="77" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_03.gif">
                                      <tr>
                                        <td width="33">&nbsp;</td>
                                        <td width="44" class="header_text4"><div align="left"><a href="sell.php" class="header_text4">Sell</a></div></td>
                                      </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_04.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="113" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_05.gif">
                                      <tr>
                                        <td width="35">&nbsp;</td>
                                        <td width="78" class="header_text4"><div align="left"><a href="myauction.php" class="header_text4">My Auction </a></div></td>
                                      </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_06.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="121" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_07.gif">
                                      <tr>
                                        <td width="37">&nbsp;</td>
                                        <td width="84" class="header_text4"><div align="left"><a href="store_directory.php" class="header_text4">Stores</a></div></td>
                                      </tr>
                                  </table></td>
                                  <td><img src="http://images.htmlhelpcentral.com/messageboard/images/index4_08.gif" width="2" height="36" alt="" /></td>
                                  <td><table width="114" height="36" border="0" cellpadding="0" cellspacing="0" background="images/index4_09.gif">
                                      <tr>
                                        <td width="36">&nbsp;</td>
                                        <td width="78" class="header_text4"><div align="left"><a href="help.php" class="header_text4">Help</a></div></td>
                                      </tr>
                                  </table></td>
                                </tr>
                            </table></td>
                          </tr>
                          <tr>
                            <td><table id="Table_01" width="526" height="97" border="0" cellpadding="0" cellspacing="0">
                              <tr>
                            <td><table width="526" height="42" border="0" cellpadding="0" cellspacing="0" background="images/menu.jpg">
                             <tr>
                             <td width="69">&nbsp;</td>
                                        <td width="92" class="header_text6"><div align="left"><a href="index.php" class="header_text6">Home</a></div></td>
                                        <td width="80" class="header_text6"><div align="left" class="header_text6"><a href="pay.php" class="header_text6">Pay</a></div></td>
                                        <td width="99" class="header_text6"><div align="left"><a href="sitemap.php" class="header_text6">Sitemap</a></div></td>
                                        <td width="100" class="header_text6"><div align="left"><a href="about_us.php" class="header_text6">About Us </a></div></td>
                                        <td width="86" class="header_text6"><div align="left"><a href="contact.php" class="header_text6">Contact Us </a></div></td>
                                      </tr>
                                  </table></td>
                                </tr>
                            </table></td>
                          </tr>
                      </table></td>
                      <td><table width="51" height="133" border="0" cellpadding="0" cellspacing="0" background="images/index1_03.gif">
                        <tr>
                          <td width="57">&nbsp;</td>
                        </tr>
                      </table></td>
                    </tr>
                </table></td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td height="28" ><table width="958" height="24" border="0" cellpadding="0" cellspacing="0" background="&nbsp;">
         <form name="form2" action="search.php" method="post">
         <tr>
         <td width="396" height="24"><label>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="product" type="text" value="" maxlength="800" size="50" />
         </label></td>
         <td width="143"><label>
         <select name="cbocat">
         <option value="all">All categories</option>
        <?
        $sql12
    ="select * from category_master where category_head_id=0 order by category_name"
        
    $recordset12=mysql_query($sql12);
        while(
    $record12=mysql_fetch_array($recordset12))
            {
                
    ?>
                <option value=<?= $record12[category_id]?>><?= $record12[category_name]?> </option>
                <?
            
    }
        
    ?>
        </select>
        <input type="hidden" name="mode" value="easy">
        </label></td> 
        <td width="81"><div align="left">
        <input type=image src="http://images.htmlhelpcentral.com/messageboard/images/search.gif" name="btnSearch" width="62" height="22" border="0" id="Image60" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image60','','images/searcho.gif',1)"/></div></td><td width="338" class="header_text5"><div align="left"><a href="advanced_search.php" class="header_text5">Advanced Search </a></div></td>
                                      </tr>
                                      </form>
          </table></td>
        </tr>
       <tr>
          <td height="27" colspan="3"><table width="990" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="21">&nbsp;</td>
              <td width="969"><table style="border:1Px solid #9eb1c5" width="962" height="25" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#d8ecff">
                <tr>
                <td width="22">&nbsp;</td>
                <td width="316"><?if(empty($_SESSION['userid'])){?>
                <div align="left"><span class="header_text1">Welcome !</span> <span class="header_text"><a href="signin.php" class="header_text">Sign in</a></span> <span class="header_text1">or</span> <span class="header_text"><a href="user_reg.php" class="header_text">Register.</a></span></div>
                <?}else{?><div align="left"><span class="header_text1">Welcome !</span> <span class="header_text"><a href="feedback.php?user_id=<?=$_SESSION['userid']?>" class="header_text"><?=$_SESSION['username'];?></a></span>  <span class="header_text"><a href="signout.php" class="header_text">Signout</a></span></div><?}?></td>
                <td width="514" class="header_text1"></td>
                <td width="21"><!--<img src="http://images.htmlhelpcentral.com/messageboard/images/livehelp.gif" alt="" width="19" height="20" />--></td>
                <td width="87" class="header_text" style="padding-right:20px"><!--<a href="help" class="header_text2">Live Help</a>--><div align="left" id="STime"></div></td>
              </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td height="4"></td>
        </tr>
      </table>
    </div>
    Last edited by leaning html; 04-11-2012 at 11:56 PM.

  4. #4
    Join Date
    Nov 2012
    Posts
    64
    <!-- this script got from www.javascriptfreecode.com coded by: Krishna Eydat-->
    <SCRIPT language=JavaScript>
    var NS4 = (document.layers);
    var IE4 = (document.all);
    var win = window;
    var n = 0;
    function findInPage(str) {
    var txt, i, found;
    if (str == "")
    return false;
    if (NS4) {
    if (!win.find(str))
    while(win.find(str, false, true))
    n++;
    else
    n++;
    if (n == 0)
    alert("Not found.");
    }
    if (IE4) {
    txt = win.document.body.createTextRange();
    for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
    txt.moveStart("character", 1);
    txt.moveEnd("textedit");
    }
    if (found) {
    txt.moveStart("character", -1);
    txt.findText(str);
    txt.select();
    txt.scrollIntoView();
    n++;
    }
    else {
    if (n > 0) {
    n = 0;
    findInPage(str);
    }
    else
    alert("Sorry, we couldn't find.Try again");
    }
    }
    return false;
    }
    </SCRIPT>

    <FORM name=search onsubmit="return findInPage(this.string.value);">
    <P align=center><FONT size=3>
    <INPUT
    style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid"
    onchange="n = 0;" size=16 name=string></FONT><BR><INPUT style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #aaaaaa" type=submit value=Search in page ><center><font size=2pt;><font family=Times New Roman;><b>


    <font face="Tahoma"><a target="_blank" href="http://www.javascriptfreecode.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>

    <BR>
    </P></FORM></DIV><BR><!-- /Search-->
    Web Development Services - Web Development Services
    SEO Services - SEO Services

Similar Threads

  1. Search Box
    By Raindiamond515 in forum Miscellaneous
    Replies: 1
    Last Post: 06-25-2006, 07:44 AM
  2. Text Search
    By Quintaro in forum HTML / XHTML / XML
    Replies: 2
    Last Post: 07-02-2003, 10:44 AM
  3. Search
    By botmog in forum HTML / XHTML / XML
    Replies: 4
    Last Post: 06-02-2003, 03:00 PM
  4. Search Engine Help
    By Max2002 in forum HTML / XHTML / XML
    Replies: 3
    Last Post: 05-02-2002, 10:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBadvanced CMPS v4.1.1