Solved

Javascript 'getElementById' not working with dynamic html

Posted on 2011-02-17
6
259 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

734 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