This is an admittedly convoluted script, so I'm not surprised it's a bit buggy.Basically, I'm arranging several hundred small divs on a page. This code writes each of them onload, and checks urlArray to see if the specific div being written has a function attached to it, then enables onmouseover/onmouseout hand pointer/default pointers to it, and, of course, runs the function onclick.
var urlArray = ["main", "none", "none", "none", ... (snip) ]
var i = 0;
The script as it appears here runs great in chrome, but Firefox tells me that "main" is undefined whenever I click or roll over the div, and IE says "object expected" when I click."main" is the name of a function defined in an external js file (though pasting the function into the main document doesn't do anything).In fact, the whole of the above script may not even be relevant, since the following doesn't work either:
I know it's something stupid I'm doing but I can't figure it out. Essentially I'm trying to load two objects with URLs with two websites that can be loaded(displayed) and unloaded(hidden) at the click of a button.
I've spent an hour trying to debug this and I'm at my whits end! I'm doing this with changing the width and height of the divs that contain the objects that will load the websites. But, in Firefox I get an error in the error console saying : loadUnload is not defined. why? code...
How do I acess the whitelist variable from outside the sendrequest() function?
Iv tried saving it to a window.var variable with no luck. Iv tried creating a div and assigning it's innerHTML as the whitelist variable and getting it later with no luck. The fact that it's a chrome extension complicates things because i dont actually know if i can create elements from where the script is located.
when you click the link from the iframe it doesn't work at all in firefox...says the function is not defined.This is working like a charm in Safari ---I have tried defining the function in a dozen different places -- INCLUDING the index.php header and the content item there on the page.Also in the google.blogger header --- NONE work in safari as consistently as what I have got here.I basically hacked a google.blogger widget and wanted to use a submit-form instead of the get-url variables to load the page of the website wth the blogger iframed into the site.
Using a while loop in a function, I am trying to test an input character against a stored string of characters. I want the function to return the input character only if it is not in the stored string of characters. The code I've prepared is as follows:
The code works fine if I remove it from the function wrapper but if the function is called I keep getting an error message that the variable validLetter is not defined. :confused: Can anyone see why this is the case?
I am getting $document.ready(function() not defined in the firebug console. I have seen that in most cases this is caused when the jQuery core is missing or the path is invalid. I do not believe this is the problem in my case becuase firebug shows the code as being loaded successfully and it is readable.
I have a button that when you click it displays the results of my db in a div. What I am trying to do is to get the results to update every five seconds.
I thought setTimeout was the best way to achieve this. However I am getting the error message that ID is not defined on the setTimeout line. I thought it would automatically input ID into the fields marked ID when the onloadXMLDocRefres ('File.php','txtHint') button is clicked?
The button works to load the script, but the refreshing the div is not.code...
I wanted to write my own script for a fade-in animation, since the ones I have found have got too many options or need some framework, which makes them unnecessarily big. I wanted to learn too.Unfortunately, the code didn't work as I wanted, and I commented some things so as to find out what's happening.Why is an object reference assigned to what was previously a string?