Open two search pages using input |
Open two search pages using input |
nihilObstat |
Jul 20 2008, 10:24 PM
Post
#1
|
Group: Members Posts: 4 Joined: 20-July 08 Member No.: 6,222 |
Hi all,
My first foray onto this forum, and a rare attempt at writing in html! I'm trying to write a page that will just be stored on the local computer most likely, to search the PirateBay and Mininova (for educational purposes, of course) for a term that is entered by the user. Main page elements so far are a text box for input of the search term, a 'Submit' button, and then the template of the search address for the two torrent sites. I've had a look around the net and can't find the answers I need. Can someone please explain in newby terms how to 'insert' the search term in the address for the search page (on clicking the 'Submit' button), and then open that page in a new browser tab. I'm using Firefox 3 on Vista Home Premium, writing the html in PageBreeze Free. thanks, Peter PS - the code so far: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <meta name="GENERATOR" content="PageBreeze Free HTML Editor (http://www.pagebreeze.com)"> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" > <title>Torrent searcher</title> <style> <!-- h1 { font-family: Arial, sans-serif; font-size: 30px; } h2 { font-family: Arial, sans-serif; font-size: 18px; } body,p,b,i,em,dt,dd,dl,sl,caption,th,td,tr,u,blink,select,option,form,div,li { font-family: Arial, sans-serif; font-size: 12px; } --> </style> </head> <body bgcolor="#ffffff"> <h1 align="center"> Torrent searcher</h1> <h2 align="center"><img height="427" hspace="0" src="keyword-torrent.jpg" width=548 border=0> </h2> <h2 align="center"><input name="SearchItem"> <input type="submit" value="Submit" name="Submit"> </h2> <p align="center">Enter search term here</p> <p align="center">Pages will open in PirateBay and Mininova, ordered by seeds</p> http://www.mininova.org/search/"SearchItem"/seeds http://thepiratebay.org/search/"Searc...m"/0/7/200 </body> </html> |
nihilObstat |
Jul 20 2008, 11:50 PM
Post
#2
|
Group: Members Posts: 4 Joined: 20-July 08 Member No.: 6,222 |
Can I just add together a string like in VB? (I have done quite a bit of coding in VB6).
For example: site1 = "http://www.mininova.org/search/" & SearchItem & "/seeds" site2 = "http://thepiratebay.org/search/" & SearchItem & "/0/7/200" This post has been edited by nihilObstat: Jul 20 2008, 11:51 PM |
nihilObstat |
Jul 21 2008, 09:03 AM
Post
#3
|
Group: Members Posts: 4 Joined: 20-July 08 Member No.: 6,222 |
bump ... do i need to use css or javasript for this?
|
pandy |
Jul 21 2008, 09:29 AM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Hardly CCS. Possibly JS. It depends on if those sites accept the query in the URL.
|
nihilObstat |
Jul 22 2008, 02:34 AM
Post
#5
|
Group: Members Posts: 4 Joined: 20-July 08 Member No.: 6,222 |
if i just type the address as i set it out above into the address bar, with 'batman' substituted for "SearchItem" it gives me what i want.
can this be done with html ????????? i don't want to sound clueless but ... i am really. I'm quite happy to research but i don't know where to start. the reason i asked if css could be useful is because this page suggests you can use the target-new property of a css to specify 'open in a new tab'. and i saw something else that looked like you could use js to streamline accepting input. thanks for any advice, peter |
Christian J |
Jul 22 2008, 06:32 AM
Post
#6
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
if i just type the address as i set it out above into the address bar, with 'batman' substituted for "SearchItem" it gives me what i want. can this be done with html ????????? No. With an HTML form you can only append the search item as a query string (a server-side mechanism might change it to its desired format, though). To insert the search item in the middle of a URL you might use javascript. |
Lo-Fi Version | Time is now: 25th April 2024 - 01:12 PM |