Re: RegisterStartupScript not executing script

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Mike (Mike_at_discussions.microsoft.com)
Date: 10/05/04


Date: Tue, 5 Oct 2004 09:03:09 -0700


Karl,

I have already tried with "alert" but nothing is shown. I also used
breakpoints, and I am sure that the line of code is executed.

The postback is caused by a javascript refresh. I wonder whether this could
be the problem.

Mike

"Karl Seguin" wrote:

> There's nothing wrong with what you've shown us.
>
> The possibilities are an error in your javascript or simply your if
> expression is never evaluating to true.
>
> Try replacing showBothGrids(); with alert('test'); and see if that works
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
>
> "Mike" <Mike@discussions.microsoft.com> wrote in message
> news:1D65B463-6D02-409A-AB1E-C28FDC3DBDA6@microsoft.com...
> >
> > Hi,
> >
> > I am trying to resize a HTML table through Javascript. When the user
> control
> > loads the first time, the table is resized, but then it doesn't anymore. I
> am
> > using the following code in the Load event of the web user control:
> >
> > if ( [expression] )
> > this.Page.RegisterStartupScript("CallBothGrids", "<script
> > language=javascript> { showBothGrids(); }</script>");
> > else
> > this.Page.RegisterStartupScript("CallFundsOnly", "<script
> > language=javascript> { showFundsOnly(); }</script>");
> >
> > The "CallFundsOnly is executed (the first time), but the "CallBothGrids"
> is
> > not. I don't see any error message when the page is rendered in Internet
> > Explorer.
> > Any idea of what could be wrong?
> >
> > Thanks.
> > Mike
> >
> >
>
>
>



Relevant Pages

  • eventtarget is null or is not an object
    ... "Karl" wrote in message news:OE2JU3QiEHA.2880@TK2MSFTNGP10.phx.gbl... ... > This is a known bug in ASP.Net 1.1, there's a hotfix to fix it. ... >> I get a javascript error while loading an ASP.Net page. ... The>> javascript generated by ASP.Net gives an error of an Expected ";". ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Extremely slow boot and lots of errors
    ... Did you try diabling all non-Microsoft entries in your startup list shown by MsConfig.Exe? ... then the screen is black for the other 15 min. and the error message ... "Failure- Security Options- Logon process has failed to create the security ...
    (microsoft.public.windows.vista.general)
  • Re: set method in base class
    ... > No there is no error message. ... > But the value of the element in the array is not changed when the array is ... real code ... Karl Heinz Buchegger ...
    (alt.comp.lang.learn.c-cpp)
  • Re: New set up, windows mail. Cant send or recieve
    ... We can't do much troubleshooting without an accurate, verbatim error message. ... Account 'mail.hughes.net': server: mail.hughes.net ... Thanks Karl ... What pop and smtp names did you enter? ...
    (microsoft.public.windows.vista.mail)
  • Re: Can recieve,but cannot send
    ... server*, check the box for My server requires authentication. ... >> The message stays in the Outbox and there is an error message. ... Does it stay in the Outbox? ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)