Gossamer Forum
Home : Products : DBMan : Installation :

html.pl / frames

Quote Reply
html.pl / frames
1.)Is it possible to load a new frameset (including a html.pl with results) after a search.
2.) Is it possible to "link" a search with a frameset or banner. Example: A user searches for "Computers", the results is shown and a Computershop-Banner in a second frame. Different search = different banner.

I hope this is understandable and I am looking forward for any ideas.
Thanks
Quote Reply
Re: html.pl / frames In reply to
Any idea anybody?
Quote Reply
Re: html.pl / frames In reply to
Sure this is possible!
In html.pl in your view_success sub...

Frames:

Use an OnLoad JavaScript function--
Place this code between the <head></head> tags...

<SCRIPT LANGUAGE="JavaScript">
function your_function_name(frame) {
if (frame == "name_of_banner_frame")
open(document.getsite.site.value,frame);
return 0;
}
</SCRIPT>

This code in your <body></body> tags...

<BODY BGCOLOR="#ffffff" onLoad="your_function_name('name_of_banner_frame')">
<FORM NAME="getsite" METHOD="post">
<input type="hidden" name="site" value="http://www.yoursite.com/|;
if ($in{'keyword'} eq computer) {
print qq|computer_banner|;
}
elseif ($in{'keyword'} eq monitor) {
print qq|monitor_banner|;
}
else {
print qq|default_banner|;
}
print qq|.html"></form>



Create an html page for each banner you want to display. The JavaScript will reload your banner frame once the search results page has loaded, with the appropriate banner page. Specify as many "elseifs" as you want. Just make sure to specify an "else" with a default banner so the page won't come up blank if the keyword does't match any of your "elseifs".


Let me know if this helps,
Chris
webmaster@racedaze.com

[This message has been edited by ChrisE (edited March 24, 1999).]