I have a JS file, where I have show_clock function to call. I calling
her like this<body onload="show_clock()">, but nothing happens. The clock
don't appear.

In your opinion what should I do? Use "RegisterClientScriptBlock" and/or
"RegisterStartupScript".? If yes, how can I use them?


--

Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

Re: JavaScript file by Cowboy

Cowboy
Thu Mar 04 13:25:22 CST 2004

I need to look at the documentation, but one of the two runs prior to the
HTML being written out. This is not the one you want to use. The other puts
the script at the end of the load, which is what you will want. I believe
the RegisterClientScriptBlock is the correct one to have it run after the
HTML is written out, but would have to check the docs to see.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
"ruca" <ruuca@iol.pt> wrote in message
news:e3tpEYhAEHA.2600@TK2MSFTNGP09.phx.gbl...
> I have a JS file, where I have show_clock function to call. I calling
> her like this<body onload="show_clock()">, but nothing happens. The clock
> don't appear.
>
> In your opinion what should I do? Use "RegisterClientScriptBlock" and/or
> "RegisterStartupScript".? If yes, how can I use them?
>
>
> --
>
> Thank's (if you try to help me)
> Hope this help you (if I try to help you)
> ruca
>
>



Re: JavaScript file by Kevin

Kevin
Thu Mar 04 13:36:28 CST 2004

RegisterClientScriptBlock() puts the script just after the <form> tag on the
page. RegisterStartupScript() puts the script just before the </form> tag in
the page.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in
message news:Oekmx5hAEHA.3004@TK2MSFTNGP10.phx.gbl...
> I need to look at the documentation, but one of the two runs prior to the
> HTML being written out. This is not the one you want to use. The other
puts
> the script at the end of the load, which is what you will want. I believe
> the RegisterClientScriptBlock is the correct one to have it run after the
> HTML is written out, but would have to check the docs to see.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> **********************************************************************
> Think Outside the Box!
> **********************************************************************
> "ruca" <ruuca@iol.pt> wrote in message
> news:e3tpEYhAEHA.2600@TK2MSFTNGP09.phx.gbl...
> > I have a JS file, where I have show_clock function to call. I calling
> > her like this<body onload="show_clock()">, but nothing happens. The
clock
> > don't appear.
> >
> > In your opinion what should I do? Use "RegisterClientScriptBlock" and/or
> > "RegisterStartupScript".? If yes, how can I use them?
> >
> >
> > --
> >
> > Thank's (if you try to help me)
> > Hope this help you (if I try to help you)
> > ruca
> >
> >
>
>



Re: JavaScript file by ruca

ruca
Fri Mar 05 04:13:39 CST 2004

Right.
But I still don't know how and where to use one of them. Where should I call
them?



--

Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"Kevin Spencer" <kevin@takempis.com> escreveu na mensagem
news:O4NxkAiAEHA.448@TK2MSFTNGP11.phx.gbl...
> RegisterClientScriptBlock() puts the script just after the <form> tag on
the
> page. RegisterStartupScript() puts the script just before the </form> tag
in
> the page.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in
> message news:Oekmx5hAEHA.3004@TK2MSFTNGP10.phx.gbl...
> > I need to look at the documentation, but one of the two runs prior to
the
> > HTML being written out. This is not the one you want to use. The other
> puts
> > the script at the end of the load, which is what you will want. I
believe
> > the RegisterClientScriptBlock is the correct one to have it run after
the
> > HTML is written out, but would have to check the docs to see.
> >
> > --
> > Gregory A. Beamer
> > MVP; MCP: +I, SE, SD, DBA
> >
> > **********************************************************************
> > Think Outside the Box!
> > **********************************************************************
> > "ruca" <ruuca@iol.pt> wrote in message
> > news:e3tpEYhAEHA.2600@TK2MSFTNGP09.phx.gbl...
> > > I have a JS file, where I have show_clock function to call. I calling
> > > her like this<body onload="show_clock()">, but nothing happens. The
> clock
> > > don't appear.
> > >
> > > In your opinion what should I do? Use "RegisterClientScriptBlock"
and/or
> > > "RegisterStartupScript".? If yes, how can I use them?
> > >
> > >
> > > --
> > >
> > > Thank's (if you try to help me)
> > > Hope this help you (if I try to help you)
> > > ruca
> > >
> > >
> >
> >
>
>



Re: JavaScript file by ruca

ruca
Fri Mar 05 08:01:43 CST 2004

Can you help me, please. I'm a litle urgency on that and I don't know what
to do.

Thanks
Ruca

