Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

using buttons in javascript

prsteekprsteek Posts: 1Member
hi..

I am working on an assignment in which i am using XML,JAVASCRIPT and XML DOM.I have to parse an XML file which is given as input by the user. The interface has a button.The given XML file is parsed when the user clicks on the button. I have to parse that file and show the results in a drop down menu in a pop-up window.That pop-up window has a list of all the artists(in the drop down menu) which are in the XML file.This pop-up window also has a submit button.What i have to do is to select an artist from the drop down menu and click on the submit button so that the XML file can be searched again and the details of that artist that has been selected can be printed on the pop-up window.MY problem is that when i click on the button of the pop-up windom,the parent window opens on the same pop-up window instead of the artist details.




var xmlDoc;

function loadXML(loadFileName){
//load xml file
// code for IE
getMessage();
}
// code for Mozilla, Firefox, Opera, etc.
xmlDoc.onload=getMessage;
}
}

function getMessage(){
var x=xmlDoc.getElementsByTagName('artist');
var newWindow = window.open("", "window","width=450,height=250")
newWindow.document.write("")
newWindow.document.write("")
var j=0;
for(i=0;i"+x[i].childNodes[0].nodeValue+"")
}
newWindow.document.write("Choose Artist")
newWindow.document.write("")
}


View Albums


Enter XML File :




Submit Query
Sign In or Register to comment.