WiredWX Christian Hobby Weather Tools
Would you like to react to this message? Create an account in a few clicks or log in to continue.

WiredWX Christian Hobby Weather ToolsLog in

 


descriptionHTML Code - open in a new window EmptyHTML Code - open in a new window

more_horiz
Can anyone help me edit this code so it opens a new window rather than in an exsisting window.

Thank You

[url=][/url]

Last edited by darrylrixon on 18th December 2009, 11:19 am; edited 1 time in total

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz

Code:

<script src="http://www.onenewspage.com/widget_js.php?cat=UK&qs=Housing+Market&fgc=40FF40&bgc=000000&hdc=C0FFC0&bdc=008000"></script><noscript></noscript>

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
darrylrixon - You need to add code tags, cause filters have blocked out your post.

Code:

<a href="www.google.co.uk" target=_blank>Google!</a>

............................................................................................

Site Admin / Security Administrator

Virus Removal ~ OS Support ~ Have we helped you? Help us! ~ GeekChat
- Please PM me if I fail to respond within 24hrs.
HTML Code - open in a new window DXwU4
HTML Code - open in a new window VvYDg

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
How do you add code tags?

Code:

<script src="http://www.onenewspage.com/widget_js.php?cat=UK&qs=Housing+Market&fgc=40FF40&bgc=000000&hdc=C0FFC0&bdc=008000"></script><noscript></noscript>
[code]

Figured it out how to display the code

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
Figured it out how to display the code - just need to know how to make it open in a new window

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
target=_blank bit does that.

............................................................................................

Site Admin / Security Administrator

Virus Removal ~ OS Support ~ Have we helped you? Help us! ~ GeekChat
- Please PM me if I fail to respond within 24hrs.
HTML Code - open in a new window DXwU4
HTML Code - open in a new window VvYDg

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
Where to in insert that please?

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
Hello.
If you are using this script:

Code:

<script src="http://www.onenewspage.com/widget_js.php?cat=UK&qs=Housing+Market&fgc=40FF40&bgc=000000&hdc=C0FFC0&bdc=008000"></script><noscript></noscript>


Not too sure why your adding it in that piece of coding though because script src just loads a script file, it's not an actual link to somewhere else.

The bit I showed you comes after the href link, so the new script will be:

Code:

<a href="www.google.co.uk" target=_blank>Google!</a>


target=_blank always goes after the link bit.

Last edited by Belahzur on 18th December 2009, 1:04 pm; edited 2 times in total

............................................................................................

Site Admin / Security Administrator

Virus Removal ~ OS Support ~ Have we helped you? Help us! ~ GeekChat
- Please PM me if I fail to respond within 24hrs.
HTML Code - open in a new window DXwU4
HTML Code - open in a new window VvYDg

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
Its not showing your edited link?

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
Whoopsie. LMBO or ROFL Fixed now.

............................................................................................

Site Admin / Security Administrator

Virus Removal ~ OS Support ~ Have we helped you? Help us! ~ GeekChat
- Please PM me if I fail to respond within 24hrs.
HTML Code - open in a new window DXwU4
HTML Code - open in a new window VvYDg

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
Actually, Belahzur, your tag may spawn errors.

Correct Syntax (All browsers):

Code:

<a href="http://www.google.com" target="_blank" title="Google!" alt="Google!" name="default.link!browser" />Google!</a>


Result:
Google!

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
You could also do the following if you don't want to you use the target attribute (which isn't standards-compliant in XHTML 1.0 strict or XHTML 1.1):

Code:

<a href="http://www.google.com/" ~onclick="window.open(this.href); return false;">Link Text</a>


Delete the ~ before use though, I had to put that in or this site would've filtered "onclick" out.

I've tested this approach in Opera 10, FF 3.6, IE8, and Safari 3, but I'm pretty sure it works in most browsers being used today.

You could also wire up this behavior unobtrusively.

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
Something to watch for is the "Quirks mode". In other words, you need to make sure you find an option that works well. What I used to do is, I had different versions of what I needed to do based on the browser. I also didn't user browser version to do things because it may not always see the right browser you are using. Instead I would use different syntax if I really had to make sure it needs to work without making visitors mad. So if this doesn't work do this or do this etc.
I think quirks mode is the biggest problem with the browsers. Google it, I don't know what links I am allowed to post here.

P.S. I also like SomeDude's approach.

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
If you want to use html code correctly you should use html tutorials.

descriptionHTML Code - open in a new window EmptyRe: HTML Code - open in a new window

more_horiz
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum