Re: Javascript code
From: Bruno Sirianni (brunosirianni_at_virgilio.it)
Date: 04/03/04
- Next message: Bruno Sirianni: "Re: tool tip?"
- Previous message: Max: "Re: logout"
- In reply to: Shaul Feldman: "Re: Javascript code"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 3 Apr 2004 12:29:01 +0200
On serverside you cannot debug clientside script.
Make script in Html and then turn it into String on server can be a
solution. This string on server can be changed dinamically for accept
parameters.
RegisterClientScriptBlock MSDN remark:
The client-side script is emitted just after the opening tag of the Page
object's <form runat= server> element. The script block is emitted as the
object that renders the output is defined, so you must include both tags of
the <script> element.
RegisterStartupScript MSDN remark:
Similar to the RegisterClientScriptBlock method, this method emits the
script just before the closing tag of the Page object's <form runat= server>
element. The script block is emitted as the object that renders the page is
defined, so you must include both tags of the <script> element.
Brun
"Shaul Feldman" <sfeldman@writeme.com> wrote in message
news:uTyVodVGEHA.712@tk2msftngp13.phx.gbl...
> Thank you for help,
> the problem is when you write
> >> htmlInput.Attributes["OnChange"] = "doSomething();"
> the "doSomething();" is a string, and I can't debug it on the server side,
> only accept client-side errors.
> Is there any efficient way to write that "doSomething();" than a simple
> string object, in order to debug?
> Or I should first write it in regular html file and only after that turn
> into String on server-side?
> Also would you be so kind to stay on the differences between those two
> methods you wrote, "RegisterClientScriptBlock" and
"RegisterStartupScript" -
> what are differences?
> Thanks a lot again :)
>
> --
> With the best wishes,
> Shaul Feldman
>
>
> "Bruno Sirianni" <brunosirianni@virgilio.it> wrote in message
> news:zxubc.12749$rM4.500302@news4.tin.it...
> > With ASP.NET javascript generate serverside is very simple.
> > You can use RegisterClientScriptBlock or RegisterStartupScript method.
> > For Javascript fired by html element you can make this element runat
> server
> > and write code similar this :
> > htmlInput.Attributes["OnChange"] = "doSomething();"
> >
> > Brun
> >
> >
> > "Shaul Feldman" <sfeldman@writeme.com> wrote in message
> > news:e8T$0PUGEHA.624@TK2MSFTNGP10.phx.gbl...
> > > Hello,
> > > I'm trying to figure out what's the most convinient way to write
> > JavaScript
> > > code in ASP.Net, espacially when JavaScript code has to recieve
certain
> > > values from server side. In classic ASP it was quiet simple, here I
get
> in
> > > trouble. Thank you for your help.
> > >
> > > S. Feldman
> > >
> > >
> >
> >
>
>
- Next message: Bruno Sirianni: "Re: tool tip?"
- Previous message: Max: "Re: logout"
- In reply to: Shaul Feldman: "Re: Javascript code"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|