AJAX Forums

innerHTML Question

This is a discussion on innerHTML Question within the AJAX Questions forums, part of the Beginners AJAX category; This is obviously not a direct Ajax question, but thought someone would be able to help since it's a common action in Ajax-based pages. My page contains a '...

Old 04-24-2008, 01:00 PM   #1 (permalink)
Junior Member
 
Join Date: Apr 2008
Posts: 5
Rep Power: 0 javarunner is on a distinguished road
innerHTML Question

This is obviously not a direct Ajax question, but thought someone would be able to help since it's a common action in Ajax-based pages.
My page contains a 'div' tag like <div id='foo'></div>
In my script I get a handle to this tag by:
var foobar = document.getElementById("foo");
When I reference it as:
foobar.innerHTML = options;
where options contains a value which I've built in my script. I can display it in an alert right before the getElementById.
I get an exception that says foobar has no properties.
Does anyone know why?
TIA...
javarunner is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes



All times are GMT -4. The time now is 03:12 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5
Copyright ©2006 - 2008, AJAXwith.com