473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Java Script in Master Page

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?

Nov 19 '05 #1
2 4801
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" <yi***********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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?

Nov 19 '05 #2
hi sarvana,
do u happen to have a code example?
yaniv
Saravana wrote:
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" <yi***********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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?


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Venturer | last post by:
I have a banner script that is included in php on a website but the actual script is hosted on a different site allowing me to only edit one file to update the script. I need to store in a...
0
by: Eric | last post by:
I have a master page, and want each derived page to have a separate script associated with it. However, I'm not sure where to put the <script> tag. I tried putting it into the Derived.aspx inside...
1
by: Larry Rebich | last post by:
I'm using some Java Script I found that supports a 'back' button on my ASP.Net page. The Asp.Net page uses a Master page. I thought I'd put the Java Script in a Java Script file . The thought was...
2
by: Antonio | last post by:
Hi, I would like to have my TreeNode to call window.close(); without posting back, how can I do that? At the same time, I prefer to have a SelectAction property that allows my TreeNode to appear...
8
by: Milsnips | last post by:
hi there, i'm currently using the following line: <script language="javascript" type="text/javascript" src="../scripts/timer.js"></script> but i want to do the following, as the script...
1
by: bobby421 | last post by:
Hi, I have a master page and content page. In content page I have to validate the text boxes for name,address, phone number and email address etc. But as content pages doersn't have html section...
1
by: anilkumar1980 | last post by:
Hi All, Here I need help to all of u, I am using ASP.NET 2.0 and Third party Infragistic Controls. I Have included master page in my page (<%@ Page Language="VB"...
2
by: =?Utf-8?B?REo=?= | last post by:
I have a peculiar problem here that I did not have until I migrated from ASP.NET 2.0 to 3.5. I use a master page for my application. Because the master page uses update panels I have the...
2
by: Jay | last post by:
I have a web app running on the windows CE device. In one of the asp.net pages - it has javascript code. That seems to have a memory leak. When I run the web app - in about one hour, the app hangs....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.