NYCPHP Meetup

NYPHP.org

[nycphp-talk] iframe Top of page?

Peter Sawczynec ps at sun-code.com
Tue Jul 10 18:16:45 EDT 2007


I'm not sure I get your problem exactly, but whether you are on the web
page inside the iframe or on the parent web page that contains the
iframe you can force your self to a certain position on a web page by
using HTML anchor tags.

You put the (hidden) anchor tag at the top of your main menu:
<a name="menutop"></a>

And the link to the main menu top anchor is like so:
<a href="#menutop">Return to main menu</a>

A link to an anchor tag will force the web page to scroll up to it. This
is a potential solution.

Additionally, I believe you can even do URL hrefs like this, that will
go to webpage.htm and move to the posiiton of anchor menutop:
http://www.exanmple.com/webpage.htm#menutop

But, my raw HTML gets a bit foggy nowadays.

Warmest regards, 
 
Peter Sawczynec 
Technology Dir.
Sun-code.com 
Web related services 
646.316.3678 
ps at sun-code.com




-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Nicholas Hart
Sent: Tuesday, July 10, 2007 2:19 PM
To: talk at lists.nyphp.org
Subject: Re: [nycphp-talk] iframe Top of page?


Hi,

Does anyone know how to force an iframe to handle varying page lengths  
such that it starts back at the top of the page each time?  I have a  
menu.php called from an iframe in index.php.  This menu calls  
balances.php, workdues.php, etc which have varying page lengths  
depending on the data displayed.  Upon pressing 'Return to main menu'  
I am left to scroll back up - as the menu is a much shorter page than  
all others.  How do you handle this?

Any thoughts or suggestions much appreciated.  Thanks.

-- 
Nicholas Hart
Music Performance Fund




_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php






More information about the talk mailing list