473,320 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

wanted: workaround to javascript:show(...); instead of onClick forNetscare 4

I was calling a function in a js file from an image onClick event, but
someone still using Netscape 4 (!) complained that it didn't work. I
read that img onClick doesn't work in Netscape 4, so swithced it to
"javascript:show(...);" and the code works, but I read in this group
that it was not wise to do that, here's the working version, using the
not recommended approach:

<a href="javascript:show('art_2.jpg','600','448');" target="_self">

I'd appreciate any suggetions that will let me call the "show" function
from an onClick image event that will work in most IE/Netscape 4+ browsers.

TIA,
Mike
Jul 20 '05 #1
2 1441
Lee
mscir said:

I was calling a function in a js file from an image onClick event, but
someone still using Netscape 4 (!) complained that it didn't work. I
read that img onClick doesn't work in Netscape 4, so swithced it to
"javascript:show(...);" and the code works, but I read in this group
that it was not wise to do that, here's the working version, using the
not recommended approach:

<a href="javascript:show('art_2.jpg','600','448');" target="_self">

I'd appreciate any suggetions that will let me call the "show" function
from an onClick image event that will work in most IE/Netscape 4+ browsers.


<a href="#" onclick="show(...);return false"><img...></a>

By the way, it's not that "onclick doesn't work in Netscape 4",
it's just that way back then, images weren't considered things
that should react when clicked.

Jul 20 '05 #2


mscir wrote:

I'd appreciate any suggetions that will let me call the "show" function
from an onClick image event that will work in most IE/Netscape 4+ browsers.


<a href="#"
onclick="show(...); return false;"><img src="whatever.gif"
alt="whatever"></a>

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Jack | last post by:
I want to display a table on a page based on whether a button is pressed or not. I'm new at php so I'm sure I'm making a basic mistake. Here's what I am trying. My thought was that $show_summary...
4
by: SpamProof | last post by:
I need to set my div tag (<div id="divBioBottom"> content </div>) to either visible or hidden from javascript. Does anyone know how to do this? Thanks. 7078895 /ra
3
by: Andy | last post by:
Hi, I am complete JavaScript novice and would really appreciate some help with this code: ===================================================================== <%@LANGUAGE="VBSCRIPT"...
7
by: f1crazed | last post by:
Ok, The following html works wonderful in IE. It does not work in FireFox. Can someone please tell me the work around for FireFox to get this to work. HTML DOCUMENT: <html> <head>...
2
by: MOHSEN KASHANI | last post by:
Hi, I am trying to hide some form elements in a form by default and show/hide depending on which radio button is clicked. This is what I have but it is not working: <head> <style> ..noshow {...
2
by: Homa | last post by:
Hi, I have a Datagrid that uses as a shopping cart and have a checkbox template column in it. I can't add both OnCheckedChanged Event and onclick client script for it. I want to do two...
2
by: Dave | last post by:
Hi, I have a datagrid with a Templated column below. I want to execute some javascript before the postback to show a hidden "div" tag with static message of "Please Wait..." since the query takes...
2
by: UJ | last post by:
Is there a way with a asp:checkbox to run a JavaScript to display/hide text/input on the screen without doing a postback? I also need to be able to access the stuff at the server so I need to...
2
Frinavale
by: Frinavale | last post by:
JavaScript in ASP.NET Using JavaScript in ASP.NET pages can make your application seem to work faster and prevent unnecessary calls to the server. JavaScript can be used to perform client-side...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.