Solved

Javascript 'getElementById' not working with dynamic html

Posted on 2011-02-17
6
255 Views
Last Modified: 2012-05-11
Hello Experts -

I'm creating some dynamic HTML with .NET code, and when I try to reference a hidden input element with Javascript, it's giving me an 'Object Required' error. I'm using this code with Ajax, so I figured it's safe.

Any thoughts?

Thanks
0
Comment
Question by:tablaFreak
  • 3
  • 3
6 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 34921615
>I'm creating some dynamic HTML with .NET code

View source of the page to see/check it
0
 
LVL 82

Assisted Solution

by:leakim971
leakim971 earned 500 total points
ID: 34921622
check the id attribute, it's case sensitive
0
 

Author Closing Comment

by:tablaFreak
ID: 34921729
Thanks for your help - duh, when I checked, I discovered I was naming the elements with 'name=""' as opposed to 'id=""'. So
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:tablaFreak
ID: 34921732
that was a humbler.
0
 
LVL 82

Expert Comment

by:leakim971
ID: 34921785
thanks for the points! have a nice end of week and lot of fun!
0
 

Author Comment

by:tablaFreak
ID: 34921877
sure thing - you, too!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question