I need to pass a variable on through a URL in javascript
Down there where it selects the div image. I need it to beCode:function createRequestObject(){ var request_; var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ request_ = new ActiveXObject("Microsoft.XMLHTTP"); } else { request_ = new XMLHttpRequest(); } return request_; } var http = createRequestObject(); function getInfo(){ http.open('get', 'test2.php?username=' + document.forms[0].message.value); http.onreadystatechange = handleInfo; http.send(null); } function handleInfo(){ if(http.readyState == 4){ var response = http.responseText; test = 'http://imager.ffwbmarion.com/sample.php?text='+ document.forms[0].message.value; document.getElementById('image').innerHTML = test; } }
<img src=testurl> but I cant figure out how to put that variable test in an image tag.. any ideas?





Reply With Quote
