Solved

Javascript 'getElementById' not working with dynamic html

Posted on 2011-02-17
6
254 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
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…

786 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