Total members 11894 |It is currently Thu Nov 21, 2024 1:56 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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.
Title changed :)


Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time

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>


_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

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


Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time
Post new topic Reply to topic  [ 3 posts ] 

  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     -  
 Open in a new window help     -  
 Window 7 problem....     -  
 BLACK WINDOW     -  
 Window Tabifier     -  
 Window Through C Language     -  
 GridLayout-window with buttons     -  
 Set scope on main window     -  









Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com