"Brian Henry" <> wrote in message
news:...
> It's kind of like a validation function, kind of hard to explain.
> Basically, when the user clicks a button, i want to run a small function,
> and then if and only if a certain condition fails do i run the javascript.
I'm sorry, but I'm afraid you're should learn a bit more about the execution
model of ASP.NET before tackling this task. Perhaps this will help: The
ASP.NET Page Object Model
(
http://msdn.microsoft.com/library/de...-us/dnaspp/htm
l/aspnet-pageobjectmodel.asp?frame=true). Realize that this happens on the
initial request, and on _every_ postback.
--
John Saunders
johnwsaundersiii at hotmail
> "John Saunders" <> wrote in message
> news:...
> > "Brian Henry" <> wrote in message
> > news:%23W%...
> > > Is there a way to launch a javascript command from within VB code?
For
> > > instance, to issue a window.open(some url) if a certain condition is
> met.
> > I
> > > know you can add the javacript to a control event at runtime, but i
need
> > to
> > > just launch it, not wait for the user to click something.
> >
> > JavaScript is just text in a response the server sends to the client.
> Unless
> > you are sending text to the client, there will be no JavaScript. The
only
> > time you can send text to the client is at the end of the request.
> >
> > Also, you seem to have some code, and you want that code to launch some
> > JavaScript. But how did that code get called if the user didn't click
> > anything?
> > --
> > John Saunders
> > johnwsaundersiii at hotmail
> >
> >
>
>