File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes JavaScript not working in IE7 but working in firefox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JavaScript not working in IE7 but working in firefox" Watch "JavaScript not working in IE7 but working in firefox" New topic

JavaScript not working in IE7 but working in firefox

carina caoor
Ranch Hand

Joined: Jun 23, 2007
Posts: 300

hi my javascript is

function getCode()
opener.document.createplotform.sacode.value = document.areacodeform.areacoderadio[i].value;

var skipcycle = false;

var xmlHttp;
function createXmlHttpRequest()

xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp=new ActiveXObject("Msml2.XMLHTTP");

else if(window.XMLHttpRequest)
xmlHttp=new XMLHttpRequest();
return xmlHttp;

function matchAreacode()
var u1=document.areacodeform.isacode.value;
//var u1=str;"GET","http://localhost:8080/Matchcode?code="+u1,true);


function handleStateChange()

var l = "<table>";

var alength=xmlHttp.responseXML.getElementsByTagName("addcode");

var message= new Array(alength.length);
message[i] = xmlHttp.responseXML.getElementsByTagName("addcode")[i].childNodes[0].nodeValue;
l =l+"<tr><td><input type='radio' name='areacoderadio' value='"+message[i]+"'>"+message[i]+"</td></tr>";
//alert("Response Generated\n"+i+" "+message[i]);



alert("Error loading page"+ xmlHttp.status +


I have a jsp that on click of button calls servlet this servlet presents a child window in which i have a input field onkeyup in this input field fires ajax calls and calls another servlet that fetch data from database and present the data in child window on selecting given data from child window the selected value should pass to the parent jsp file that initiating the whole process.
This is working well and good in firefox but in IE7 its not working in the child window i am unable to select the value and the values are not getting passed to the parent jsp.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63868

Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the .

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: JavaScript not working in IE7 but working in firefox
It's not a secret anymore!