tags:

views:

48

answers:

1
var tagID = document.getElementByn("<%=ddlSectionHeaderID%>").value;
var tagIndex = document.getElementById("<%=ddlSectionHeaderID%>").selectedIndex;
var tagName = document.getElementById("<%=ddlSectionHeaderID%>").children(tagIndex).innerText;
var exportID = document.getElementById("<%=hdnExportID%>").value;

This gives me "Object doesn't support this property"

A: 

It would help to see the rendered output and what references resulted in the rendered script.

The "Object doesn't support this property" error means that you are trying to access a property that does not exist for that object. perhaps when this script is rendered, what you think should be a select element is actually a text input. If that is the case, the selectedIndex property wont exist (this is just one possibility - you will know more if you were able to see the resulting string).

Gabriel McAdams
it is typo only while asking question. Code have getElementById
jatin
please read my updated answer.
Gabriel McAdams
Just for your knowledge, it works fine for IE6, IE7 and compatibility view of IE8
jatin
On what line is the error occurring?
Gabriel McAdams
I see that you accepted my answer, but I cannot tell whether you were able to fix your issue. Can you provide some details?
Gabriel McAdams