By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,666 Members | 1,784 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,666 IT Pros & Developers. It's quick & easy.

Radio Button response - continued.

P: 11
Hey.
I thought id make a seperate discusion because the other became a bit lengthy and confusing.

Aim:
Create a php file which works with the script below, which makes the radiobuttons work =D
Right, when say mp3 radio button is selected, and say BLA is typed in the text box. I would like it to open up
Expand|Select|Wrap|Line Numbers
  1. http://www.google.com/search?hl=en&q=blaa%20intitle%3A%22index.of%22+%22parent+directory%22+%22size%22+%22last+modified%22+%22description%22+%5Bsnd%5D+%28mp4%7Cmp3%7Cavi%7Cflac%7Caac%7Cape%7Cogg%29+-inurl%3A%28jsp%7Cphp%7Chtml%7Caspx%7Chtm%7Ccf%7Cshtml%7Clyrics-realm%7Cmp3-collection%29+-site:.info
and when smething else is selected, google, just which a different search command.... i hope that makes sense.


This is the script i have found, which is incomplete.
I would like help completing the form post action bit, help making the php script which the command is posted to to make google open with each different commands.

Here is the (maybe)incomplete script:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.  
  3. <Script LANGUAGE="JavaScript">
  4. <!--
  5. var Message = "- wwwwwwwazuuuuuuuuuuup -";
  6.  
  7. var Leftspace = "      ";
  8. var Rightspace = "                            ";
  9.  
  10. var message1 = Leftspace + Message + Rightspace;
  11. var dir = "left";
  12. var speed = "100";
  13.  
  14. function bounce(){
  15.  
  16.     if (dir == "left"){
  17.  
  18.         var message2 = message1.substring(2,message1.length) + "  ";
  19.         window.status = message2;
  20.         setTimeout("bounce()", speed);
  21.         message1 = message2;
  22.         if (message1.substring(0,1) == "-") dir="right";
  23.     }
  24.  
  25.     else{
  26.  
  27.         message2 = "  " + message1.substring(0,message1.length-2);
  28.         window.status = message2;
  29.         setTimeout("bounce()", speed);
  30.         message1 = message2;
  31.         if (message1.substring(message1.length-1,message1.length) == "-") dir="left";
  32.     }
  33.  
  34. }
  35.  
  36. bounce();
  37. // -->
  38. </Script>
  39. <head>
  40.   <META NAME="Googlebot" CONTENT="nofollow">
  41.  
  42.  
  43. <title>Get the best out of google!</title>
  44.   <meta name="description" content="BliZmA's GooGeR">
  45. <style type="text/css">
  46. body{padding:0;margin:0;font-family:arial;font-size:11px}textarea,INPUT{font-size:12;border-color:#888888;background:#FFF;border-style:solid;border-width:1px}td{font-size:12px}#foo{background:#eeedf1;border-bottom:thin solid #6f559d;padding:4;font-weight:bold;margin-bottom:20}a{color:#113388;line-height:14pt;text-decoration:none;font-weight:none;font-family:Arial;font-size:12px;}a:hover{background:#eeeeff}a.bl:link{padding-left:14px;background:url(blog/list.gif) no-repeat 0px 5px}a.bl:visited{background:url(blog/list_checked.gif) no-repeat 0px 3px;padding-left:14px}a.bl:hover{background:url(blog/list_hover.gif) no-repeat 0px 3px}#engine,input.radio{border:none}
  47. </style>
  48. </head>
  49.  
  50. <body onload="window.defaultstatus='';">
  51. <script language=JavaScript>m='%3Cscript%20language%3DJavaScript%3E%3C%21--%0D%0A%0D%0Avar%20message%3D%22Function%20Disabled%21%22%3B%0D%0A%0D%0Afunction%20clickIE%28%29%20%20%7Bif%20%28document.all%29%20%7Balert%28message%29%3Breturn%20false%3B%7D%7D%0D%0Afunction%20clickNS%28e%29%20%7Bif%20%0D%0A%28document.layers%7C%7C%28document.getElementById%26%26%21document.all%29%29%20%7B%0D%0Aif%20%28e.which%3D%3D2%7C%7Ce.which%3D%3D3%29%20%7Balert%28message%29%3Breturn%20false%3B%7D%7D%7D%0D%0Aif%20%28document.layers%29%20%0D%0A%7Bdocument.captureEvents%28Event.MOUSEDOWN%29%3Bdocument.onmousedown%3DclickNS%3B%7D%0D%0Aelse%7Bdocument.onmouseup%3DclickNS%3Bdocument.oncontextmenu%3DclickIE%3B%7D%0D%0A%0D%0Adocument.oncontextmenu%3Dnew%20Function%28%22return%20false%22%29%0D%0A%0D%0A//%20--%3E%3C/script%3E';d=unescape(m);document.write(d);</script>
  52.   <center>
  53.     <script type="text/javascript">
  54.  
  55. search='<input type="radio" name="engine" id="engine" value="mp3s" CHECKED> <b>MP3 Music<\/b> <input type="radio" name="engine" id="engine" value="large"> Albums / Large Files <input type="radio" name="engine" id="engine" value="torrents"> Torrents <input type="radio" name="engine" id="engine" value="univ"> Free University Courses <input type="radio" name="engine" id="engine" value="pdf"> PDF Documents <input type="radio" name="engine" id="engine" value="ringtones"> Ringtones <input type="radio" name="engine" id="engine" value="youtube"> Youtube / Viewcount<\/div>';
  56.  
  57. news='<input type="radio" name="engine" id="engine" value="googlenews" CHECKED> Google News\r\n<input type="radio" name="engine" id="engine" value="bbc"> BBC <input type="radio" name="engine" id="engine" value="ap"> AP <input type="radio" name="engine" id="engine" value="reuters"> Reuters';
  58.  
  59. directory='<input type="radio" name="engine" id="engine" value="dmoz" CHECKED> DMOZ \r\n<input type="radio" name="engine" id="engine" value="yahoodirectory"> Yahoo Directory';
  60.  
  61. torrents='<input type="radio" name="engine" id="engine" value="piratebay" CHECKED> The Pirate Bay <input type="radio" name="engine" id="engine" value="torrentspy"> TorrentSpy \r\n<input type="radio" name="engine" id="engine" value="isohunt"> ISOHunt ---- Also see <a href="http://89.149.194.215/list_news.html">NewNova<\/a>, <a href="http://www.mininova.org/">MiniNova<\/a>, and <a href="http://scrapetorrent.com/index.php">ISOScrape<\/a>';
  62.  
  63. video='<input type="radio" name="engine" id="engine" value="googlevideo" CHECKED> Google Video\r\n<input type="radio" name="engine" id="engine" value="youtube"> Youtube\r\n<input type="radio" name="engine" id="engine" value="metacafe"> MetaCafe\r\n<input type="radio" name="engine" id="engine" value="archive"> Archive.org';
  64.  
  65. developers='<input type="radio" name="engine" id="engine" value="codebase" CHECKED> Codebase <input type="radio" name="engine" id="engine" value="oreilly"> Oreilly <input type="radio" name="engine" id="engine" value="koders"> Coders <input type="radio" name="engine" id="engine" value="codefetch"> Codefetch <input type="radio" name="engine" id="engine" value="phpdocs"> PHP Docs ---- Also see <a href=="http://www.krugle.com/">Krugle<\/a>';
  66.  
  67. education='<input type="radio" name="engine" id="engine" value="wikipedia" CHECKED> Wikipedia\r\n<input type="radio" name="engine" id="engine" value="citeseer"> Citeseer\r\n<input type="radio" name="engine" id="engine" value="googlescholar"> Google Scholar\r\n<input type="radio" name="engine" id="engine" value="googleanswers"> Google Answers<input type="radio" name="engine" id="engine" value="answers"> Answers.com\r\n<input type="radio" name="engine" id="engine" value="yahooanswers"> Yahoo Answers';
  68. function foo(x){
  69. heh.innerHTML=x;
  70. document.tehmonkey.search.focus();
  71. }
  72. </script>
  73.  
  74.     <div id="foo">
  75.       Search: <a href="javascript:foo(search)">General</a> | <a href=
  76.       "javascript:foo(education)">Education</a> | <a href="javascript:foo(directory)">Directory</a>
  77.       | <a href="javascript:foo(news)">News</a> | <a href="javascript:foo(video)">Vids</a> |
  78.       <a href="javascript:foo(developers)">Developers</a> | <a href=
  79.       "javascript:foo(torrents)">Torrents</a>|***************<span style="font-size:18px">Created
  80.       by <a href="index.html" style="font-size:18px">BliZmA</a></span>
  81.     </div>
  82.  
  83.     <form name="tehmonkey" style="margin:-10 0 5 10" id="tehmonkey" action=
  84.     "test.php" method="post" target="_blank">
  85.       <br>
  86.       <input type="text" name="search" id="search" maxlength='60' size='45' value=""> <input type=
  87.       "submit" value="Search"><br>
  88.       <br>
  89.  
  90.       <div id="heh"></div><script type="text/javascript">
  91. foo(search);
  92. </script>
  93.     </form><br>
  94.     <br>
  95.   </center>
  96. </body>
  97. </html>
  98.  

Aparently it is easy, but maybe teidious writting the same thing out for the 'radio button response php page' (i dont know what the propper name for it is).

If someone could write the main thing with 2 examples of the openurl command or so? enough so i could copy paste n figure out the rest would be EXELENT!!!
Oct 15 '07 #1
Share this Question
Share on Google+
3 Replies


P: 11
still needing help on this..
thanks.
Oct 17 '07 #2

Markus
Expert 5K+
P: 6,050
still needing help on this..
thanks.
Japhill, from what i understand, you're not a coder.. you just simply take other peoples codes. If you were actually trying to work on this and not just get people to write scripts for you - i might help, but until then; please stopping making threads on this subject.
Oct 17 '07 #3

ronverdonk
Expert 2.5K+
P: 4,258
This is a duplicate from the other Radio Button thread in this forum. When you open a problem stick with it and do not open other threads to get more attention. It only annoys people.

moderator
Oct 17 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.