Member Avatar

Hi I am migrating code from javascript to jquery. What would be the equivalent jquery of the following javascript. document.getElementById("#elementname").getElementsByTagName('tagname'); Cheers.

Member Avatar
-1
38
Member Avatar

Hi i am learning xml , in a very simple code i got an error saying [B]"Uncaught TypeError: Cannot call method 'getElementsByTagName' of null"[/B] i am getting this in all browsers ,i have tried to look for solution on google but could not find ,Plz help [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><title>http request</title> <head> <link rel="shortcut icon" href="twitterfinalcut/twittericon.jpg" /> </head> <body> <script type="text/javascript"> if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari var xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","note.xml",false); xmlhttp.send(); xmlDoc=xmlhttp.responseXML; var x=xmlDoc.getElementsByTagName("CD"); document.write (x[0].getElementsByTagName("ARTIST")[0].childNodes[0].nodeValue); document.write (x[0].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue); </script> …

Member Avatar
0
6
Member Avatar

Im new to php and have been struggling with this for some time, but I expect its something simple. Basically I have some code below which I want to use to display an events board. -Info for each event comes from a separate xml file for each event. -XML files are named by date, ie today would be 050611.xml (DD/MM/YY) -Load all XML files in a directory and display items by tag name automatically. [B]As it is my code works fine. It finds all files in the directory that = more than today date and adds them to an array. …

Member Avatar
0
2
Member Avatar

Hello, I am trying to write a simple javascript to read all forms. My ReadForm function works right. I tried it out of ReadAllForms function, there is no problem with it. I think document.getElementsByTagName returns false. Why can this happen? [CODE=javascript] function ReadAllForms() { if (document.getElementsByTagName) var myforms = document.getElementsByTagName("form"); alert(myforms.length); for (var i =0; i < myforms.length; i++) { ReadForm (myforms[i]); } } } [/CODE]

Member Avatar
0
4

The End.