PDA

View Full Version : Html Code For Open New Window And Redirect



RealitY
10-06-2004, 07:03 AM
Could someone tell me the html code for open in new window and how to redirect one of my web pages also...

uNz[i]
10-06-2004, 07:28 AM
To make a link open a new window, add target="_blank" to the link code.
Can't help with the redirect though. Sorry.

BawA
10-06-2004, 07:39 AM
target="_blank" For opening new blank page
Example: if u want to open a link in new window

<a href="http://www.dot.com" target="_blank">
And for Image:

<a href="http://www.dot.com" target="_blank"><img src="http://www.dot.com/image.gif"

Redirecting: Give Any value u want in "Content" For directing Delay and replace the URl

<meta http-equiv=Refresh content="8; URL=www.dot.com">

RealitY
10-06-2004, 07:59 PM
Thanks, how about the code for printing and bookmarking also...

BawA
10-06-2004, 08:33 PM
<a href="javascript:addbookmark()">Add this site to favorites</a>

RealitY
10-07-2004, 02:36 AM
Thanks again but that sure would appear right but didnt work when I tested...

uNz[i]
10-07-2004, 10:47 AM
Add to favorites link works with IE, but not Opera or Moz based browsers.
As far as I'm aware, anyway.

motherflux
10-07-2004, 02:08 PM
the target attribute is deprecated.

RealitY
10-07-2004, 03:46 PM
the target attribute is deprecated.
Not sure what that means and I am using IE to test but it dont work...

motherflux
10-07-2004, 05:32 PM
it should work, but it is no longer a part of the standards as of XHTML 1.0 strict.

your link should look like this
<a href="http://www.whatever.com" target="_blank">link text</a>

mini sparsely
10-07-2004, 05:51 PM
Could someone tell me the html code for open in new window and how to redirect one of my web pages also...
To redirect try this in the <head> section (example):



<meta http-equiv="refresh" content="1;url=http://filesharingtalk.com/vb3/index.php?">

motherflux
10-07-2004, 07:12 PM
and if you use the code posted above by mini sparsely, be sure to add a space and a / at the end of the <meta /> tag.
;)

or in php you can do


header("Location:http://www.whatever.com/index.html");

:01:

RealitY
10-08-2004, 06:10 AM
What I was referring wasnt working was...

<a href="javascript:addbookmark()">Add this site to favorites</a>

The others are fine.