develooper Front page | perl.beginners | Postings from February 2002

Re: off topic : frames html question

Thread Previous | Thread Next
From:
Jenda Krynicky
Date:
February 27, 2002 01:51
Subject:
Re: off topic : frames html question
Message ID:
3C7CB9F5.15949.813FC72@localhost
From:           	"Rahul Garg" <rahul@shaktipro.com>
> I have a html page which has many hyperlinks.
> Now each hyperlink at present calls another html page that has two 
> frames(horizontally).Ist frame is same for all links. Now second frame
> is also same but has many bookmarks. I want that on clicking difft.
> hyperlinks they should lead to their bookmarks.
> 
> How is it possible or nany references.

Either generate the frameset page from a script so that you could 
specify the bookmarks:

	#!perl
	use CGI qw(param);
	$bookmark = param('bookmark');

	print <<"*END*";
	Content-type: text/html

	<HTML>
	<FRAMESET>
	<FRAME ... SOURCE="left_pane.html">
	<FRAME ... SOURCE="right_pane.html#$bookmark">
	</frameset>
	</HTML>
	*END*
	__END__

and use links like
	<A HREF="/the_cgi.pl?bookmark=Something" 
target="Whatever">


Another option is to use JavaScript.
You'll open the second window, store the handle to the created 
window, and then use links like :

	<A href="goTo('Something')"

where goTo() is defined as

	<SCRIPT>
	function goTo(bm) {
		JavaScript:otherwnd.framename.location.hash = bm;
		return;
	}
	</SCRIPT>

HTH, Jenda

=========== Jenda@Krynicky.cz == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
					--- me

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About