ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Open a new window with JavaScript?

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> JavaScript / DHTML / HTML / CSS
View previous topic :: View next topic  
Author Message
jon



Joined: 01 Oct 2004
Posts: 40

PostPosted: Sun Oct 10, 2004 7:39 pm    Post subject: Open a new window with JavaScript? Reply with quote

How do I open a new window from my main page with JavaScript. I would appreciate if you can post sample code.


Thanks,

jon
Back to top
View user's profile Send private message
pepper



Joined: 10 Oct 2004
Posts: 5

PostPosted: Mon Oct 11, 2004 8:49 am    Post subject: Reply with quote

Hey Jon,

You can open new popup window in JavaScript with the window.open method or you can use a normal link with target="_blank" attribute.
Check the examples below:

Code:
window.open("your_page.htm", "JS popup", "width=255, height=255, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no");


Code:

<a href="your_page.htm" target="_blank">Open New Window</a>



Cheers
_________________
Hot Pepper :/
Back to top
View user's profile Send private message
paul



Joined: 11 Oct 2004
Posts: 128

PostPosted: Mon Oct 11, 2004 9:28 am    Post subject: Reply with quote

pepper is correct. I would use the window.open JavaScript method, because you have some control over the popup if you open it this way.
_________________
World Countries | Survival Skills
Back to top
View user's profile Send private message
raven



Joined: 31 Jan 2006
Posts: 41

PostPosted: Tue Jan 31, 2006 6:01 pm    Post subject: Reply with quote

paul wrote:
pepper is correct. I would use the window.open JavaScript method, because you have some control over the popup if you open it this way.


Is there another manner you can open a window with JS? Your answer seems to indicate there is. Why would you never use that option or better question might be when would you use it?
_________________
Programmers do it in code
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> JavaScript / DHTML / HTML / CSS All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial