Click here to Skip to main content
15,844,009 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Folder Browser dailogBox Pin
Marc Firth15-Jul-09 1:57
Marc Firth15-Jul-09 1:57 
GeneralRe: Folder Browser dailogBox Pin
raushan_915-Jul-09 2:02
raushan_915-Jul-09 2:02 
GeneralRe: Folder Browser dailogBox Pin
Marc Firth15-Jul-09 2:03
Marc Firth15-Jul-09 2:03 
GeneralRe: Folder Browser dailogBox Pin
raushan_915-Jul-09 2:14
raushan_915-Jul-09 2:14 
QuestionChange clientside printer settings through javascript in web applications Pin
raja baireddy14-Jul-09 19:51
raja baireddy14-Jul-09 19:51 
AnswerRe: Change clientside printer settings through javascript in web applications Pin
Marc Firth14-Jul-09 23:03
Marc Firth14-Jul-09 23:03 
GeneralRe: Change clientside printer settings through javascript in web applications Pin
raja baireddy15-Jul-09 21:13
raja baireddy15-Jul-09 21:13 
QuestionJavascript problem causing me issues!! Pin
Bryant May14-Jul-09 10:40
Bryant May14-Jul-09 10:40 
Hi there,

I am experiencing a problem which no doubt someone else has come across before but I cant work out for the life of me what the deal is with it.

I have included code below for an onload function and its call that enables me to be able to call multiple functions on-load. There are two at the moment, one that calls the current date and time and puts it in a div and another that "refreshes" an AJAX call and places content in yet another div.

The problem that I am having is that although both functions are being called (the second one is made in another script using a version of the same function call), only the second one is actually producing visible content (in this case a text field). However if I alert a message between the function calls both bits of content are produced as expected.

The code is as follows:

//The function call
print "window.onload = callOnLoads(\"getCurDateTime\", \"\", \"\", \"\")";



//The function definition
function callOnLoads(pageFunction1, pageFunction2, var1, var2)
{
    return function() 
    {              
        if (pageFunction1 == "getCurDateTime")
        	getCurDateTime();
        
               
        //var 1 in this case is the dirToUse variable and var 2 is the userID	        
        if (pageFunction2 == "addDocType")
        	addDocType("addTypeDiv", "", "", var1, var2);      	
    }
}


The function call is made from a PHP script and the JS definition is held in a JS file.

Anybody have any ideas about this? Im guessing its something to do with the speed of execution given that if I halt it with an alert it then works!

As always, any help is very gratefully received.

Bryant
AnswerRe: Javascript problem causing me issues!! Pin
Marc Firth14-Jul-09 23:06
Marc Firth14-Jul-09 23:06 
QuestionGet ID and Name in Dropdownlist in Javascript Pin
.NET- India 13-Jul-09 23:58
.NET- India 13-Jul-09 23:58 
AnswerRe: Get ID and Name in Dropdownlist in Javascript Pin
Marc Firth14-Jul-09 23:09
Marc Firth14-Jul-09 23:09 
QuestionHow to fix a broken scrollbar in datagrid. Pin
smcirish13-Jul-09 6:52
smcirish13-Jul-09 6:52 
AnswerRe: How to fix a broken scrollbar in datagrid. Pin
Christian Graus13-Jul-09 8:45
protectorChristian Graus13-Jul-09 8:45 
Question2003 To 2005 Pin
Chris Maunderr13-Jul-09 3:19
Chris Maunderr13-Jul-09 3:19 
AnswerRe: 2003 To 2005 Pin
Christian Graus13-Jul-09 8:46
protectorChristian Graus13-Jul-09 8:46 
GeneralRe: 2003 To 2005 Pin
Chris Maunderr13-Jul-09 23:48
Chris Maunderr13-Jul-09 23:48 
QuestionServerside Form Posting Pin
Nic Rowan12-Jul-09 22:28
Nic Rowan12-Jul-09 22:28 
AnswerRe: Serverside Form Posting Pin
Marc Firth13-Jul-09 22:54
Marc Firth13-Jul-09 22:54 
QuestionClassic ASP and 'AJAX', and a database update Pin
AaronM_NZ12-Jul-09 16:22
AaronM_NZ12-Jul-09 16:22 
Question[Message Deleted] Pin
RichardBlank11-Jul-09 8:29
RichardBlank11-Jul-09 8:29 
AnswerRe: Work and play in Costa Rica? Pin
Christian Graus12-Jul-09 5:52
protectorChristian Graus12-Jul-09 5:52 
QuestionDisplay the contents in all resolution Pin
yesu prakash10-Jul-09 20:29
yesu prakash10-Jul-09 20:29 
AnswerRe: Display the contents in all resolution Pin
Christian Graus11-Jul-09 5:01
protectorChristian Graus11-Jul-09 5:01 
QuestionNeed help submitting values to Active Directory - Novice level Pin
kouts10-Jul-09 10:58
kouts10-Jul-09 10:58 
Questionauthentification Pin
bhs200810-Jul-09 4:03
bhs200810-Jul-09 4:03 

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.