CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 1/16/2007 9:34:43 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 34 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
6 Items, 1 Pages 1 |< << Go >> >|
mehulmistry
Asp.Net User
How to call form elements?1/16/2007 9:34:43 AM

0/0

hi,

  I'm creating a small web application in ASP 2.0.

I'm using master page to club my entire set of pages. I've one problem. In some of my page,I'm using javascript,where in I'm using some control's value in the form.I'm doing this by javascript's document.getElementById("SomeControlName"). This works fine on individual page,but not after combining hat page to master page. What should I replace in the javascript instead of document.getelementById.

Thanks.


-------------------------------------------
Thanks,
Mehul Mistry


If you feel your question is answered then please click "Mark As Answer" to the post that answered it. Thanks :-)
tfsmag
Asp.Net User
Re: How to call form elements?1/16/2007 3:54:53 PM

0/0

have you tried document.getElementById("<%=controlname.clientID%>")

this has worked for me in the past.  
 


------------------------------------------------
Jeff Turner (simpleModus)

Don't forget to mark the correct answer for your
question to help out future visitors!
markwsanders
Asp.Net User
Re: How to call form elements?1/16/2007 3:58:09 PM

0/0

When you use a Master Page your control name is going to get rendered with the name of Content Place Holder prefixing it. Are you hard coding "document.getElementById"? If so, try using this code:

1    string javascriptCode = String.Format("document.getElementById('{0}')", myControl.ClientID);
 
Mark Sanders, MCAD, MSBS

Be a part of the Community Recognition Program. Click "Mark as Answer" on the post that answered your question. This gives you points and rewards the person who helped you as well.
akjoshi
Asp.Net User
Re: How to call form elements?1/16/2007 5:34:37 PM

0/0

When you use a Master Page your control name is going to get rendered with the name of Content Place Holder prefixing it. 

and in the case of usercontrols too, name of usercontrol gets appended to control, you can check this yourself by checking View source of your page.

you should always use ClientId as suggested in above posts, while accessing controls with attribute runat="Server" in javascript.


Aj
mehulmistry
Asp.Net User
Re: How to call form elements?1/17/2007 7:14:02 AM

0/0

hi,

  Thanks a lot. As in above reply. I had seen the control appended with something like aspnetForm._ctl0_ContentPlaceHolder.

 

Thanks again,


-------------------------------------------
Thanks,
Mehul Mistry


If you feel your question is answered then please click "Mark As Answer" to the post that answered it. Thanks :-)
mehulmistry
Asp.Net User
Re: How to call form elements?1/17/2007 10:05:45 AM

0/0

hi,
-------------------------------------------
Thanks,
Mehul Mistry


If you feel your question is answered then please click "Mark As Answer" to the post that answered it. Thanks :-)
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
JavaScript: The Definitive Guide Authors: David Flanagan, Pages: 916, Published: 2002
Webmaster in a Nutshell: A Desktop Quick Reference Authors: Stephen Spainhour, Robert Eckstein, Pages: 561, Published: 2003
The Critique of Pure Reason Authors: Immanuel Kant, J. M. D. Meiklejohn, Pages: 444, Published: 2005
Old Testament Exegesis: A Handbook for Students and Pastors Authors: Douglas K. Stuart, Pages: 179, Published: 2001

