One of the guys here were nice enough to help us put together a javascript code that displays dynamic information.

<div id="info"></div>
<script type="text/javascript">
var request
if(window.XMLHttpRequest){
request=new XMLHttpRequest()
}else if(window.ActiveXObject){
request=new ActiveXObject("Microsoft.XMLHTTP")}
request.open('GET','http://ourwebsite.com/index.php?get=1',false)
request.send(null)
document.getElementById('info').innerHTML=request.responseText
</script>

The problem we are having now is that it does not show the php design in all browsers. It displays just fine in firefox but in in ie and crome it has no style, can anyone advise on how we would get it to display the styling that the php has without having to heavily modify this javascript code.

Thank you.

What is the styling applied by?
Is it inline the ajax input, or provided using css classes.
Does that html get escaped into visible entitles?
Also, try adding ';'s after every function call, it might be a bug.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.