Problem with AJAX pageLoad event?

0 views
Skip to first unread message

CORK

unread,
May 13, 2008, 11:59:59 AM5/13/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I am having an issue, and I am not sure why. I have googled my a** off
and can't find anyone else with a similar problem.

In the AJAX pageLoad event, I do some stuff where I load up controls
and make previous selections. Sporadically, these things will not
happen. Doing everything the exact same way will not duplicate the
issue, so it seems to be some kind of timing thing. If I refresh the
page after this happens, everything is cool. Comparing the source in
both pages, they are identical. I cannot duplicate this EVER while
running the app in VS. I get no javascript errors whatsoever.

Here is my pageLoad. If you want to see or know anything else, feel
free to ask.

function pageLoad(sender, e)
{
PopulateCategoryOptions();
if ((prodcat != null) && (prodcat != ""))
{
PopulateProductOptions();
}
if ((searchstr != null) && (searchstr != ""))
{
$get('Keyword').value = searchstr;
}
PopulateSearchTypeOptions();
PopulateModPeriodOptions();
if (parseInt(mod) >= 0)
{
$get('Mod').value = mod;
}
PopulateDocCategoryOptions();
if (esconly == 1)
$get('EscalatedCheck').checked = true;
else
$get('EscalatedCheck').checked = false;
}

Thanks in advance to all,
-cork

Andrew Badera

unread,
May 13, 2008, 1:18:14 PM5/13/08
to DotNetDe...@googlegroups.com
have you ensured that the method is absolutely not being called by placing a callout in the first line? alert box or whatever? you're certain it's not failing on an earlier instruction, perhaps silently?
--
--
--Andy Badera
http://higherefficiency.net
http://flipbitsnotburgers.blogspot.com/
http://andrew.badera.us/
http://changeroundup.com/
and...@badera.us
(518) 641-1280
Google me: http://www.google.com/search?q=andrew+badera

CORK

unread,
May 13, 2008, 2:49:35 PM5/13/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Andrew:

I am not sure it isn't being called. I placed an alert in my
development code, but I cannot get it to happen when running in the
IDE, only in production. It could be failing silently, I suppose.

I think what I might have to do is set this up in a test environment
so I can put in all the alerts and logging I need to in order to solve
the problem.

-cork
> --Andy Baderahttp://higherefficiency.nethttp://flipbitsnotburgers.blogspot.com/http://andrew.badera.us/http://changeroundup.com/
> and...@badera.us
> (518) 641-1280
> Google me:http://www.google.com/search?q=andrew+badera- Hide quoted text -
>
> - Show quoted text -

Andrew Badera

unread,
May 14, 2008, 2:27:59 PM5/14/08
to DotNetDe...@googlegroups.com
Absolutely. You should always have an isolated development environment in which to thrash and play, and both then isolated environments for test/QA and then for production. Test/QA should always be a mirror of production, the only difference being the next generational work being tested on it.

Good luck, let us know how it goes.

CORK

unread,
May 20, 2008, 3:28:39 PM5/20/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I set this up in a test environment, and still could make no progress.
I ended up moving all the pageLoad stuff into the jquery ready event
handler (I am using jquery for a lot of common cross-browser js
stuff), and it solved my problem. Normally, I like to know *why*
something wasn't working, but in this case I had to have it fixed by
last Thursday ;)

Thanks for the help,
Corky
> > > Google me:http://www.google.com/search?q=andrew+badera-Hide quoted text

Andrew Badera

unread,
May 21, 2008, 6:29:54 AM5/21/08
to DotNetDe...@googlegroups.com
In the future in this kind of scenario, if you don't already, you might want to consider using a tracing pattern so you can optionally turn on intensive logging, via config file, in production. Personally I like the Enterprise Library Logging Application Block.
Reply all
Reply to author
Forward
0 new messages