I seems like a problem with a simple solution but after searching through google for almost 3 hours I still haven’t found the info I need. I’ve been working with javascript for less than a week.
So here’s what I’m trying to do. I’ve been given the task of creating a simple cinema listing page thats going to extract the titles and times from an XML document. (This is probably more info than you need, but I’m setting the scene ? )
I’ve been altering an example I found on the web. At the moment its in frames (which is not good). I want to change it so instead of opening in a target frame it opens a pop-up. I’m guessing I need the change the line I’ve underlined below, but I don’t know the right methods etc to use. Thank you for your time.
(just to note, this isn’t how we plan to finally implement this cinema search. my boss needs it asap (as he has people updating them manualling at the moment, which takes a whole day for his team), he wants a version in asp eventually (which our programmers will do when they have time in their schedule)).
(I edited the code down to what I think is relevant)
The script in the head:
var xml = new ActiveXObject(“Msxml2.DOMDocument.3.0”);
xml.async = false;
xml.load(“Cinema.xml”);
function showCinema2()
{
var xsl = new ActiveXObject(“Msxml2.DOMDocument.3.0”);
xsl.async = false;
xsl.load(“Cinema2.xsl”);
[U]parent.bodyFrame.document.body.innerHTML = xml.transformNode(xsl);[/U]
}
The html in the body:
<FORM name=”controlForm”>
<p align=”center”>
<INPUT type=”image” src=”arrow.gif” value=”Show cinema 2″ onclick=”showCinema2();” align=”middle” /></p>
</FORM>