alanc5
asked on
Javascript Question please!
Boohoo , I'm having an issue, have a look at this:
<body>
<v:obj id="1" o:spt="142">
</body>
Question is, how on earth do you access the o:spt value through javascript? that just a normal html body tag...i can get the obj element through the id, but cant get at the o:spt bit.
Please help, I've hit a brick wall with this and cant move on.
Thanks.
<body>
<v:obj id="1" o:spt="142">
</body>
Question is, how on earth do you access the o:spt value through javascript? that just a normal html body tag...i can get the obj element through the id, but cant get at the o:spt bit.
Please help, I've hit a brick wall with this and cant move on.
Thanks.
ASKER
"value is null or not an object" or just plain "null" :o(
here's the complete test page:
<HTML
xmlns:v="urn:schemas-micro soft-com:v ml"
xmlns:o="urn:schemas-micro soft-com:o ffice:offi ce"
>
<HEAD>
<META http-equiv="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1">
<TITLE></TITLE>
<STYLE>
P{ margin: 0px; }
v\:* {behavior:url(#default#VML );}
o\:* {behavior:url(#default#VML );}
w\:* {behavior:url(#default#VML );}
</STYLE>
</HEAD>
<BODY>
<v:shapetype id="1" coordsize="" o:spt="142" adj="" path=""></v:shapetype>
<script>
var el=document.getElementById ("1");
alert(el.getAttribute("o:s pt"));
</script>
</BODY>
here's the complete test page:
<HTML
xmlns:v="urn:schemas-micro
xmlns:o="urn:schemas-micro
>
<HEAD>
<META http-equiv="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1">
<TITLE></TITLE>
<STYLE>
P{ margin: 0px; }
v\:* {behavior:url(#default#VML
o\:* {behavior:url(#default#VML
w\:* {behavior:url(#default#VML
</STYLE>
</HEAD>
<BODY>
<v:shapetype id="1" coordsize="" o:spt="142" adj="" path=""></v:shapetype>
<script>
var el=document.getElementById
alert(el.getAttribute("o:s
</script>
</BODY>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yeah thats what's causing me the heartache...but without that line the rest of the program falls over :o/
I cant think why that would cause that to happen.
I cant think why that would cause that to happen.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for trying guys, no matter what I try there's no way to modify that parameter and I cant check out the schema. According to MS its read/write, but that's obviously not the case.
Hope you dont mind me splitting the points.
Regards,
Al
Hope you dont mind me splitting the points.
Regards,
Al
Yeah, well it says in the reference, the attribute is used internally whatever that means.
AJ
AJ
function showIt() {
var xobj
xobj = document.getElementById("1
window.alert(xobj.getAttri
}