Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-31-2008, 03:27 AM   PM User | #1
PoohJoon
New to the CF scene

 
Join Date: May 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
PoohJoon is an unknown quantity at this point
Question pop up javascript - help?

Hello,
I'm a novice and have been using the following for pop ups because it was the first one I found (that I could understand!) that prevented pages from jumping back to top when a new window opened.
It works great for most of the pop ups I need, except ones that contain a large amount of content (eg: an article, someone else's website) where scrolling is required.
Could someone please pretty please help me either figure out how to adjust this code to allow scrolling, or a better code to use.

JAVASCRIPT

function popitupArticles(url) {
newwindow=window.open(url,'name','width=800');
if (window.focus) {newwindow.focus()}
return false
}


HTML
<a href="newsArticle.html" onclick="return popitupArticles('newsArticle.html')">News Article</a>

Thank you very much for your time!
PJ
PoohJoon is offline   Reply With Quote
Old 05-31-2008, 03:38 AM   PM User | #2
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
Add the highlighted:
Code:
newwindow=window.open(url,'name','width=800,scrollbars=1');
For further reading:
http://www.javascript-coder.com/wind...dow-open.phtml

Hope that helps.
__________________
Learn how to javascript at 02geek

The more you learn, the more you'll realize there's much more to learn
Ray.ph
rangana is offline   Reply With Quote
Old 05-31-2008, 04:50 AM   PM User | #3
PoohJoon
New to the CF scene

 
Join Date: May 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
PoohJoon is an unknown quantity at this point
yey!!! thank you so much that works like a charm!
phew! i'm so glad i didn't have to change a bunch of code

thank you for helping a self taught designer learn something new
cheers!
PJ
PoohJoon is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:40 PM.


Advertisement
Log in to turn off these ads.