javascript

How to hide labels in html

I have this code which depends on this javascript from dynamic drive: http://dynamicdrive.com/dynamicindex16/formdependency.htm Its a form dependency manager. Which will show or hide elements depending on what you choose from the forms that are revealed: I don't know why but If I alter the code from this: <td> <label>ID Number<i...

Facebook Connect 'next' error

I am trying to experiment with the new facebook authentication system, and I can't getthe login to work. I'm getting the following error message: API Error Code: 100 API Error Description: Invalid parameter Error Message: next is not owned by the application. The url that is being sent to facebook is: http://www.facebook.com/co...

Automated testing of a website for IE7 javascript errors?

This week I decided to add a new element to a javascript array by copying a similar one from a previous line; unfortunately I forgot to remove the comma so the end result was something like var a = [1, 2, 3,]. The code went live late Friday afternoon just before everyone left for the week-end, and it completely broke everything in Inter...

How do I store complex objects in javascript?

Hello, I need to be able to store objects in javascript, and access them very quickly. For example, I have a list of vehicles, defined like so: { "name": "Jim's Ford Focus", "color": "white", isDamaged: true, wheels: 4 } { "name": "Bob's Suzuki Swift", "color": "green", isDamaged: false, wheels: 4 } { "name": "Alex's Harley Davidson", ...

Javascript playing a video - what am i doing wrong?

I think the code is self-explanatory, the button doesn't work, what am I doing wrong? Using Chrome. http://jsbin.com/ugoni3/edit ...

Does HTML 5 Gaming use Canvas and Javascript? How to prevent cheating in this case?

Does HTML 5 Gaming use Canvas and Javascript? How to prevent cheating in this case? For instance, what if a user uses GreaseMonkey or some tool to alter the script so that it just reports a perfect game score to the server every time? ...

.NET Equivalent of MD5.hex() in Javascript

I'm trying to connect to a website I made with auth that uses MD5.hex(password) to encrypt the password before sending it to the PHP. How could I achieve the same encryption in C#? EDIT1: Javascript (YUI Library): pw = MD5.hex(pw); this.chap.value = MD5.hex(pw + this.token.value); C#.NET string pw = getMD5(getHex(getMD5(getHex(my_...

JSON-P and a GET resource?

Hi, If a website operating on a domain other than my own supports get requests, like: http://api.someothersite.com/v1/farms There's no way for me to access it using JSON-P right, they would have to have support for it as a query parameter? Something like: http://api.someothersite.com/v1/farms?callback=fantastic I mean, there's no ...

Manipulating row data with Javascript

I have a specific question, I have a link in a table in the third column of each row, when the user clicks that link he loads some ajax and updates the page, what I want to also happen is that in the 2nd column of the row where the link is, change the td's class from false to true, and the value from No to Yes. Thanks! Update! Code Exa...

Creating and parsing huge strings with javascript?

Hi, I have a simple piece of data that I'm storing on a server, as a plain string. It is kind of ridiculous, but it looks like this: name|date|grade|description|name|date|grade|description|repeat for a long time this string can be up to 1.4mb in size. The idea is that it's a bunch of student records, just strung together with a simpl...

Javascript getElementById lookups - hash map or recursive tree traversal?

Does the DOM have a hash-table of elements whose keys are the elements' ids? I want to know if document.getElementById looks up a hash table or traverses the entire tree. Is this behavior different across browsers? ...

scroll bar important query???

Hello all, actually i downloaded code for scroll from....... http://sorgalla.com/jcarousel/ but when i added it in my page and add using code ... function addElement(url,imagePath){ alert(url); alert(imagePath); var container = document.getElementById('sncs'); items = container.getElementsByTagName("li"); //alert(items.length); var n...

how to disable pop up blocker??

iam trying to open a child window with disabld toolbar in IE. Everytime i have to set the pop up blocker as off and ten work on it. can someone help with a piece of code to disable the pop up blocker using javascript for all IE versions. ...

Questions about jQuery's getScript()

$.getScript("somescript.js", function() { alert('Load Complete'); }); Once loaded, is it cached or is it loaded again if referenced more than once? If an event depends on this file being loaded, will the event be delayed of fail/timeout in case the file takes longer to load or doesn't load? How do I check and do something in case ...

how to throw an alert saying " please turn off the pop up blocker"

hi iam trying to open a child window with disabled toolbar....... how to check whether the child window is opened or not and then display this alert?? can someone help with code......... ...

How to use setAttribute in javascript

Is this the correct format? var title = new_element.setAttribute('jcarouselindex', "'items+1'"); alert(title); ...

Organizing multiple embed codes with jQuery

I have several embed codes on my website, for example: Embed Code #1: <object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/f8Lp2ssd5A9ErAc&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="...

JS Error:Cannot call method of null

I have the following method in a js file in ASP.Net web project. This method is giving the error Cannot call method 'split' of null function loadUser_InfoCallBack(res) { var ret=res.value; var senderGUID = ret.split(';')[0]; var senderText = ret.split(';')[1]; if(senderGUID.Length>0) { $('hiddenSender.valu...

JQuery - Slide Example

Hi All, I want to perform a simple slide motion on an HTML element. JQuery is already available on the site in question so the next logical step for me was to look at their documentation. JQuery - Slide down When I check out their demo however, it doesn't seem to be functioning. In firebug they have an error; missing ) after argumen...

"Cannot read property 'xxx' of null"

I've got a document fragment with children that I want to loop over (when possible). This is causing an error "Cannot read property 'xxx' of null". How do I test if this will be the case? ...