I have a js dropdown menu and js slideshow on the same webpage.
The menu dropdowns work great in FF but not in IE 6. The menus in ie
drop down behind the slide show which I do not want. Does anyone know
how I can fix that? Perhaps an iFrame?
I'm trying to combine these two scripts to acomplish a combined effect. None of my variables are duplicates so that's not the problem. I've been able to identify the line that breaks the first script - however I don't know how to fix it. Both scripts work great separately. When I comment out the 1 line in the 2nd script the 1st script works. And when I leave the comment out the second one works but not the first. Code:
function Obj() { obj.squares = new Array(); } Obj.prototype.Load= function(xdoc) { var goat = "head"; xdoc.ProcessNodes("squares/square", function(node) { alert(goat); // <-- this works fine this.squares.push( // do processing on node, create a square ); }); }
Now the xdoc is another object I have, with a method called ProcessNodes. The only important thing to know about ProcessNodes is that it does some things, and calls its second argument (which is a function) successively.
The problem I am running into here is once I get into the callback function, "this.squares" is returning null ... even though it has been initialized to an Array. For whatever reason, its like the object loses scope when I get into the callback function. For all other intents and purposes however, the callback function has the same scope as the calling block (i.e. the goat variable is still accessible).
Basically, I have a div section in my xhtml that I want visible for print (div {display: block;} in my print css), and visible if somebody has javascript disabled (therefore also div {display: block;} in my screen css), but not visible on screen with javascript activated (i.e., turned off in javascript with div.style.display = "none").
The problem is one of precedence. When displaying the page on screen I want my non-interactive javascript code to execute after the css rules have been applied (so I put my javascript within window.onload). But when a user attempts to print, I'd prefer if the css (for print) were applied after the javascript. Unfortunately this doesn't seem to be what happens.
I am using a simple javascript image insertion on my XHTML page, and I have encountered a problem. The Javascript code fails to execute when the doctype is XHTML on Firefox (works on Opera). However, when I simply rename the file with an HTML extension, the code executes on all browsers. Code:
I have a javascript dropdown menu and a scrolling marquee on my site, but there is a conflict of script which only allows one of them to be visible. Not sure how to get round this.
I have an SVG file and draggable div on one page. When I move div over this SVG file, it looks like div loses control and detaches from the mouse. If I do it slowly, div seems to barely follow the mouse which is being over SVG.
I tried assigning zIndex to SVG file to be the same as other elements on the page, but that did not help. Would anyone know why this happens?
Now, what I wanted to do was pass a parameter to the functionObject, but this is apparently not possible. How can I determine what object caused the event in the functionObj? FWIU, the "this" object is fine in NN, but in IE, it refers to window.
addEvent(document.getElementById("myE"),"click",myFunction); function myFunction() {
// I need a reference to document.getElementById("myE") or whatever object triggered this function to be called }
I have two different scripts I am using on a web form, one which highlights the field when the mouse focuses on a field and another which checks the info and submits. They work fine separately, but together there is a conflict.how to resolve the conflict?Here are the two scripts.
I have read that if i have to use jquery with other libraries then i have to use jquery in no conflict mode.I understand that and and it works. i use$j = jquery.noconflict()so that $ of jquery does not mix with $ of other librariesNow my question is that i use any jquery plugin , and i include that JS filee,g plugin.jquery.jsI am not sure whether i am correct or noti think that plugin is coded by using $ sign not the $jnd i think it will conflict with other libraries.So it means i have to chnage the plugin code as well or there is no need to change plugin
This script is saved as timer.php. I downloaded it from this site. It is a live server timer that displays the server time in your browser. This code works fine. My problem lies here. I am calling this script from 'showusers.php' as:
<?PHP echo "<p><b>Current Server Time: </b><span id="servertime"></span></p>"; ?>
The timer as written below, saved as 'timer.php' works fine. When I use my original page 'showusers.php' it doesn't want to work. 'showusers.php' loads java in the header and has a src file= .js. I tried making this file a .php to see if there was a problem
am having trouble with a timing issue concerning 'innerHTML' and have been unsuccessful in addressing this problem after numerous hours.
ideally statements only get executed after the previous statement has been completed however this is not wholly true depending on your point of view. while the initial statement of setting the innerHTML has been completed, the content is still not accessible for a short period of time. Code:
First off, I'm a noob, so, hopefully I won't offend anyone with my ignorance I am attempting to integrate both of these plugins into a single web page, but I seem to have some conflicts.
When I use the following script that is required for Cluetip, <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>, it disables jdMenu.
And when I use the functions.js javascript file that is required for jdMenu, it disables Cluetip.
I use two jQuery plugins in my page : slideToggle (for a top panel) and wslide (for showing two examples with images and captions).The problem is, the content of my wslide goes down and downer each time we open the toppanel. Is there any way of getting around this problem and make the content stick to where it should be? Here's some code :
ASP.Net with Vb.Net - i am using lightbox related scripts( prototype.js ,lightbox.js and scriptaculous.js) for images view , Banner refresh purpose referenced jquery.min.js and using this code below....in the same page
ifmasonryworks,lightboxdoesnt. if masonry doesnt, lightbox works. The scripts seem to be in conflict.I've already tried Jquery.noConflict and using another version of lightbox. i found a sample site from masonry: [URL].. that managed to put both jquerys together and it works. But i don't know what is the problem with mine.[URL]...
I'm really not into coding but i need to build a webpage for my band.. So before building an actual page, i built a temporary one.. [URL] in index.html everything looks fine except formmail. so i added one; [URL] (if you click the last button you'll see the formmail) but when i added this formmail, my javascript mouseover functions became disabled. I tried to find a solution but since i don't know anything about coding, i really don't know what should i look for.. and one other thing, my table properties not working either..
this is code for index.html <html> <title> INGAR </title> <HEAD> <SCRIPT LANGUAGE="JavaScript"> [Code]...
I found this nice script to put anything next to my mouse. It works in Internet Explorer, Opera and Safari, burt it does not work in firefox. I think that the problem has something to do with "getElementById", but It could also be something else.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>mouse follower</title> <!-- Start of mouse follower script --> <script type="text/javascript"> <!-- function doMouseMove() { curicon.style.pixelLeft=event.clientX-68 curicon.style.pixelTop=event.clientY-66 } document.onmousemove=doMouseMove; // --> </script> <!-- End of mouse follower script -->
</head> <body> <!-- Start of mouse follower --> <div id="curicon" name="curicon" style="position:absolute; left:-250px; z-index:2"> <!-- Put anything here and it will go be-side the mouse. --> hello </div> <!-- End of mouse follower -->
i am using phonegap and html5 in my webapp, the problem is when i try to use the html5's FileReader it conflicts with the phonegap's FileReader object.. it's as if when i invoke the FileReader in html5 the one that is being called is the FileReader of phonegap.. any workaround?
Greetings!! I'm new in js..I've searched that js cannot perform two onload event at the same time. I've got two sets of codes here from [URL] and here is the the problem
<a href="link" onclick="DoOnClick('link')"> page title </a>
-where the DoOnClick("link") just adds a query part to the url before executing:
location.href = "link?query";
( this is done in order to maintain certain state information --(instead of using cookies.))
I also use something like this:
a.link { ...different... } a.visited { ...colors... } a.hover { ...for each of these... }
in a css file for the index pages, in order to distinguish the already-visited page-links.
The problem is that it's not working right.
It works with JavaScript disabled,
But with JavaScript enabled, it's only the first-clicked page link that gets marked as having been visited. Subsequent pages don't get marked.
Apparently the full "link?query" is being put in the browser history, - not "link".
And since "link?query" doesn't match exactly any "link" on the page, --none of them get marked as having been visited.
( However, - the really odd thing, - is that it does work -right -- in my local mirror of the site! (--I'm using the latest IE browser.)
Anyway, my question is, can anyone think of a way around this?
Perhaps by somehow using the JavaScript's "history" object to force recording of "link" instead of, or in addition to, "link?query", in the user's visited-link history, --so that they'll all get marked as such on the index pages?