JAVASCIPT AND XML: can't read my javascipt in html file?
me
2012-12-10 20:48:40 UTC
I tried to compile in chrome but Nothing displayed only subject offered. I really do not know what is the problem. I'd checked my code thrice and thrice .. but something is really wrong. I'm using notepad++.
subject.html
Subjects Offered
subject.xml
CSSDO2 Computer Programming 5 3
CSCI10B Principles of Operating System 4
ITNA04 Linux Administration/ 3
MATH09 Numerical Methods 3
Three answers:
anonymous
2012-12-10 22:45:44 UTC
You should check by putting alerts in your script section line by line and see, where you code is breaking. Also, your xmhttp variable is not declared. It should be declared somewhere as var xmlhttp;
valentina
2016-10-26 09:24:34 UTC
HTML is the markup for the textual content on information superhighway content. It specifies such issues as what shade the historic past is, the position the photos are, no matter if certain textual content is ambitious or italic etc. CSS is a way of creating better certain criteria that may then be separated from the HTML textual content and dictate the creation of dissimilar distinct information superhighway content, as an party finer administration over fonts, heading sizes etc. Javascript is a scripting language which permits uncomplicated applications like video games and calculators to be written for use on the information superhighway website - no longer to be at a loss for words with Java, it extremely is a desirable programming language yet is likewise used on information superhighway content. XML is a markup language such as HTML besides the undeniable fact that it helps the man writing it to make better certain tags, at the same time with a particular merchandise on a web page being a cost or can be utilized to position in writing a thoroughly distinct form of records format at the same time with for, say, a note processor or a database storing possible joint movements and postures for Yoga asanas. XML is a subset of SGML and XHTML is HTML written as no matter if this is a form of XML.
Merc
2012-12-11 04:19:40 UTC
You have a syntax error. I won't tell you what it is: check your browser's error log.
(@Prem's suggestion, of using alert() in various places is a good one, but it can only locate logic errors, not syntax errors.)
(BTW, nowadays people would write this code easily using libraries like jQuery, as in http://pastebin.com/b4gcnJPm , but it's fine that you learn to do it the hard way first.)
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.