Click here to Skip to main content
15,927,744 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: window closing event[off topic] Pin
Sonia Gupta17-Oct-07 22:36
Sonia Gupta17-Oct-07 22:36 
GeneralRe: window closing event[off topic] Pin
ThatsAlok17-Oct-07 22:59
ThatsAlok17-Oct-07 22:59 
QuestionASP.Net Membership&Role db Question? Pin
BetimD17-Oct-07 22:32
BetimD17-Oct-07 22:32 
AnswerRe: ASP.Net Membership&Role db Question? Pin
Bjohnson3317-Oct-07 23:41
Bjohnson3317-Oct-07 23:41 
QuestionRe: ASP.Net Membership&Role db Question? Pin
BetimD18-Oct-07 0:15
BetimD18-Oct-07 0:15 
AnswerRe: ASP.Net Membership&Role db Question? Pin
Bjohnson3318-Oct-07 0:27
Bjohnson3318-Oct-07 0:27 
GeneralRe: ASP.Net Membership&Role db Question? Pin
BetimD18-Oct-07 0:32
BetimD18-Oct-07 0:32 
QuestionTransfering javascript to a content page Pin
piote17-Oct-07 22:03
piote17-Oct-07 22:03 
Hi,

I have the following javascript:



<script language="javascript" type="text/javascript"><br />
<br />
// Global variables.<br />
var numSeconds;<br />
var timerId = null;<br />
var timerInterval = 1000;<br />
var numUpdates = 0;<br />
<br />
// Handle OnLoad event.<br />
window.onload = Window_OnLoad;<br />
<br />
function Window_OnLoad()<br />
{      <br />
    StartProcess();<br />
}<br />
<br />
// Starts the process for updating the Map.<br />
function StartProcess()<br />
{<br />
    // 200 x 3 seconds = 600 seconds = 10 minutes demo.<br />
    if ( numUpdates < 72 )<br />
    {<br />
        // Duration between actual updates to the map in seconds.<br />
        numSeconds = 3;<br />
        UpdateMap();<br />
        numUpdates++;<br />
    }<br />
}<br />
                   <br />
// Continues the process of updating the Map.<br />
function UpdateMap()<br />
{               <br />
    if ( numSeconds == 0 )<br />
    {<br />
        // Clears the timer.<br />
        clearTimeout(timerId);<br />
        <br />
        // Update the Map control.<br />
        var mapControl = document.getElementById("MapControl1");<br />
        mapControl.doCallback("IncrementSales", "");<br />
    <br />
        // Restart the process.<br />
        StartProcess();<br />
    }<br />
    else<br />
    {<br />
        // Decrease the value for seconds.<br />
        numSeconds = numSeconds - 1;<br />
        <br />
        // Continue the delayed process.<br />
        timerId = self.setTimeout("UpdateMap()", timerInterval);<br />
    }<br />
}<br />
</script>




It works fine, when used on a standalone page, but when I am using masterpage and contentpages and I paste it into my content page (between <asp:content> and tags) it does not work. I'm a newbie at javascripts and I assume that there is something simple to correct. Could you please help me to make this script work under my content page?



Regards,

Piote
Questioni would like to add counter and download photos Pin
HishamAlsayed17-Oct-07 21:33
HishamAlsayed17-Oct-07 21:33 
AnswerRe: i would like to add counter and download photos Pin
il_masacratore17-Oct-07 21:40
il_masacratore17-Oct-07 21:40 
GeneralRe: i would like to add counter and download photos Pin
HishamAlsayed17-Oct-07 21:45
HishamAlsayed17-Oct-07 21:45 
GeneralRe: i would like to add counter and download photos Pin
Bjohnson3317-Oct-07 23:45
Bjohnson3317-Oct-07 23:45 
GeneralRe: i would like to add counter and download photos Pin
John-ph18-Oct-07 2:05
John-ph18-Oct-07 2:05 
Questionwindow closing event Pin
Sonia Gupta17-Oct-07 21:19
Sonia Gupta17-Oct-07 21:19 
AnswerRe: window closing event Pin
Guffa17-Oct-07 21:44
Guffa17-Oct-07 21:44 
GeneralRe: window closing event Pin
Sonia Gupta17-Oct-07 21:48
Sonia Gupta17-Oct-07 21:48 
AnswerRe: window closing event Pin
Guffa18-Oct-07 4:49
Guffa18-Oct-07 4:49 
AnswerRe: window closing event Pin
Imran Khan Pathan17-Oct-07 21:46
Imran Khan Pathan17-Oct-07 21:46 
GeneralRe: window closing event Pin
Sonia Gupta17-Oct-07 21:51
Sonia Gupta17-Oct-07 21:51 
GeneralRe: window closing event[off topic] Pin
ThatsAlok17-Oct-07 22:17
ThatsAlok17-Oct-07 22:17 
AnswerRe: window closing event Pin
Jintal Patel17-Oct-07 22:58
Jintal Patel17-Oct-07 22:58 
QuestionMaintainScrollPosition in masterpage + ajax Pin
sdsdsds@hotmail.com17-Oct-07 20:58
sdsdsds@hotmail.com17-Oct-07 20:58 
AnswerOK, I found out a few things about the treeView Pin
sdsdsds@hotmail.com18-Oct-07 2:30
sdsdsds@hotmail.com18-Oct-07 2:30 
QuestionLooking for advice Pin
Ahmad Adnan17-Oct-07 20:45
Ahmad Adnan17-Oct-07 20:45 
AnswerRe: Looking for advice Pin
il_masacratore17-Oct-07 21:47
il_masacratore17-Oct-07 21:47 

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.