Jump to content

[SOLVED] Put block of html page lookup numbers into search script input


HowdeeDoodee

Recommended Posts

My web pages have alpha numeric lookup codes. Currently, the user has to copy the numbers and paste the numbers into a search box and click on the query button. Is there any way, other than turning the block into html hyperlinks, of getting the lookup codes into a php form input box or text box and initiating the search without copying and pasting?

 

Example:

pen 124:22 ; joyce 3:1 ; twice 888888:1233 ; rip 999:777

im not sure what you want to do, but i will try.

 

if you are looking for a dropdown box method (which i wouldnt suggest considering how large it could get), then you would have to dynamically fill the options list and make an on select trigger that would redirect you to the next page.

 

however, if you just want to paste the code in and go without clicking a button, you could use the "onchange" event to trigger a peice of script that would redirect you to the entered page.

 

 

i still dont get why you would want to do this though... the query button is fine.

I did not explain well, it must be the heat. OK, let's try this another way. Let's say the lookup codes are Bible references, like Gen. 4:22; Exodus 1:12; Lev. 3:11

 

On any given record there are hundreds of these references. I want the user to be able to click on a link or a button next to each group of references. Currently, there is no button and no link in the record. What I want is for the user to be able to click on the link or the button so another program will grab the referenes and paste the references into a lookup script. The lookup script will then display the actual text of the verses instead of just the references. The lookup script calls another program to display the text.

 

 

try

<?php

//draw a table this is an example of a link
$ref[0] = "gen 1:12";
$ref[1] = "exd 2:31";
foreach($ref as $value){
<a href=\"www.serch.php?critera=".$value."\">".$value."</a>
}
//on search page
$critera = $_GET['critera'];
$q = "SELECT FROM Table Where Ref = '$critera'";
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.