"Kevin Spencer" <kevin@takempis.com> escreveu na mensagem
news:O4NxkAiAEHA.448@TK2MSFTNGP11.phx.gbl...
> RegisterClientScriptBlock() puts the script just after the <form> tag on
the
> page. RegisterStartupScript() puts the script just before the </form> tag
in
> the page.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in
> message news:Oekmx5hAEHA.3004@TK2MSFTNGP10.phx.gbl...
> > I need to look at the documentation, but one of the two runs prior to
the
> > HTML being written out. This is not the one you want to use. The other
> puts
> > the script at the end of the load, which is what you will want. I
believe
> > the RegisterClientScriptBlock is the correct one to have it run after
the
> > HTML is written out, but would have to check the docs to see.
> >
> > --
> > Gregory A. Beamer
> > MVP; MCP: +I, SE, SD, DBA
> >
> > **********************************************************************
> > Think Outside the Box!
> > **********************************************************************
> > "ruca" <ruuca@iol.pt> wrote in message
> > news:e3tpEYhAEHA.2600@TK2MSFTNGP09.phx.gbl...
> > > I have a JS file, where I have show_clock function to call. I calling
> > > her like this<body onload="show_clock()">, but nothing happens. The
> clock
> > > don't appear.
> > >
> > > In your opinion what should I do? Use "RegisterClientScriptBlock"
and/or
> > > "RegisterStartupScript".? If yes, how can I use them?
> > >
> > >
> > > --
> > >
> > > Thank's (if you try to help me)
> > > Hope this help you (if I try to help you)
> > > ruca
> > >
> > >
> >
> >
>
>



Re: JavaScript file by Kevin

Kevin
Fri Mar 05 08:20:14 CST 2004

Here's a link to the freely downloadable Microsoft .Net SDK (Software
Development Kit), which documents these functions as well as the entire CLR
(Common Language Runtime Library), and includes examples, tutorials, and
articles to help you.

http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4070-9F41-A333C6B9181D&displaylang=en

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"ruca" <ruuca@iol.pt> wrote in message
news:Ol5ztnrAEHA.2300@TK2MSFTNGP10.phx.gbl...
> Can you help me, please. I'm a litle urgency on that and I don't know what
> to do.
>
> Thanks
> Ruca
>
> "Kevin Spencer" <kevin@takempis.com> escreveu na mensagem
> news:O4NxkAiAEHA.448@TK2MSFTNGP11.phx.gbl...
> > RegisterClientScriptBlock() puts the script just after the <form> tag on
> the
> > page. RegisterStartupScript() puts the script just before the </form>
tag
> in
> > the page.
> >
> > --
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > Big things are made up
> > of lots of little things.
> >
> > "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote
in
> > message news:Oekmx5hAEHA.3004@TK2MSFTNGP10.phx.gbl...
> > > I need to look at the documentation, but one of the two runs prior to
> the
> > > HTML being written out. This is not the one you want to use. The other
> > puts
> > > the script at the end of the load, which is what you will want. I
> believe
> > > the RegisterClientScriptBlock is the correct one to have it run after
> the
> > > HTML is written out, but would have to check the docs to see.
> > >
> > > --
> > > Gregory A. Beamer
> > > MVP; MCP: +I, SE, SD, DBA
> > >
> > > **********************************************************************
> > > Think Outside the Box!
> > > **********************************************************************
> > > "ruca" <ruuca@iol.pt> wrote in message
> > > news:e3tpEYhAEHA.2600@TK2MSFTNGP09.phx.gbl...
> > > > I have a JS file, where I have show_clock function to call. I
calling
> > > > her like this<body onload="show_clock()">, but nothing happens. The
> > clock
> > > > don't appear.
> > > >
> > > > In your opinion what should I do? Use "RegisterClientScriptBlock"
> and/or
> > > > "RegisterStartupScript".? If yes, how can I use them?
> > > >
> > > >
> > > > --
> > > >
> > > > Thank's (if you try to help me)
> > > > Hope this help you (if I try to help you)
> > > > ruca
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: JavaScript file by Cor

Cor
Fri Mar 05 10:40:55 CST 2004

Hi Ruca,

Two samples in one.
Needs a label1 on a page and a HTML textbox with the name HTMLtextbox1

Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim scriptString As String = "<script language=JavaScript>" & _
"function ShowText() {document.Form1.HTMLTextBox1.value " & _
"= 'I hope this helps?'}" & _
"</script>"
Page.RegisterClientScriptBlock("clientScript", scriptString)

Dim str As String = "<script language " & _
"=javascript>alert('I hope this helps a little bit?');</script>"
Page.RegisterStartupScript("Startup", str)
Me.Label1.Text = "Does this works<br>I hope"

End Sub
I hope this helps a little bit?

Cor