StefanRSA Posted July 6, 2010 Share Posted July 6, 2010 1. - I am new to this 2. - Using the following .js file: function makeObject(){ var x; if (window.ActiveXObject) { x = new ActiveXObject("Microsoft.XMLHTTP"); }else if (window.XMLHttpRequest) { x = new XMLHttpRequest(); } return x; } var request = makeObject(); var the_cell; function check_cell(the_cell){ request.open('get', the_cell); request.onreadystatechange = parseCheck_cell; request.send(''); } function parseCheck_cell(){ if(request.readyState == 1){ document.getElementById('cell').innerHTML = 'Loading...'; } if(request.readyState == 4){ var answer = request.responseText; document.getElementById('cell').innerHTML = answer; } } var the_tell; function check_tell(the_tell){ request.open('get', the_tell); request.onreadystatechange = parseCheck_tell; request.send(''); } function parseCheck_tell(){ if(request.readyState == 1){ document.getElementById('tell').innerHTML = 'Loading...'; } if(request.readyState == 4){ var answer = request.responseText; document.getElementById('tell').innerHTML = answer; } } My link code is below... All works fine... But if I click on the bottom <div id="tell> <div id="cell"> display "loading..." How can I get it to only affect the div clicked on? <div id="cell"><a href="javascript:" onClick=\'check_cell("'.$root.'/celltell.php?id='.$adkey.'&get='.$f_value.'")\'>Click to View</a></div> <div id="tell"><a href="javascript:" onClick=\'check_tell("'.$root.'/celltell.php?id='.$adkey.'&get='.$f_value.'")\'>Click to View</a></div> Quote Link to comment Share on other sites More sharing options...
StefanRSA Posted July 6, 2010 Author Share Posted July 6, 2010 Ok, Now this is really bugging my mind... All is working fine in IE, but in Firefox and Chrome, its not working so nice... Anybody that can help me? Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.