the Javascript function firstChild() works as expected in IE but
returns "undefined" in Netscape 7.1
Here is the sample html code that I used. I am asking the javascript
to print out the id of the child of para1. IE correctly prints the
string "italicsid", but Netscape gives me an "undefined". Why so? Code:
I have tried several things, using several Javascript books, but can't get this to work in Netscape (latest version) and Firefox (latest v.). It works in MIE and Opera fine. A box (defined by a css layer) is supposed to pop out to the right when the corresponding box on the far left is moused over. The first function defines a layer id to the next function which pops out the box. After debugging in Venkman, it looks like the first function cannot define the layer id properly to the second function, which actually slides the box (layer) to the right.
I thought that the getElementById function was supposed to work for Firefox, but I must be using it wrong(???)
To see how it's supposed to work, view the following page in MIE or Opera:
I have been trying to programme the script below so that it will work in Netscape Browser 7.1, 4.73 and Microsoft Internet Explorer; but without success. When I attempt to execute the function flyingsleigh() I receive a JavaScript error: Invalid argument at line:19 Char:7 The idea of this script is to make a graphic run across the browser screen - left to right when the form button is pressed, executing the function using onClick event handler. Code:
I am having an issue dynamically displaying a table row.
What I would like to accomplish is when I click the show label, the 2nd row of the table is made visiable but it also remains in the table order (all td elements should align).
The below code works in IE but in Netscape, both the label and the text box apear in the first TD element instead of having the label appear in the first TD element and the text box apearing in the 2nd TD element. Does anyone know a way around this so the code works in both IE and Netscape? Code:
the below function allows me to pass the screen resoltion variable to asp through a cookie. It works in IE and Opera but not in Netscape. What is the problem?
Code: <script language="JavaScript"> <!-- function checkres(){ if('<%=Request.Cookies("screenres")%>' != window.screen.width + 'x' + window.screen.height){ document.cookie = 'screenres=' + window.screen.width + 'x' + window.screen.height window.location.href("default.asp") } } // --> </script> if someone doesn't know what the asp line does, then 800x600 may be an output. Like below
Code: <script language="JavaScript"> <!-- function checkres(){ if(魸x600' != window.screen.width + 'x' + window.screen.height){ document.cookie = 'screenres=' + window.screen.width + 'x' + window.screen.height window.location.href("default.asp") } } // --> </script> the if statement doesn't appear to be executed in NS...so I presume that the error is in the line
I'm trying to access a div within another div, but get an error stating that the firstChild object of the div is not an object. The code I am using is as follows:
I would like to get the first child of a HTML element and apply a style to it, but I can't figure out how to do it. As far as I can see I can only change its value, and the firstChild only has the following properties, so cant really set a style...
I am working on a script that allows a link's text to be changed from Show Video to Hide Video and back. However, I can't get this to work, as it changes but won't change back. My script:
var myDIVnode1 = document.createElement("DIV"); // etc myDIVnode1.appendChild(document.createTextNode("a")); // this shows "a" alert(myDIVnode1.firstChild.nodeValue);
I am creating a site that will use a Client-Side Include (CSI) to dynamically generate an ad banner to be placed on the right hand side of the page. It loads great in IE5 and above and Netscape 7 and even loads fine in Netscape 4.7. The problem is when the user resizes the window, the ad banner that was generated is then placed at the bottom of the page. I even look at the HTML of that particular page and the CSI is thrown into the bottom portion of the site. I am perplexed as to how it just throws it down AND knows where in the HTML code to insert itself.
If anyone has any ideas on how to stop this snippet of code placing itself anywhere in the site, I would appreciate any help. Again, it LOADs fine but when the user decides to re-size the window, it just moves it down to the bottom of the site.
I've got a trouble with my script, i want to show a <div> on Netscape and it doesn't work: Here is the script
//navigators identification
var ie4=(document.all && !document.getElementById)? true:false var ie5=(document.all && document.getElementById)? true:false var n4=(document.layers)? true:false var n6=(!document.all && document.getElementById)? true:false
I created a menu bar for my page using Sothink DHTML Menu 4.1 which created javascript file. I also add a small slide show on the page using javascript and the javascript is embedded in this page's HTML.
Everything works perfectly with IE. However, Netscape (4, 6, 7) can't see the menu bar created in DHTML when the slideshow javascript is present.
If I just have the menu bar or slideshow alone on the page, Netscape can see it, but it seems that Netscape always ignores the DHTML script when both javascripts are present. Not sure what is going.
I have tried to put the slideshow javascript in the .js file that has the DHTML code for menu bar, but it didn't work either.
I just installed the LoveSan security patch from MSFT and turned on Auto-Update. Now applets do not load. I tried getting Netscape 7.1 but it directs me to the Sun page to install JRE. I do this but still neither IE or NS will load applets. Tried downloading some from various websites with free applets but these do not work either. Any ideas?
var win = window.open('', 'window_name', 'parameters'); win.document.write(strHtml); win.document.close(); win.focus();
My problem concerns the tag "onLoad " of the "BODY" tag: with IE, the "fonc_onLoad()" starts normally (this function is in "my_script.js"), but with NS 4.7 (ou 4.51), the <SCRIPT> tag is ignored (you can view the window's source code), so the "fonc_onLoad()" function cannot not start.
i have a netscape and IE incompatibility problem. when i change the text size in netscape everything looks fine and all frames text size change. but when i change the text size in IE just one frame change!
I'm making a website in both english and italian languages. I thought to make a javascript function that automates the switch from one lang to the other, reloading the same page. It works fine with IE, but when I tried to view it on a Netscape7 browser, nothing happen when I click on the link. Code:
I guess because IE once again has its own variations this works or Netscape isn't following the dom I don't know which but I was hoping this type of navigation was going to be dom compliant with the newest versions of Netscape
If you have a table with the id "bob" (I like dumb names sometimes) you should be able to navigate down the table via bob.firstChild.childNodes[1].innerHTML. This does not work in netscape but does work in IE. I find this troubling because of how much easier things would have been if it worked in both. I really just wish the browsers would become equal.
The dom specification is here (outdated I believe) http://www.w3.org/TR/1999/CR-DOM-Lev...roduction.html
Thats the specification and how it supposedly works. I am going to keep playing and figure out if maybe Netscape 'changed' it. for an example try this Code:
i tried everything to open a new window of smaller size in Netscape, just couldn't do it. Is it my own Netscape browser setting or Netscape itself's problem?
here's one of the code im using:
<A HREF="javascript:void(0)"
'welcome','width=300,height=200')"> Open a new window</A>
I have a javascript function which uses the method document.getElementById.
I'm using it to decide whether a checkbox has been ticked or not. This decision is encoded in an if statement with the condtion being if (document.getElementById(checkboxtoupdate).value ==1)
/* The Code */
function set(object) { var checkboxtoupdate = object.value;
The "object" accesses a html tag which has an value attribute e.g value="7400"
However Netscape Navigator 7.1 does not seem to recognise "document.getElementById(checkboxtoupdate).value" and reports an error that document.getElementById(checkboxtoupdate).value has no properties.
But Internet Explorer has no problem with this at all.
Is there another way to do this so as to be recognised by Netscape 7.1?
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"
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 other things the value of a selected radio button to a JavaScript-function. Does anybody know how this code can be made to work in Netscape?
I'm not sure if this is a style sheet issue or a Javascript issue.
I'm trying to work out a new design for my software's control panel. The idea is that there are images on the left that you click and that as you do, DIVs with option links appear and disappear on the right. Because I want each of the DIVS to appear in the same place, I use Javascript to set their padding and their height to 0px when they are invisible. This is working the way I wish in Netscape 7.1 but it is not working the way I want in IE. Can anyone give me a hint about why?
If I have to test my code on different Netscape versions, can I download and run those versions on the same computer or will it create conflicts? And if I had to test only one version which one should it be - which one has the most common elements to all the versions?
I am working on implementing this script to shopping cart. Basically, it copies fill the shipping address from billing automatically. I believe one or more syntax is not netscape compatible. Can anyone point out which one it is and how to make it both netscape and MS browser compatible?
I hope if I can make the script compatible for those two at extreme, it will probably work with most browser out there. As you would notice, this form also calls another fundtion already implemented in the shopping cart. But that function itself works on both browser. Code:
i am developing an application , we have to run it for Netscape V4.76(!!) , the problem is it seems that Netscape V4.76 does not support 'disabled' for form elements for example something like