Switch to full style
HTML,DHTML,Javascript,XML,CSS
Post a reply

new window using javascript

Fri Jan 02, 2009 4:00 pm

Hi Friends,
I have a situation here. I want a page to be loaded immediately when the browser(any) is clicked. It can be set to home page. But, I want to do it using java script. How to do?
And , I want another page or tab to be opened when that page opens.i.e. Pop up. If, its clicked one time, cookie has to be set and should not pop-up again.
Expecting your code or logic. Thank you.


Last edited by DrRakha on Sat Jan 03, 2009 11:40 am, edited 1 time in total.
Reason: Title changed :)

Re: WEb Browser

Sat Jan 03, 2009 11:39 am

Using the
Code:
window.open('url to open','window name','attribute1,attribute2')


This function will allow you to open in a new window

1. 'url to open'
The URL address of the web page you are going to open.

2. 'window name'
Name of the window (To make a Reference to it later)

3. 'attribute1,attribute2'
There many attributes , you chose the attribute you want to adjust in it.

Example on using it

Code:
<FORM>
<INPUT type="button" value="Open window!" onClick="window.open('http://www.www.codemiles.com','Codemiles Community','width=400,height=200')">
</FORM>


Re: new window using javascript

Tue Jan 06, 2009 10:38 am

Thanks for you reply. But, this is not what i want. This opens a new window. But, for setting up as home page..
document.body.style.behavior= 'url(#default# homepage) ';
document.body.setHomePage("http://www.yahoo.com");

This piece of code works with IE5 and other browser with less compatability. But nopt with mozilla or IE7. I need a code for this. If possible kindly help me on this. Thank you.
-jena

Post a reply
  Related Posts  to : new window using javascript
 open/close new window using javascript     -  
 First Visit Pop Up Window javascript code     -  
 Reload a Window With a Button javascript code     -  
 BLACK WINDOW     -  
 Window Tabifier     -  
 Window Through C Language     -  
 Open in a new window help     -  
 Window 7 problem....     -  
 difference between a Window and a Frame     -  
 Open a link in a new window?     -