Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: can this be achieved ?

  1. #1
    Join Date
    May 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question can this be achieved ?

    Hello all. I am the noobi admin of easyfilesearch.com. Anyway if you could take a look @ it, itíll help you understand my issue. I know itís not the best looking or the most interactive page out there but it gets the job done. However I would like to have my home page and a search page separately but I still would like to have the ability to initiate the search from the home page. I donít want to just link to a search page. In other words I donít want that <iframe> on the home page but I would like to keep the search bar with the tabs and once a search is initiated it would load the search page with the results along with the search criteria as well . my problem is that I have no idea where to start. Any suggestions will be greatly appreciated.

  2. #2
    Join Date
    Aug 2006
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    in my limited knowledge of js and php, i dont think thats possible.

  3. #3
    Join Date
    May 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    if not php , what then?

  4. #4
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    This is quite simple, and won't require PHP. The trick is the action attribute of the form. You can send the data anywhere you want. If you could give me a link right to the search page, I could help you.

  5. #5
    Join Date
    May 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i have not made one yet because i didn't want to design it before i know how to get it to work. but it'll be pretty much a replica of the home page with the exception of a few design changes located @ root http://easyfilesearch.com/search.html
    i put one up at that url for testing . btw thanx for your help bro i really appreciate it.
    Last edited by shumbora; 02-10-2007 at 07:48 PM. Reason: forgot to out the page extention (.html)

  6. #6
    Join Date
    Aug 2006
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    can you rephrase your question, shumbora? i didnt quite understand the first time.

  7. #7
    Join Date
    May 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok you see how the page is now.. where you can chose what site you what to search and then type your search criteria and finally clicking search or pressing enter to initiate the search via the iframe right blew. i want it to do the same thing but instead of the results appearing in an iframe on the home page , it'll do so on another page in an iframe in say search.html along with the search criteria in case they want to keep searching so they dont have to come back to the home page to do so. in other words i want my home page and a search page separate but have the ability to initiate the search from the home page. i hope that makes it more clear.

  8. #8
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Ok, I lied Now that you showed me the search page, I can see that it will require a little javascript. Add this to the head of the search page.

    Code:
    <script type="text/javascript">
    function getQueryValue(name) {
        var match = (new RegExp('[?&;]' + name + '=([^&;#]*)')).exec(document.URL);
        return match ? unescape(match[1]) : null;
    }
    function load(){
    	engine1(getQueryValue('engine'),getQueryValue('go'));
    }
    window.load = load;
    </script>
    And your search form on the other page should look like this.
    Code:
    <DIV id="tabcontentcontainer">
    <div id="sc1" class="tabcontent">
    <center>
    <form method="get" action="search.html">
         <span class="set_as">Set as default torrent engine:</span> 
         <input type="checkbox" onclick="setDefault()" name="dodefault" />
    	 <select name="engine" class="drop_down">
            <option value="-1" selected="selected">Torrent Search</option>
            <option value="15">Mini Nova</option>
    
    		<option value="26">Torrent Spy</option>
            <option value="25">Iso Hunt </option>
    	    <option value="12">Bit Junkie</option>
    		<option value="18">Demonoid</option>
    		<option value="10">My Bittorrent</option>
    		<option value="9">MegaNova</option>
    
            <option value="20">Bit Nova</option>
            <option value="2">New Torrents</option>
            <option value="4">Piratic</option>
            <option value="37">The Pirate Bay</option>
            <option value="21">Torrentbox</option>
            <option value="1">Torrent Reactor</option>
    
            <option value="24">Torrent Valley</option>
            <option value="8">2 Torrents</option>
            <option value="28">Monova</option>
            <option value="3">Bittorrent.com</option>
            <option value="6">Nova Torrents</option>
            <option value="7">Linux Tracker</option>
    
            <option value="11">Download Anime</option>
            <option value="13">Frozen layer</option>
            <option value="22">Torrents Bol</option>
            <option value="23">Zomb Tracker</option>
            <option value="0">H33t</option>
            <option value="38">Smart Torrent</option>
    
            <option value="31">Bt Emuparadise</option>
            <option value="27">Indy Torrents</option>
            <option value="32">Hunt Park Insider</option>
            <option value="35">Ultimate Bit Board</option>
            <option value="36">Arab Files</option>
            
    		</select>
    
            <input name="go" class="text_field" type="text" id="tx1" 
    		onKeyUp="document.form2.tx2.value=this.value;document.form3.tx3.value=this.value; document.form4.tx4.value=this.value;">
            <input name="submit" type="submit" class="search_button" value="Search" />
          </form>
    		
    	</center>
    		<center><div id="reminder">Not sure what to do? Then read our comprehensive step by step <a href="http://easyfilesearch.com/forums/viewtopic.php?t=27">Bittorrent tutorial</a>.</div>
    </center>
    </div>
    <div id="sc2" class="tabcontent">
    <center>
    
    <form method="get" action="search.html">
             <span class="set_as">Set as default irc engine:</span> 
         <input type="checkbox" onclick="setDefault()" name="dodefault2" />
    		<select name="engine" class="drop_down">
            <option value="-1" selected="selected">Irc Search</option>
            <option value="54">Irc Spy</option>
    	    <option value="49">Packet News</option>
            <option value="50">Search Irc</option>
    
            <option value="51">My Downloader</option>
            <option value="52">Gogloom</option>
            <option value="53">Irc Netsplit</option>
            
            </select>
            <input name="go" class="text_field" type="text" id="tx2" onKeyUp= "document.form1.tx1.value=this.value;document.form3.tx3.value=this.value; document.form4.tx4.value=this.value;">
            <input name="submit" type="submit" class="search_button" value="Search" />
    </form>
    <div id="reminder">Not sure what to do? Then read our comprehensive step by step <a href="#" onclick="MM_popupMsg('Sorry but the IRC Tutorials are under construction , please check back soon!')">IRC tutorial</a>.</div>
    
    </center>
    </div>
    <div id="sc3" class="tabcontent">
    <center>
    <form method="get" action="search.html">
            <span class="set_as">Set as default ftp engine:</span> 
         <input type="checkbox" onclick="setDefault()" name="dodefault3" />
    		<select name="engine" class="drop_down">
            <option value="-1" selected="selected">FTP Search</option>
            <option value="61">Rambler</option>
    
            <option value="62">File Watcher</option>
            <option value="63">Free Ware Web</option>
            <option value="64">FTP Search Elmundo</option>
    		<option value="66">File Searching</option>
            
          </select>
          <input name="go" class="text_field" type="text" id="tx3" onKeyUp= "document.form1.tx1.value=this.value;document.form2.tx2.value=this.value;document.form4.tx4.value=this.value;">
          <input name="submit" type="submit" class="search_button" value="Search" />
    
          </form>
    	  <div id="reminder">Not sure what to do? Then read our comprehensive step by step <a href="#" onclick="MM_popupMsg('Sorry but the FTP Tutorials are under construction, please check back soon')">FTP tutorial</a>.</div>
    </center>
    </div>
    <div id="sc4" class="tabcontent">
    <center>
    <form method="get" action="search.html">
         <span class="set_as">Set as default search engine:</span> 
         <input type="checkbox" onclick="setDefault()" name="dodefault4" />
    	 <select name="engine" class="drop_down">
    
            <option value="-1" selected="selected">Search Engines</option>
            <option value="73">Google</option>
    		<option value="74">Yahoo</option>
            <option value="75">Windows Live</option>
    	    <option value="76">All The Web</option>
    		<option value="78">Altavista</option>
    
    		<option value="79">Ask</option>
    		</select>
            <input name="go" class="text_field" type="text" id="tx4" 
    		onKeyUp="document.form2.tx2.value=this.value;document.form3.tx3.value=this.value; document.form1.tx1.value=this.value;">
            <input name="submit" type="submit" class="search_button" value="Search" />
          </form>
    		
    	</center>
    		<center><div id="reminder">Not sure what to do? Then read our comprehensive step by step <a href="http://easyfilesearch.com/forums/viewtopic.php?t=27">Search Engines tutorial</a>.</div>
    
    </center>
    </div>
    </DIV>
    It still needs the javascript files though.

    PS: This code is very bad accessibility wise. However, the code before was just as bad, so whatever.

  9. #9
    Join Date
    May 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    did you get to test the code? because when i did what you suggested and searched for i don't know say billy bob , it loads the search page but nothing happens as if i was referred to the page via a text link and this appears @ the address bar "http://easyfilesearch.com/search.html?engine=15&go=billy+bob&submit=Search" but nothing happens here take a look
    http://easyfilesearch.com/test20.html
    please let me know if I've done something wrong or didnt follow your instructions properly.

  10. #10
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Sorry, small typo. I didn't test it because there wasn't that much to screw up. I pretty much messed up the only thing possible Put this code in the head of search.html(notice the red, that is what I changed)
    Code:
    <script type="text/javascript">
    function getQueryValue(name) {
        var match = (new RegExp('[?&;]' + name + '=([^&;#]*)')).exec(document.URL);
        return match ? unescape(match[1]) : null;
    }
    function load(){
    	engine1(getQueryValue('engine'),getQueryValue('go'));
    }
    window.onload = load;
    </script>

Bookmarks

Posting Permissions

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