I'm not a Javascript person, so please be kind. I've got an asp.net 2 page that has a master page. I've got a javascript that works fine in a regular asp.net page within the same web. Move it to the page with the master page, and it won't work. Any help appreciated. Also, what's the difference between function setDifference(form) and setDifference = function(form)? Here's the basic stuff:
There are a couple of different methods for creating functions in JavaScript. The two examples below will do the exact same thing.
Code:
var functionName = function(parameters) {...}
function functionName(parameters) {...}
As for your code not working on a separate page, I would suggest double checking all elements referenced. The code itself is correct. But, in JavaScript you should always line terminate with a semicolon. If you don't debugging goes defunked!!!
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Bookmarks