Click to See Complete Forum and Search --> : xml and html


jjudge
03-12-2003, 04:59 AM
I have a menu using xml it containes links to other pages, I need it to link to this one page which displays a share price. I have the link working on another page that uses html but i can not get it working in the xml page I think it could be because I need to use the a javascript function popUpWindow() to display the shareprice.

This is my html code to display the page:


<SCRIPT LANGUAGE="JavaScript">

<!--HIDE

function popUpWindow() {

var CtrlWin= window.open('http://echonet/?cmd=page&object=ActionZoom.html&lng=EN', 'CtrlWin',

'width=600,height=300');

CtrlWin.focus();
}

//STOP HIDING-->
</SCRIPT>

<TABLE><tr height="20" BGcolor=#EDF0F3>
<td width="125" align="center"><a href="#" onClick="popUpWindow()"> <font face=verdana color=steelblue size=2>Share Price</a></td></TABLE>

Is there any way i can get this link working in the XML file??
I have attached the XML file below.
Thanks for your time,
James.

khalidali63
03-12-2003, 07:45 AM
That does not make any sense,you should have some javascript code here that reads the XML file and creates the page.....

Cheers

Khalid

jjudge
03-12-2003, 08:16 AM
Yea i do have another file but i just sent you the file where the links are held!!sorry

anyway i have enclosed the other file

jjudge
03-13-2003, 09:11 AM
HELP please

rmurphy
03-15-2003, 01:01 AM
Try changing the "&" to valid XML "&amp;amp;"

You may want to use an XSLT to transform your XML into HTML, I use the following javascript on the client, I'm not sure the commands in ASP.

// Load XML.
var source = new ActiveXObject("Msxml2.DOMDocument");

source.async = false;
source.resolveExternals = false;
source.load("MyXML.xml");

// Load style sheet.
var stylesheet = new ActiveXObject("Msxml2.DOMDocument");

stylesheet.async = false;
stylesheet.resolveExternals = false;
stylesheet.load("MyXSLT.xsl");

// Transform XML to HTML
var html = source.transformNode(stylesheet);


Another point...

Your XML is not very XML Schema friendly, you should pick the same name for your element tags and move the name into an attribute.