Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS and Javascript and Open New Window? 2

Status
Not open for further replies.

danielh68

Technical User
Jul 31, 2001
431
US
Hi

I'm building this site at and I have encountered a little problem --by the way not all the links are working.

Anyhow, a CSS is applied to the leftframe. When you hover over them they illuminate somewhat, except for WebMail. The reason is the javascript is interfering with the CSS.

Here's the code for the WebMail link:

<span class=&quot;navbar&quot; onClick=&quot;NewWindow=window.open(' Webmail</span>

Here's the code of one of the links that work:

<span class=&quot;navbar&quot;><a href=&quot;fags.htm&quot; target=&quot;mainFrame&quot;>FAQs</a></span>

So is there anyway to get the Webmail link to behave like the others?

Your expertise is greatly appreciated.

--DanH
 
It appears that the actual css might be referencing the anchor tags inside a navbar class. Try (temporarily) placing
Code:
<a>
tags around the word Webmail and see if it starts acting more like the others.

Or switch it to:
Code:
<span class=&quot;navbar&quot;><a href=&quot;#&quot; onClick=&quot;NewWindow=window.open('[URL unfurl="true"]http://mail.optihost.net','WebMail','width=500,height=400')&quot;>[/URL] Webmail</a></span>

-Tarwn
&quot;If you eat a live toad first thing in the morning, nothing worse will happen all day long.&quot; - California saying
&quot;To you or the toad&quot; - Niven's restatement of California saying
&quot;-well most of the time anyway...&quot; - programmers caveat to Niven's restatement of California saying
(The Wiz Biz - Ri
 
Thanks, for the valuable info, Tarwn! I'm a happy camper now.
 
You could also code it like this:

<span class=&quot;navbar&quot;><a href=&quot; target=&quot;WebMail&quot; onClick=&quot;NewWindow=window.open('','WebMail','width=500,height=400')&quot;> Webmail</a></span>

Advantage - backwards compatibility. Users who don't have JavaScript/enabled will still be able to access the webmail link in a new browser window. Hope this helps.
Ciao, K----------------
&quot;If you were supposed to understand it, we wouldn't call it code&quot; - FedEx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top