JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old June 17th, 2005, 05:51 AM
jules213 jules213 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 13 jules213 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 43 sec
Reputation Power: 0
window.open question

Hi there,

I have found some tutorials on opening pop-up windows. One has said that there is good and bad javascript to do this, good being code that accommodates a browser without javascript recognition. This tutorial has suggested writing the pop up window like this:

<a href="file.htm" onclick="window.open(this.href); return false;">click here</a>

This works a treat and i get the logic behind it being good code. But it didn't explain how to add the variables, such as sizing, adding/removing bars, etc. I have a list of the variables, and understand how to impliment them in the code which was deemed 'bad' (or i guess is alternative) but can't figure out how to attach them to this code above.

Could anyone please point out how to do it, or a link to a tutorial which has this information?

Many thanks,

Jules

Reply With Quote
  #2  
Old June 17th, 2005, 07:44 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
Try something like:

<a href="file.htm" onclick="window.open(this.href, null, "height=200,width=400,status=yes,toolbar=no,menubar =no,location=no"); return false;">click here</a>

This is a good reference for what to put in those options.

Reply With Quote
  #3  
Old June 17th, 2005, 07:58 AM
jules213 jules213 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 13 jules213 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 43 sec
Reputation Power: 0
Thanks for the try, but it didn't seem to work. tried a few variations and still no joy.

Another question though. I found another method:

<a href="javascript:location='../index.htm';window.open('../HELPplayerlinks.htm', 'RealPlayer Links', 'height=400,
width=420, chrome=yes, scrollbars=yes')">Get a free copy of RealPlayer</a>

which worked a treat in NN but IE just kept on returning to the location page (ie the index)...

Any suggestions,

cheers, Jules

Reply With Quote
  #4  
Old June 17th, 2005, 08:12 AM
jules213 jules213 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 13 jules213 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 43 sec
Reputation Power: 0
Ok, it is very possible (due to not knowing Javascript) that i misinterpreted your post... apologies, but i have found the code in a tutorial, and it appears to work on both IE and NN. It is:


<a href="../HELPplayerlinks.htm" onClick="window.open('../HELPplayerlinks.htm', 'volc', 'status,resizable,scrollbars,width=420,height=300' );
return false">Get a free copy of RealPlayer</a>

it appears that by losing the this.href and replacing it with the url again, it works.

Thanks though.

Jules

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > window.open question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway