Welcome to WebmasterWorld Guest from 54.198.200.157

Forum Moderators: incrediBILL

Message Too Old, No Replies

Pop-Up to display only specified part of page

can it be done?

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

Preferred Member

10+ Year Member

joined:Mar 23, 2001
posts:402
votes: 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.

5:38 pm on Sept 24, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member mivox is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 6, 2000
posts:3928
votes: 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)
5:40 pm on Sept 24, 2001 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 23, 2001
posts:402
votes: 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?

6:01 pm on Sept 24, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member mivox is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 6, 2000
posts:3928
votes: 0


I can't think of any way to do it, but someone around here may pop up with a workable solution...
6:38 pm on Sept 24, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 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.
7:29 pm on Sept 24, 2001 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15756
votes: 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.

10:30 pm on Sept 24, 2001 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 23, 2001
posts:402
votes: 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

10:56 pm on Sept 24, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member nffc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 22, 2000
posts:3604
votes: 0


Thinking aloud, display the page in an iframe and position a layer over the top of the stuff you want to hide.
1:03 am on Sept 25, 2001 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 23, 2001
posts:402
votes: 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.

1:31 am on Sept 25, 2001 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15756
votes: 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.
10:42 am on Sept 25, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 10, 2001
posts:793
votes: 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

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

Inactive Member
Account Expired

 
 


Have you tried applying a negative value to margin-top
1:12 am on Oct 2, 2001 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 23, 2001
posts:402
votes: 0


thanks for your help, chaps

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

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members