homepage Welcome to WebmasterWorld Guest from 54.196.196.62
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Pop-Up to display only specified part of page
can it be done?
stavs




msg:561149
 5:24 pm on Sep 24, 2001 (gmt 0)

Is it possible to display only part of a page in a pop-up window?

I want to somehow specify for the pop-up not to display the top 3 inches of the page it refers to - but to just display everything after that.

I'd be glad of some help on this, friends.

 

mivox




msg:561150
 5:38 pm on Sep 24, 2001 (gmt 0)

Have you tried putting an anchor on the target page, where you want the pop-up display to begin, and then targeting the pop-up URL to the anchor location? (ie- http*//www.mysite.com/targetpage#popup)

stavs




msg:561151
 5:40 pm on Sep 24, 2001 (gmt 0)

Thanks for that Mivox but the page doesn't belong to me so I can't add any anchor to it.

Am I asking for the impossible here?

mivox




msg:561152
 6:01 pm on Sep 24, 2001 (gmt 0)

I can't think of any way to do it, but someone around here may pop up with a workable solution...

tedster




msg:561153
 6:38 pm on Sep 24, 2001 (gmt 0)

I was playing around with scrollBy() and scrollTo() methods. But you would need them to kick in onLoad -- so that technique would also mean changing the code in the pop-up's document as well. Right now I'm stumped.

jatar_k




msg:561154
 7:29 pm on Sep 24, 2001 (gmt 0)

You could parse it and only display after a certain piece of code but it seems like a lot of overhead.

I assume you want whatever information gets updated other wise you could grab the page content, make your own page and display what you want, maybe with links to the full site.

stavs




msg:561155
 10:30 pm on Sep 24, 2001 (gmt 0)

yes the info updates every day - but the layout remains the same.

> You could parse it and only display after a certain piece of code but it seems like a lot of overhead.

sounds interesting - tell me more

NFFC




msg:561156
 10:56 pm on Sep 24, 2001 (gmt 0)

Thinking aloud, display the page in an iframe and position a layer over the top of the stuff you want to hide.

stavs




msg:561157
 1:03 am on Sep 25, 2001 (gmt 0)

Thanks NFFC, that would probably work, though it would leave quite a large heading, albeit blank or in my specified colours.

Since my original post I have found another source where this technique is not required, i.e. no header to worry about.

But if anyone else has a suggestion, I'd be glad to hear it as I'm sure I could find uses for it in the future.

jatar_k




msg:561158
 1:31 am on Sep 25, 2001 (gmt 0)

I'll give you the parsing info even though you seem to have solved the problem. You could use php to open and read the page and then find an unchangable piece of code (body tag or the last image that you want to leave out) and then use regular expressions and cut off everything before that and prepend you own header. I am not the regex expert but I could ask the guy who does them for me if you really want to know.

joshie76




msg:561159
 10:42 am on Sep 25, 2001 (gmt 0)

The easiest way to do this is remotely attach an event to the popup window...

<script>
function goScroll()
{
//put your scrolling code here targetting the 'popup' window.
//Use the scrolling methods tedster mentioned.
}

popup = window.open("www.yoururl.com/page.htm","popup")

//you'll need to browser sniff here:
window.top.popup.attachEvent('onload',goScroll) //this one for IE
window.top.popup.onLoad = goScroll() //this one for netscape nav

</script>

This *should* work and should avoid any parsing.

Fixit




msg:561160
 11:34 pm on Oct 1, 2001 (gmt 0)

Have you tried applying a negative value to margin-top

stavs




msg:561161
 1:12 am on Oct 2, 2001 (gmt 0)

thanks for your help, chaps

can't get the negative margin to work though - it sounded great ;)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved