Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on javascript java objects
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Question on javascript java objects
Miscellaneous
Thread ID:
00994534
Message ID:
00994534
Views:
57
I expected this code to work but ie messages that cmi.course is null or not an object. I was really interested in the "status" string assignment
<!---- jot1.htm ---- test object constructs -->
<html><head>
<script language="javascript">
cmi=new Object();
this.course = new Object();
cmi.course.status="cmi.course.status";
alert("cmi.course.status = " + cmi.course.status);
</script></head><body><form></form></body></html>
This one works - but it takes a little more thought and code:
<!---- jot2.htm ---- test object constructs -->
<html><head>
<script language="javascript">
function status_property(){This.status = "The value of the status";}
courseNode = new status_property();
function course_container(){this.course = courseNode;}
cmi = new course_container();
alert("cmi.course.status = +cmi.course.status);
</script></head><body><form></form></body></html>
The "status will eventually point to a function and / or a INPUT form control. It just seems that the top snippet (jot1) should work. Eventually, a "naive" html will need to cycle through the frames and locate the "API" that will include the "cmi" objects - but that is naother question.
Thanks
Imagination is more important than knowledge
Reply
Map
View

Click here to load this message in the networking platform