It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

Time to start caffeinating my pages

page: 1
1

log in

join
share:

posted on Aug, 9 2015 @ 12:11 PM
link   
I have developed several websites in HTML5 and styled in CSS3. Now i have decided its time to really learn _javascript. I already started by visiting W3 Schools and checking out their material.

I would like to ask some questions about this script. I see ATS strips doctype and script tags, I pasted it inside < code > < / code > hoping the server would leave it intact. Oh well shouldn't hurt anything.

< code >
< !DOCTYPE html > //index.html
< html >
< head >

< script >
function loadXMLDoc()
[
var xmlhttp;
if (window.XMLHttpRequest)
[// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
]
else
[// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); //Depreciated browser support
]
xmlhttp.onreadystatechange=)
[
if (xmlhttp.readyState==4 && xmlhttp.status==200) //Scripts waits for ready status from server
[
document.get("myDiv").=xmlhttp.responseText; //Script creates < div > response data < /div >
]
]
xmlhttp.open("GET","demo_get.asp",true); //"GET","demo_get.asp" Can be "GET",animated_object1.html"?
xmlhttp.send();
]
< /script >

< /head >
< body >

< h2 >AJAX< /h2 >
< button type="button" onclick="loadXMLDoc()">Request data< /button > //Loads animated_object1.html into myDiv. Use css in the
< div id="myDiv">< /div > //template page to style the div size and look?

< /body >
< /html >

< /code >

Please read the comments in the code and tell me if i am on the right track.



posted on Aug, 10 2015 @ 03:07 PM
link   
Hmm 24 hours plus and no bites. I don't really do forums or i would go elsewhere for assistance.



 
1

log in

join