Safari And Chrome Not Accepting GetElementsByTagName?
Aug 11, 2010
I'm using getElementsByTagName() to retrieve some elements and do something with them. It works fine in FF but not in Chrome and Safari.
In Chrome it says: "Uncaught TypeError: Cannot call method 'getElementsByTagName' of null"
Here's the code:
Code:
function popUpSAPWindow(){
// Find all links in the page and put them into an array.
//Below is the line that gives me trouble
var linksInOrderLinesTable =
I've placed this on pages where a ^ top of page link at the bottom is present which animates a scroll back to the top of page, however it only seems to work in IE...
I think it has something to do with the ID of the frame, (from Googling the error and reading some other posts,) but can't figure out where to put the tag.
I've written some Javascript to do a few small things on a page, and was excited that it actually worked, even in IE! until I tested in Safari-for-Windows and Chrome on Windows and Linux. I'm going to assume Safari on a Mac also won't run then.
I have a page with some forms. I need to grab the ones with an id starting with "formMaat" (may have a number after it), hide the submit button, and add an onchange event to the lone dropdown select in the form.
Safari and Chrome are removing the submit fine, so they are finding the forms ok.
The onchange event is just supposed to submit the form... I had to imitate the behaviour of the old site but make it accessible to those without JS.
I ended up using a closure to get the "form" passed to the select element because otherwise "form" was unknown... and I can't tell if that's maybe what's tripping up Saffy-Chrome or not. I set a breakpoint in Chrome's developer thingie but I can't figure out how to see the script run when I click on the select.
One of the pages currently: [URL]
The forms in question are on the right/main part of the page, where it says "maat:".
Code: <form action="http://ishtml5readyyet.com/" method="get" id="formMaat"> <fieldset> <legend><span>Kies een maat en krijg de juiste prijs en voorraadstatus</span></legend>
[Code]....
Do I really need that closure? When I didn't have it, optie.form.submit() or this.form.submit() did not run and I thought it should have, since "optie" was known... I thought ".form" would have just looked for that element's form anyway, but it didn't. *edit tried a simpler way, but still no love from Saffy-Chrome.
I know I don't need to really separate that function over to outside init, except who knows if later more events will need to trigger more weird stuff... so I'm trying to write safely.
I thought Safari and Chrome now have different Javascript engines?
I have this script that performs a simple calculation and outputs the result. The problem is that Chrome and Safari (WebKit browsers) ignore the radio button. The calculator is at [URL] (I've removed a lot of stuff for clarity). HTML validates (except for form action, since there is none).
I created a drop down menu (i think i followed a tutorial but it was so long ago i can't remember) which works 100% perfectly in firefox and internet explorer but not opera, safari and chrome. I really want to get it working in all of them though.The Jquery Code:
var $j= jQuery.noConflict(); $j(document).ready(function(){ $j(".message_body").hide();
I'm developing with jQuery quite long right now, but recently I spotted one big problem with execution of jQuery code in Safari and Chrome. So everything is working fine in these browsers until jQuery code is placed in one page. But when using for example tabs plug-in loaded with ajax and on this loaded page exists some extra jQuery code it isn't executed.Co page is loaded but nothing is happening with code which was included. This problem doesn't exists in IE, FF or Opera. It appears only in Safari and Chrome. The same problem is when I'm loading page with $.get, $.post or $.ajax query. So it doesn't affect tabs plug-in but overall functionality. I was checking that with latest versions of jQuery and UI today.
I am using javascript to change the buttons on my website so that they load up a different image when hot spots on the buttons are hovered over.
Everything has been working great, but this morning I tried checking out my site and for some reason the javascript wasn't working in Chrome, or on my iphone using Safari. I tried it in IE and everything still works.
Any ideas on why it would stop working for those two browsers?
Here is the javascript:
I'm not sure if seeing the html the js is referencing will help at all, but here it is just in case:
The following link when viewed with Chrome (Windows XP) the contents of the iframe take up the remainder of the window and looks fine. When viewed with IE8 (Windows XP) or Firefox (Windows XP) the contents of the iframe shows up in a much smaller scroll box window that is only using a small percentage of the available window.
Safari (Mac OSX) also renders the iframe the same way as Chrome.
Firefox (Max OSX) has the same rendering problem as Firefox (XP).
What coding changes do I need to make so that IE8 and Firefox act like Chrome and Safari and use the rest of the window for the iframe contents.
I have a small accordion I'm using for a menu for a local A&W francise (Demo: [URL] When you view it in either Chrome or Safari, you get a flickering that is quite annoying. Does anyone know what is causing this or how to fix it?
I'm working on a page that displays a query result upon loading, and has a DIV that (initially) is invisible and has 0px for height/width, plus a negative z-index. This DIV contains an iFrame that has a form in it for filtering the query. Upon clicking a link, javascript goes into action, giving the div height, width, visibility, and a high z-index so it "floats" above the main page (centered in the browser window.)
This is working flawlessly in FF, Safari, and Chrome. However, in IE7 and IE8, not only is the javascript engine slow and clunky, but once the DIV "appears" the form contained within is invisible (view source shows the code, it just isn't being parsed or displayed.) I'll include my code; can anyone think of a reason why it would show the DIV but not the form in IE7/8?
The following link when viewed with Chrome (Windows XP) the contents of the iframe take up the remainder of the window and looks fine. When viewed with IE8 (Windows XP) or Firefox (Windows XP) the contents of the iframe shows up in a much smaller scroll box window that is only using a small percentage of the available window.
[URL]
Safari (Mac OSX) also renders the iframe the same way as Chrome.Firefox (Max OSX) has the same rendering problem as Firefox (XP).What do I need to do to make IE8 and Firefox act like Chrome and Safari and use the rest of the window for the iframe contents.
I'm creating a custom text box.that's an easy thing to do for me but I encounter some problems on the javascript part.in the onfocus event of the textbox I try to get the caret position on the start.it works perfect on FF, IE and opera but I just can't get it to work in safari and google chrome. I found out both browsers use webkit but have no idea how you do it for the 2 browsers.I'm using asp.net ajax components for javascript and this works for the 3 browsers get_inputElement() = my textbox
I have been trying to fix Ajax call for Chrome and Safari and going nowhere.Somehow when the request is sent to the server, UPC gets blank even though upc has some value.This works in Firefox and IE.
I'm using inArray() to check an XML tag against an array called status[]. If the result != -1, then do one set of instructions, else, the item is 'available' so do another set of instructions. Each entry of my XML document has a <status> tag, which will contain one of 3 values, or a 4th option 'available'. I have an array setup called status['sold', 'pending', 'reduced']. If the <status>.text() is one of these 3 values, then we'll get the array position, if it's 'available' we should get -1.
When I run this in Firefox (3.6) & IE (8.0 or Comp Mode) it works fine. However, when I run this in Safari (4 or 5) & Chrome, it returns the value -1 for each of the entries. The 3rd, 5th, & 7th entries are all set to <status> 'sold' and inArray() should be returning a 0.
I'm using Cluetip to display some additional information.It all works fine in FF.In IE I see a message that the file could not get loaded. In Safari and Chrome I don't see the "mehr" button at all.[URL]..
I have a jQuery based gallery [URL] that will load thumbnails to the bottom of a page, however for some reason these images only load on Firefox and IE (Not Chrome or Safari). I'm not sure this is due to jQuery completely.
I want use $.ajax to read some infomation from xml file,here is my js code :
$ . ajax ({
[Code].....
However, the code only work great in firefox and opera. It doesn't work in chrome(7.0.517.24 ) and safari(5.0.1),failed without any alert,not even the alert("ajax failed"). Is there any bug in $.ajax in chrome and safari?
I am building a simple show/hide list with the jquery. It works great on IE and Firefox but in Chrome and Safari the closing menuitems shift the whole menu to the left for a second and then back to its origin. I have about 20 menuitems that each hold about 5 submenu items. The goal is to show the 5 items only on mouseover on the menuitems and then hide it once the mouse moves away.
Here is the code: <script type="text/javascript"> $(document).ready(function(){ //Hide all subsubmenus $(".subcategories").css("display","none"); }); </script> <li><a href="/kleinanzeige-aufgeben/geschenke.htm" onmouseover=" $ ('.subcategories:not(#86)').hide('fast');$('#86').show('fast');" title="Geschenke">Geschenke</a></li>
I am currently following the image popup example from:[URL]If I run the demo on Windows XP on Chrome or Safari, the escape keydoesn't close the popup window. How do I handle this in jQuery for
I have a web app which allows users to select multiple items from a select tag. I then call a JS function on submit which collects all the options they've selected and then adds them to the value attribute of a hidden input. The options selected are then used at a later time. This works fine on IE and Firefox, but both Chrome and Safari for not adding the selected values to the value attribute of the hidden input. Are there any JS issues for Chrome and Safari that could be responsible for this?