HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 11th, 2000, 07:54 AM
andi andi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 11 andi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi everybody,

the following code does not work with Netscape 4.x:

<map name="startMap">
<area onClick="show1();" shape="rect" alt="show1" coords="680,2,760,30">
<area onClick="show2();" shape="rect" alt="show1" coords="220,2,300,30">
</map>

<img src="../gfx/pb_start.jpg" usemap="#startMap" alt="press Start">

When clicking on the specified area of the image, nothing happens. With IE5 though it works perfectly. Does anybody have a suggestion for that ?

Thanks a lot !

Andreas


Reply With Quote
  #2  
Old June 11th, 2000, 02:59 PM
Spookster Spookster is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Posts: 84 Spookster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
If you put your mouse on the image map and the hotspots are where you want them then the problem will be in the script. I cannot help any further without seeing the script where your show1() and show2() functions are defined.

Spookster

Reply With Quote
  #3  
Old June 11th, 2000, 05:37 PM
andi andi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 11 andi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi Spookster,

thanks for helping me. Here's the script.
Show1 should test for the existance of nw and if nw does not exist, it should open a new window. (By the way, this does not work both with IE and Netscape).

Show2 works on IE5 but not on Netscape. With Netscape nothing happens at all !.

My guess is that I need to change my code where I try for the existance of nw (if(!document.nw)).
Probably Netscape stops processing Javascript after an error occured whereas IE continues. I am not sure but this could be the solution, what do you think?

Andreas

<SCRIPT LANGUAGE="JavaScript">
<!--
// submit form, open new window and show newspaper
function show1()
{
document.newsJob.action='newspaper_frame.php';
//document.newsJob.action='test_news.php';
if(!(document.nw))
{
nw = window.open("","newsWindow","width=800,height=700,scrollbars=yes,resizable=yes,status=yes,location=yes,toolbar=yes");
}
document.newsJob.target='newsWindow';
document.newsJob.submit();
document.nw.focus();
return true;
}

// submit form, open new window and show job list
function show2()
{
document.newsJob.action='job_list_frame.php';
//document.newsJob.action='test.php';
document.newsJob.target='_top';
document.newsJob.submit();
return true;
}
-->
</SCRIPT>

Reply With Quote
  #4  
Old June 12th, 2000, 02:45 AM
Spookster Spookster is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Posts: 84 Spookster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I would try using the window.closed property instead.

if(!nw.closed){
do this if window is open
}
else{
do this if window is closed
}


Spookster

Reply With Quote
  #5  
Old June 13th, 2000, 01:11 AM
rkmarcks rkmarcks is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 81 rkmarcks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via AIM to rkmarcks
When running the script through my syntax/web browser compatibility checker, the only error I received was in your closing comment line. Change the --> to //--> at the end of your script.

Russ



Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Problem: Netscape and area onClick="...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway