Click to See Complete Forum and Search --> : 1 Link To Trigger 2 Different Frames - Is It Possible?
Sloppy Jalopy
06-15-2003, 05:22 PM
can somebody please help:
i am using dreamweaver. i would like a link in my navigation frame to open a document in the main frame and a different one in the actuall navigation frame. i suspect this is not possible, but could anyone offer some advice on ways around this. i would like a user to be presented with more links in the navigation frame relating to the page in the main frame as and when they select a link from the navigation frame.
i hope this makes sence.
hastx
06-15-2003, 05:29 PM
The only way I know of to target two frames at once is with javascript. I'll look into it, unless someone else has it in mind already.
Charles
06-15-2003, 05:34 PM
Originally posted by hastx
The only way I know of to target two frames at once is with javascript. I'll look into it, unless someone else has it in mind already. If you use the JavaScript method then your page will fail for the 13% of users who do not use JavaScript. Instead, have you link load a new frameset identical to the existing one but with the desired documents in their proper frames. If you have just a few links, then make a frameset for each link. For a larger site you will need to generate the framesets on the fly using a server side script.
Sloppy Jalopy
06-15-2003, 05:55 PM
nice one hastx and charles for your speedy responces. i 'think' i know what you mean charles - i'll give what i think you have explained a try and see how i go.
many thanks again guys.
@work
06-16-2003, 10:11 AM
how would a server-side script like the one you suggested work, out of curiosity?
Charles
06-16-2003, 02:51 PM
#!user/local/bin/perl
use CGI qw(:standard -no_xhtml);
my $doctype = qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">\n|;
print header, $doctype, html ({lang=>'en'}, title('My Happy Frameset'), frameset({cols=>'150, *'}, frame({name=>'navigation', src=>param('left')}), frame({name=>'main', src=>param('right')}),noframes(p('The frame free version of this site can be found at ', a({href=>'noframes.html'}, 'noframes.html'), '.'))));