- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
14 Posted Topics
The if statement is doing type conversions. this is the element $(this) is the jquery object containing the anchor element. e.target is the element $(e.target) is a jquery object containing the anchor element, but $(this) != $(e.target) this == e.target will evaluate to true. this will always equal e.target on …
Strings can't span multiple lines. You need to close and concatenate the strings: var test = '<p>rajnas asdjhsadnmdas dasjads jmsad dasndsaads bnas</p>' + '<p>ahdndsa</p>'; document.getElementById('education').innerHTML = test;
http://jsfiddle.net/U2wp2/ for (var i=0; i<arr1.length; i++) { var index = arr2.indexOf(arr1[i]); if (index >= 0) { document.write(arr1[i] + " in arr2 at index " + index + "<br/>"); } else { document.write(arr1[i] + " not in arr2<br/>"); } }
You're likely not seeing the loading image because you are doing a syncronous call. The browser is basically frozen while the javascript executes, and since the call is synchronous, control is not given back to the browser to redraw your loading image.
my guess is that you load your javascript file at the top of the page before the dom loads, so when line 5 executes, #login_username does not exist yet and so your focusin and focusout handlers are not attached. You can either move your script tag to the bottom of …
You'll need to post the HTML that goes along with this. My guess is that your form is not named, or the form has a miss-spelled input field.
lines 14 and 19 have a typo yDiv.style.backgroungImage should be yDiv.style.backgroundImage
My guess on first look is that there are several return points in your CheckSelectedItem() function has several return points and some of the points don't return a value. [code=javascript] function CheckSelectedItem() { ... for (i = 0; i < len; i++) { if (document.workorder_form.employees[i].selected) { if (document.workorder_form.employees[i].hasAttribute("rel")) { ... …
[CODE=javascript] function showObject(obj) { if (ns4) { obj.visibility = "show"; } else if (ie4 || upLevel) { drawMessageBox(); obj.style.visibility = "visible"; } } showObject('splashScreen'); [/CODE] You are calling your function with a string, then trying to set the style of it. You need to use document.getElementById(obj) after drawMessageBox() to turn …
in this case I would use split. [code=php] $parts = split(":", "table:column"); $parts[0] //table $parts[1] //column [/code]
[code=javascript] <iframe id="myframe" src="..."> var frame = document.getElementById("myframe"); frame.contentWindow.MyMethod(); //MyMethod needs to be defined as a function on the page listed in src="..." [/code]
To close a window from it's child iframe: [CODE=javascript] //check to see that parent has the Windows class //and that I am acutally in a frame (thus i have frameElement) //we check for frameElement so that it doesn't crash if this //page is opened outside of an iframe. if(parent.Windows && …
It's probably in your scrollHS4 function [CODE=javascript] function scrollHS4(){ if(paused==1){return} clearTimeout(hs4Timer) scroll1Pos=parseInt(scroll1.style.left) [/CODE] scroll1 was defined as a global in initHS4 [CODE=javascript] function initHS4(){ scroll1=document.getElementById("scroller1") [/CODE] but I think IE doesn't recognize the global if it isn't declared outside of a function. Try declaring scroll1 as a variable outside of …
[CODE=javascript] <input type="text" id="command"> //this assumes prototype library for low level functions like $ eval($("command").value); [/CODE] You can also look at evalScripts, which is part of prototype [url]http://prototypejs.org/api/string/evalScripts[/url]
The End.
scrager