Click here to Skip to main content
15,911,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
opener.document.getElementById("id").value;
its giving value when it is compatibility ,and its giving error like object required when it is in compatibility view is off


can any one suggest me how can i solve this


Thanks
Posted
Updated 26-Aug-11 1:59am
v4

In IE8 Standards Mode (as opposed to Compatibility Mode) the getElementById method is case sensitive. Is your ID name the right case? Should it be "ID", or maybe "Id"?
 
Share this answer
 
Comments
Code_seeker_ 26-Aug-11 8:18am    
"id" is just given as example thats it,code working fine when compatibility view is on, when it is off same code showing object required
#realJSOP 26-Aug-11 8:45am    
But what I'm telling you is that IE8 Standards mode REQUIRES that the specified element name (or ID) is CASE-SENSITIVE. THAT is your problem.
have to pass exact value to getElementById Method as it is case sensitive. so check the id which you have passed is correct or not
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900