Solved

Javascript 'getElementById' not working with dynamic html

Posted on 2011-02-17
6
256 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

726 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