Web:
ajax call not seeing form elements : javascript ajax in the following code I am getting an error on the url parameters saying that the form elements are not defined. Why doesnt it see them.
Call ASP fucntion from form element event - DevX.com Forums Call ASP fucntion from form element event ASP.NET.
Pass Form elements to External Method — Plone CMS: Open Source ... Jul 1, 2007 ... A quick outline of how to pass request.form elements to an external ... #call external method to get existing data which is returned in last ...
Script to validate all form fields for null in one quick call Script to validate all form fields for null in one quick call. Get the latest IT articles in our Javascript / DHTML / Ajax Articles section.
IT Resource Center forums - Restricting access to form fields ... This is the Service Call form and the fields I want to restrict are ... In OVSD the read/write access restriction to the form element is ...
Creating a new form element: hook_elements - Wesley Tanaka #theme : You can set a form element's #theme. For example, if you set $element[' #theme'] to 'froggy', the element will be rendered with a call to ...
Using the DOM to get info about form elements [Archive ... I also forgot that this is how I call the function: ... You really don't need to send the form element - it's obsolete as you don't use if in the function. ...
.serialize and form elements in tables - jQuery (English) | Google ... the serialize call doesn't do the necessary preparation - it .... Yet, if I drop the table structure around the form elements, ...
Forum OpenACS Q&A: Validating form elements with the form builder You may request notification for Validating form elements with the .... validate when you call is_valid (at which point the form is created ...
Hiding Form Elements - Ext JS Forums When you call .hide() on a form element, shouldn't the label be hidden as well? If not, is there a way to get access to the created label so ...

Videos:
Portlet Encode NameSpace: How to Encode a Portal NameSpace For the original tutorial, please look follow the portal tutorials link at the top of my webpage on Hibernate and JPA development. Thanks! This tuto...
Bagua Animals: The Qi Shaking Forms Volume 6: The Hawk MTG268 The 8 Baguazhang Animal Forms, Qi Awaking Forms Volume 6 The Falcon (Hawk) or Rooster Form: The Falcon's element is 'Fire' (some people call t...
Vacuum form mold/table This is a vacuum mold machine from an RV manufacturing plant originally designed for molding composite RV parts It includes: A hydraulic lift by ...
Bagua Hawk Boxing: Full Animal Form MTG323 MTG323 Bagua Eagle Boxing Full Animal Form Plus Applications See an Article: The Hawk's element is 'Fire' (some people call this animal the Rooster)...
Copywriting Secrets - How To Create Killer Order Forms That Get Prospects To Act In this video, you'll discover why the order form is absolutely crucial and how to make sure you're not losing easy sales at the last minute!
Hear and Play Jazz 101: Blues Form Step By Step on Piano Visit http://www.HearandPlayJazz.com Hear and Play Jazz 101 Clip Discover: * How to quickly and easily form tons of jazz chord patterns and runs t...
Michigan Dog Bite Law Basics Michigan Dog Attacks: What Are Your Rights in Michigan Dog Bite Law? Michigan has what we call a strict liability law that applies to dog attacks. ...
Vincent Chu - Fast Form Weekend Seminar 42 Techniques Application Solo Form (Small Frame Solo Form) Seminar with Vincent Chu. Dates: Saturday July 12, 2008 (6:00pm to 9:00pm), and Sunday ...
Bridging Heaven & Earth Show #137 w/ B. Bell/D. Todd & Premal/Miten Music Videos Bonnie and David are co creators of GaiaStar Mandalas, ecstatic visions of the living earth. Their goal in creating their magnificent artwork and evo...
Jazz improvisations by Franco Tenelli Franco Tenelli's live impros in home studio Watch other original music and clips from francotenelli: Dancing with the Diablo (Trance, psycodelic) O...




Search This Site:










ttt application pack dnn 1.0.10 (mk.bat errors)

mystery function

photovision module from bring2mind.net

dnn 3.0.12- gallery module skin issue

detect user id from control in a page

2.1.1 ftb preview returns html markup

query

sqldataprovider and dataprovider in dnn2

pa installer: issue? defect? stupid programmer?

css layout / design

dnn and e-learning

getting userid from membership

event / calendar reminders

beta 2.0.2 no exception viewer

error uploading forum module

solpartmenu page categories?

who owns this dnn site????

case sensitivity on sqls

sorry double post

vertical tabs how to?

migration from asp code to dnn

3.0.8 - print function

debug dnn pa modules with vs.net

has dnn b2 been released yet?

root menu item that doesn't link to a page

has anyone tried to upgrade nexxus enhanced 1.0.9 to dnn 1.0.10?

keep alive option in core?

deli order entry web portal ?

class="head" issues

erro runing the dotnuke3.2.2 please help

  Privacy | Contact Us
All Times Are GMT