How do you organize your JavaScript code?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More JavaScript Interview Questions

What is the use of ‘debugger’ keyword in javascript code?

0 Answers  


Some XYZ company is arranging for online aptitude tests. Draw detailed E-R diagram for the same..

0 Answers   QuinStreet,


just for testing

0 Answers   IBM,


What is unshift method in JavaScript?

0 Answers  


What is the difference between typeof and instanceof operators in Javascript?

0 Answers  






i want to display time using hidden variable in a page,but when i click button that page that hidden variable loosing its value.i m sending the code also. <script type="text/javascript" language="javascript"> var tick=0; window.onload = function() { //debugger if(document.getElementById("hdnTicker").value != "") tick = parseInt(document.getElementById("hdnTicker").value); setInterval("Timer()",1000); } function Timer() { //debugger document.getElementById("hdnTicker").value = tick++; //alert(document.getElementById("hdnTicker").value); document.getElementById("lblTimeSpent").innerHTML = "0." + tick; if(tick == 30) { //message or redirect to result window alert('time is out'); //clearTimeout(); } } </script> <form id="form1" runat="server"> <div> <table> <tr> <td> <asp:Label ID="lblTimeSpent" runat="server" Visible="true" ForeColor="Blue" ></asp:Label> </td> <td> <%-- <asp:textbox EnableViewState="true" id="hdnTicker" runat="Server" style="visibility:hidden"></asp:textbox>--%> </td> </tr> <tr> <td> <asp:Button ID="btn" runat="server" Text="hi" OnClick="btn_Click" Height="30px" Width="60px" /> </td> </tr> </table> <%--<asp:HiddenField ID="txt" runat="server" Visible="true" />--%> </div> </form> <input type="hidden" id="hdnTicker" name="hdnTicker" enableviewstate="true" runat="server" />

1 Answers  


Explain closures in javascript?

0 Answers  


What are the main uses of javascript?

0 Answers  


What are the limitations of javascript?

0 Answers  


What is null in js?

0 Answers  


How to call a function in every x seconds in javascript?

0 Answers  


What is closure? Give an example.

0 Answers  


Categories