Connecting Tech Pros Worldwide Help | Site Map

Java Script in Master Page

y2rottem
Guest
 
Posts: n/a
#1: Nov 19 '05
Hi all,
I am trying, to use form fields and a Master page:
I have a form built within the <asp:contentpage>. trying to read its
fields using JavaScript I get errors.viewing the generated html source
i realized that all the controls got a different name
"ctl00...<original name>".
how should i read/set the values using java script?

Saravana
Guest
 
Posts: n/a
#2: Nov 19 '05

re: Java Script in Master Page


Use server side property "ClientID" of control to get the actual id of
control, then use that id to access your control in client side function.

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com


"y2rottem" <yiftah.rottem@gmail.com> wrote in message
news:1104951762.383414.322800@z14g2000cwz.googlegr oups.com...[color=blue]
> Hi all,
> I am trying, to use form fields and a Master page:
> I have a form built within the <asp:contentpage>. trying to read its
> fields using JavaScript I get errors.viewing the generated html source
> i realized that all the controls got a different name
> "ctl00...<original name>".
> how should i read/set the values using java script?
>[/color]


yyanec@gmail.com
Guest
 
Posts: n/a
#3: Nov 19 '05

re: Java Script in Master Page


hi sarvana,
do u happen to have a code example?
yaniv
Saravana wrote:[color=blue]
> Use server side property "ClientID" of control to get the actual id[/color]
of[color=blue]
> control, then use that id to access your control in client side[/color]
function.[color=blue]
>
> --
> Saravana
> http://dotnetjunkies.com/WebLog/saravana/
> www.ExtremeExperts.com
>
>
> "y2rottem" <yiftah.rottem@gmail.com> wrote in message
> news:1104951762.383414.322800@z14g2000cwz.googlegr oups.com...[color=green]
> > Hi all,
> > I am trying, to use form fields and a Master page:
> > I have a form built within the <asp:contentpage>. trying to read[/color][/color]
its[color=blue][color=green]
> > fields using JavaScript I get errors.viewing the generated html[/color][/color]
source[color=blue][color=green]
> > i realized that all the controls got a different name
> > "ctl00...<original name>".
> > how should i read/set the values using java script?
> >[/color][/color]

Closed Thread