Click here to Skip to main content
16,006,709 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: How disable refresh when enter key pressed in the form input text? Pin
flashery14-Dec-11 21:52
flashery14-Dec-11 21:52 
GeneralRe: How disable refresh when enter key pressed in the form input text? Pin
twseitex18-Dec-11 7:02
twseitex18-Dec-11 7:02 
GeneralRe: How disable refresh when enter key pressed in the form input text? Pin
flashery18-Dec-11 7:17
flashery18-Dec-11 7:17 
GeneralRe: How disable refresh when enter key pressed in the form input text? Pin
twseitex23-Dec-11 5:15
twseitex23-Dec-11 5:15 
GeneralRe: How disable refresh when enter key pressed in the form input text? Pin
Hà Duy Thuận10-Jan-12 21:59
Hà Duy Thuận10-Jan-12 21:59 
Questionhow to populate content of aspx page(having Div and span tag) in to overlat Pin
dayakar_dn12-Dec-11 22:59
dayakar_dn12-Dec-11 22:59 
QuestionEnable pop up blocker using Javascript Pin
Member 322226411-Dec-11 5:47
Member 322226411-Dec-11 5:47 
AnswerRe: Enable pop up blocker using Javascript Pin
twseitex11-Dec-11 7:23
twseitex11-Dec-11 7:23 
AnswerRe: Enable pop up blocker using Javascript Pin
AprNgp26-Dec-11 17:26
AprNgp26-Dec-11 17:26 
QuestionTransforming a table to node diagram Pin
info_hacker8-Dec-11 21:12
info_hacker8-Dec-11 21:12 
QuestionUsing Javascript to list local directory contents Pin
Member 84548754-Dec-11 8:15
Member 84548754-Dec-11 8:15 
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 

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.