473,788 Members | 2,754 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onclick in netscape

Jon
Hi,

I have an iframe in a cell:

<td id="contents" width="643">
<iframe width="643" height="232" src="home.asp" frameborder="0"
scrolling="no"> </iframe>
</td>

<td onClick="docume nt.all.contents .innerHTML='<if rame width=643 height=232
src=home.asp frameborder=0 scrolling=no></iframe>';"><a href="#"><img
name="home_r2_c 3" src="images/home_r2_c3.gif" width="97" height="26"
border="0" alt="Home Page"></a></td>
In IE, all is well, I click the cell and the iframe changes to the required
page, but this totally fails in Netscap.

Is there away around this please?

Thanks

Jon
Jul 20 '05 #1
4 2819
"Jon" <jon@SPAM_OFFth eexperts.co.uk> wrote:
<a href="#">


Write a correct HREF and not such nonsense.
Jul 20 '05 #2
In article <c0**********@t itan.btinternet .com>,
jon@SPAM_OFFthe experts.co.uk enlightened us with...

<td id="contents" width="643">
<iframe width="643" height="232" src="home.asp" frameborder="0"
scrolling="no"> </iframe>
Gee, I sure hope you made sure I didn't really need that to scroll.
Good thing I'm not visually impaired and need to increase the font size.
The content would probably be all over the place.
</td>

<td onClick="docume nt.all.contents .innerHTML='<if rame width=643 height=232
src=home.asp frameborder=0 scrolling=no></iframe>';"><a href="#"><img
name="home_r2_c 3" src="images/home_r2_c3.gif" width="97" height="26"
border="0" alt="Home Page"></a></td>
In IE, all is well, I click the cell and the iframe changes to the required
page, but this totally fails in Netscap.

Is there away around this please?


document.all is IE proprietary.
Stop that.

innerHTML will not work in NN4. Well, I don't think iframes do, either,
and neither does an onClick of TD, so you must have meant Netscape 6. Or
maybe you meant Netscape 7. Hard to tell. You didn't say.

For IE5+, Opera5+, Mozilla, and Netscape 6...
Use document.getEle mentById.
if (document.getEl ementById)
{
document.getEle mentById("conte nts").innerHTM L = "whatever";
}

Also, <a href="#"> is rarely, if ever, needed.
You want an img to do something then use onClick. If supporting NN4, use
an anchor as a wrapper, but give it a real href, not #.

HTH
--
--
~kaeli~
The secret of the universe is @*&^^^ NO CARRIER
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #3
Jon wrote:
<td onClick="docume nt.all.contents .innerHTML= In IE, all is well, I click the cell and the iframe changes to the
required page, but this totally fails in Netscap.


This is a JavaScript issue, not an HTML issue - and the problem is not to do
with onclick, its to do with your use of the non-standard Microsoft DOM.

http://devedge.netscape.com/viewsour...tml-web-pages/

and try comp.lang.javas cript next time you have JavaScript problems.

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #4
Jon

"kaeli" <ti******@NOSPA M.comcast.net> wrote in message
news:MP******** *************** *@nntp.lucent.c om...

<SNIPPED>
Is there away around this please?


document.all is IE proprietary.
Stop that.

innerHTML will not work in NN4. Well, I don't think iframes do, either,
and neither does an onClick of TD, so you must have meant Netscape 6. Or
maybe you meant Netscape 7. Hard to tell. You didn't say.

For IE5+, Opera5+, Mozilla, and Netscape 6...
Use document.getEle mentById.
if (document.getEl ementById)
{
document.getEle mentById("conte nts").innerHTM L = "whatever";
}

Also, <a href="#"> is rarely, if ever, needed.
You want an img to do something then use onClick. If supporting NN4, use
an anchor as a wrapper, but give it a real href, not #.

HTH
--
--
~kaeli~
The secret of the universe is @*&^^^ NO CARRIER
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Kaeli,

That was very useful, thank you.
Jul 20 '05 #5

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

Similar topics

6
167447
by: Jez | last post by:
Hi, I've created a function which opens a popup window containing a calendar. When a day is clicked, the date is entered into a text box on the parent page and the popup is closed. The link I'm using on the parent page is ... <a href="#" onClick="popupcal()">choose date</a>
2
1471
by: mscir | last post by:
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">...
2
2423
by: kelvin | last post by:
Hi, I've this piece of code which does not work at all. Can anyone point out my mistake? I've 2 buttons. History button will call verifyFields() function and lead to different page for processing. verifyFields() is working fine and so does the history() function.
5
10886
by: Mike | last post by:
In my previous post, I wrote: > ... > GOAL: (very simple) Provide a hyperlink which, when clicked, > calls a javascript function which opens a new URL. > ... > PROBLEM: The following code works fine if I click to open in > the same window, but if I click the browser option to open in a > new window, the new window tries to open the href URL (the > onClick function does get executed, but seems to be ignored). > ...
5
1465
by: Gerard van Wilgen | last post by:
I noticed that the following line of code works in IE 6 but not in Netscape 7.1: <INPUT TYPE="radio" NAME="selComb" VALUE="0" ONCLICK="alert(selComb.value)"> Nothing happens when I click on the radio button. There is not even an error message. This is a simplified version of the actual code, which is used to pass among
2
18581
by: RobG | last post by:
I am trying to dynamically add an onclick to an element, however I just can't get the syntax right. consider the following function: function doClick (evt,x) { // do things with evt and x } Which is called statically by: <button onclick="doClick(event,this);">Click me</button>
5
2590
by: moondaddy | last post by:
I have a <a> element in a datagrid which wraps some asp.net labels. this element also has an onclick event which does not fire in netscape 6 (and perhaps other browsers for all I know...). Below is the code for this. the onclick event calls a javascript function which I put an alert in the firt line to tell me if its working. It does work in IE. Any ideas on how to get netcrap... oops, I'm sorry, netscape to fire the onclick event? ...
3
1668
by: topherknowles | last post by:
Hello, I have a number of links opening in a fixed window that certain users cannot access because they are on netscape 4.6 (I think this can handle the links and it is actually their ancient computers which cannot, but either way they are all on netscape), the current onclick command looks like this: <A onclick="wopen('page url', 'popup', 670, 395); return false;" href="page url" target=popup> which activates this script: <SCRIPT>...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.