Elizabeth_Keen
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Elizabeth_Keen
-
-
Your init function is contained by the scope of the function you've passed to jQuery.ready. This is a good thing, it means you haven't created an unnecessary global.
If you need to export the function to the global scope, you can do so by explicitly assigning to a property on window, e.g.:
window.init = init; Since window is the global object on browsers, that would allow you to call it from Chrome's console without the window. prefix. But only do that if absolutely necessary, the global scope is already crowded enough
Function declarations, like your function init() {}, are restricted to the scope they're defined in. If you want to use init elsewhere, do this:
var init;$('document').ready(function() {init = function() {};});
- 1
Enter doesn't submit button in IE
in HTML/XHTML
Posted · Edited by Ingolme
Advertising
There are plenty of documented bugs with this scenario. Why not just add a hidden field with name='submit'? That way it wouldn't be too hard to recode the backend.<input type='hidden' name='submit' value='FTSearchButton'/>