|
|
| View previous topic :: View next topic |
| Message |
|
Author
|
MPiccinato
Newbie
|
Joined: 20 Jul 2006
Posts: 2
|
|
Posted: Thu Jul 20, 2006 4:00 am
Post subject: Too many AJAX calls? |
|
|
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 |
|
 |
|
Author
|
MPiccinato
Newbie
|
Joined: 20 Jul 2006
Posts: 2
|
|
Posted: Thu Jul 20, 2006 4:00 am
Post subject: |
|
|
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 |
|
 |
|
|
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
|
|