Hey yall,
I've been struggling with the problem I have for while. Would appreciate if somebody can help me out on this.
I have a frameset of two xml pages.
First page has: <Title>Blah.</Title>
Second Page: <Link>Click meLink>
When user click the link on second page it should change
<Title>Blah.</Title> to <Title>Here you go.</Title>
After that I am as a user should see the change on the screen.
Code I have:
xml page:
...
<PageHeader Id="asdf">
<Title>Blah.</Title>
...
JavaScript function:
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("main_page.xml");
nodes=xmlDoc.documentElement.childNodes;
nodes(0).getElementsByTagName('PageHeader')[0].firstChild.text = "asdf";
alert(nodes(0).getElementsByTagName('PageHeader')[0].firstChild.text);
alert(nodes(0).getElementsByTagName('PageHeader')[0].firstChild.xml);
So from the second alert window I can see that the <Title> tag is getting set.
HOWEVER, this is the problem the page on the browser window does not change. Do I need to refresh or something like this?
Thank you.
I've been struggling with the problem I have for while. Would appreciate if somebody can help me out on this.
I have a frameset of two xml pages.
First page has: <Title>Blah.</Title>
Second Page: <Link>Click meLink>
When user click the link on second page it should change
<Title>Blah.</Title> to <Title>Here you go.</Title>
After that I am as a user should see the change on the screen.
Code I have:
xml page:
...
<PageHeader Id="asdf">
<Title>Blah.</Title>
...
JavaScript function:
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("main_page.xml");
nodes=xmlDoc.documentElement.childNodes;
nodes(0).getElementsByTagName('PageHeader')[0].firstChild.text = "asdf";
alert(nodes(0).getElementsByTagName('PageHeader')[0].firstChild.text);
alert(nodes(0).getElementsByTagName('PageHeader')[0].firstChild.xml);
So from the second alert window I can see that the <Title> tag is getting set.
HOWEVER, this is the problem the page on the browser window does not change. Do I need to refresh or something like this?
Thank you.