Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search Query 1

Status
Not open for further replies.

obrien48

Programmer
May 14, 2007
2
GB
hey guys,

I got a script from the web which uses javascript to search keywords and writes the results via cookies to another window, I'm using it to search html pages containing images (web gallery) there's about 1000 images so what I wanted was to have athumb nail appear from the link page into an iframe (as source), I've got the code to write an iframe whrere I want it but can't populate it with the correct link/syntax - I need it to read the same link that is written for the results (linksitem) and use it for the iframe source.

I've cut the section of code that it applies to beloww:

output.document.write('<hr>');
output.document.write("<b>No matches resulted in this search </b> <br>");
output.document.write("You may close the results and reduce the length/number of the keywords <br>");
}
else
{

output.document.write(" <hr> <b> The Results of the search are : </b> ");
output.document.write( found[0] +" Entries found ".italics());
output.document.write("<table border=1 width=100%>");
for (i=1; i<=found[0];i++)

{
output.document.write("<tr><td valign=topbgcolor=#9999ff>");
output.document.write("<h3>" +i +"</h3>"); output.document.write("<td valign=top>");
itemp=found;
output.document.write(desc[itemp].bold() +"<br>" +links[itemp].link(links[itemp])+"<br>");
temp= (matched[itemp]/keywords[0])*100
output.document.write("<i> Matched with keywords :: "+temp+" % </i>" );
output.document.write("<td valign=top>");

IFRAME HERE NEEDS TO BE POPUKLATED WITH THE ITEMPP INFO FROM ABOVE ([itemp].link(links[itemp])

output.document.write("<iframe name='thumb' src=''>");
matched[itemp]=0
}
found[0]=0;
output.document.write("</table>");
}
output.document.write ('This search was created by &copy <a href="http:\\dutta.home.ml.org"> Satadip Dutta</a> 1997'); output.document.write ("<hr>");
output.document.write ("<form><center>");
output.document.write ("<input type='button' value='Start Another Search' onClick = 'self.close()'>") ;
output.document.write ("</center></form>");
output.document.close();

If anyone could help me out on this one it would beg greatt.

Kind regards
Alan
 
(1) I have seen pages with too many issues with IFRAMES (pages even blow up if too many).

Please help me understand whether you could consider avoiding igframes and placing the image in an IMG as part of a link to the page.

I am thinking of something like:

Code:
<a href="[URL unfurl="true"]www.google.com"[/URL] target="_blank"><img src="google_thumb.jpg" width=100 height=75></a>

(2) I assume that you have a directory containing all the thumbnail images that you want.
 
yeh, that sounds fine, I was going for I frames aws I thought that they could display the html (slide) but the iimg is fine, where could I put the code? and could it be linked to the search results this code is writing out?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top