Click here to Skip to main content
15,905,071 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Using Javascript to list local directory contents Pin
Wonde Tadesse5-Dec-11 4:36
professionalWonde Tadesse5-Dec-11 4:36 
QuestionJavascript code to fetch data from an excel file and upload data to an ftp site Pin
zone132-Dec-11 11:15
zone132-Dec-11 11:15 
AnswerRe: Javascript code to fetch data from an excel file and upload data to an ftp site Pin
twseitex3-Dec-11 5:59
twseitex3-Dec-11 5:59 
QuestionDrag & Drop jQuery to table rows and update database? Pin
btvbill30-Nov-11 10:28
btvbill30-Nov-11 10:28 
AnswerRe: Drag & Drop jQuery to table rows and update database? Pin
Dennis E White1-Dec-11 7:14
professionalDennis E White1-Dec-11 7:14 
QuestionJavascript / JQuery pop-up message question Pin
AeonBlue30-Nov-11 4:59
AeonBlue30-Nov-11 4:59 
AnswerRe: Javascript / JQuery pop-up message question Pin
Not Active30-Nov-11 6:05
mentorNot Active30-Nov-11 6:05 
AnswerRe: Javascript / JQuery pop-up message question Pin
Dennis E White30-Nov-11 7:29
professionalDennis E White30-Nov-11 7:29 
AeonBlue wrote:
<script type="text/jscript">
$("#calendar a").bind('click', function () {
TurnOffMessage();
return true;
});
</script>


I am guessing that the above code is located in the head of your html document. The bind won't work because the document (html) has not been loaded yet.

Simple solution - move your javascript code down towards the end of the file. In general I place jQuery script right before the closing of the body tag.

while it is permitted to put javascript in the head of your document best practices generally dictate that you place code for working with the document at the end prior to closing the body.

this will assure that "most" everything is currently in the document. the exception being any html generated code from jQuery (plugins, etc.).
as if the facebook, twitter and message boards weren't enough - blogged

GeneralRe: Javascript / JQuery pop-up message question Pin
AeonBlue30-Nov-11 8:52
AeonBlue30-Nov-11 8:52 
GeneralRe: Javascript / JQuery pop-up message question Pin
Dennis E White30-Nov-11 11:13
professionalDennis E White30-Nov-11 11:13 
QuestionConfirm dialog with OK ,CANCEL buttons on window close Pin
siva45524-Nov-11 20:20
siva45524-Nov-11 20:20 
AnswerRe: Confirm dialog with OK ,CANCEL buttons on window close Pin
phome25-Nov-11 23:08
phome25-Nov-11 23:08 
GeneralRe: Confirm dialog with OK ,CANCEL buttons on window close Pin
Shameel26-Dec-11 4:02
professionalShameel26-Dec-11 4:02 
Questionenable check box not working Pin
byka22-Nov-11 9:20
byka22-Nov-11 9:20 
AnswerRe: enable check box not working Pin
Richard MacCutchan22-Nov-11 9:30
mveRichard MacCutchan22-Nov-11 9:30 
GeneralRe: enable check box not working Pin
byka22-Nov-11 9:35
byka22-Nov-11 9:35 
GeneralRe: enable check box not working Pin
Richard MacCutchan22-Nov-11 9:54
mveRichard MacCutchan22-Nov-11 9:54 
QuestionRe: enable check box not working Pin
DaveAuld22-Nov-11 9:46
professionalDaveAuld22-Nov-11 9:46 
AnswerRe: enable check box not working Pin
byka22-Nov-11 9:49
byka22-Nov-11 9:49 
AnswerRe: enable check box not working Pin
Satheesh154622-Nov-11 16:47
Satheesh154622-Nov-11 16:47 
GeneralRe: enable check box not working Pin
byka23-Nov-11 2:15
byka23-Nov-11 2:15 
AnswerRe: enable check box not working Pin
phome26-Nov-11 14:04
phome26-Nov-11 14:04 
QuestionHelp with Javascript Code Pin
ThianBrodie12-Nov-11 19:05
ThianBrodie12-Nov-11 19:05 
AnswerRe: Help with Javascript Code Pin
Not Active13-Nov-11 3:21
mentorNot Active13-Nov-11 3:21 
GeneralRe: Help with Javascript Code Pin
ThianBrodie13-Nov-11 4:10
ThianBrodie13-Nov-11 4:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.