FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister  MasterVB.NET
Visual Basic 2005 .NET Forum
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Too many AJAX calls?
 
Post new topic   Reply to topic    MasterVB.NET Forum Index -> Web Forms
View previous topic :: View next topic  
Message
Author
MPiccinato
Newbie
Joined: 20 Jul 2006
Posts: 2

PostPosted: Thu Jul 20, 2006 4:00 am    
Post subject: Too many AJAX calls?
Reply with quote

Hello,

I am having an issue where my javascript variables seem to be getting all out of whack when I do multiple AJAX calls.
The exacit issue is that 'FormID' is not always the correct value when it is referencing itself. Sometimes it is 'pnlSales'
when it should be 'pnlManufacturing'.

Here is my code

// Fills In all forms, called on Body Load function fillPage()
{
fillForms('pnlEngineering', getECP())
fillForms('pnlSales', getECP());
fillForms('pnlManufacturing', getECP());
}

function fillForms(FormID, ECP)
{
// Display loader
loader('show', 'Loading...');

// Each table has the same first 5 rows
columnOffSet = 5;
currency = 4;

tableName = '';
// Determine which table to go to
switch(FormID)
{
case 'pnlEngineering':
tableName = 'tc_EngInput';
break;
case 'pnlSales':
tableName = 'tc_SalesInput';
case 'pnlManufacturing':
tableName = 'tc_Manufacturing';
break;
}

TestApp.TargetCosting.returnForm(ECP, tableName, function(res)
{ if(res.value[0] != null)
{ // Gets all the Elements in FormID that are inputs
var TextInputs =
document.getElementById(FormID).getElementsByTagName('input');
});

return false;
}


Thanks for any help in advance,

Mat



 

Back to top
View user's profile Send private message
Author
MPiccinato
Newbie
Joined: 20 Jul 2006
Posts: 2

PostPosted: Thu Jul 20, 2006 4:00 am    
Post subject:
Reply with quote

Nevermind =D. After reading around some more I came across a post with the same problem...said something about using Fiddler. So I used Fiddler to see what was going on. A 'break' was missing from my switch statement =(. Ooooh thats funny.



 

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MasterVB.NET Forum Index -> Web Forms All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Archieve

Powered by phpBB © 2001, 2002 phpBB Group, used in Visual Basic 2005 .NET Forum

| Visual Basic .NET Forum | Online Recipe Archiver | Shareware Freeware PAD | Lowongan Kerja | Kamus Online | Health Supply | Digital Camera Review |
Orang Paling Keren

RSS