Jump to content

Problem updating...


xcandiottix

Recommended Posts

aptbboarder=xmlDoc.getElementsByTagName("Name")[0].getElementsByTagName("app_table")[0].getElementsByTagName("boarder")[0].childNodes[0].nodeValue;
aptbbgimage=xmlDoc.getElementsByTagName("Name")[0].getElementsByTagName("app_table")[0].getElementsByTagName("bgimage")[0].childNodes[0].nodeValue;
aptbbgcolor=xmlDoc.getElementsByTagName("Name")[0].getElementsByTagName("app_table")[0].getElementsByTagName("bgcolor")[0].childNodes[0].nodeValue;

function selection(selected){
var y=xmlDoc.getElementsByTagName("Name");
for (j=0;j<y.length;j++){
	if(selected == y[j].getAttribute("N")){
		//sets options
		aptbboarder=y[j].getElementsByTagName("app_table")[0].getElementsByTagName("boarder")[0].childNodes[0].nodeValue;
		aptbbgimage=y[j].getElementsByTagName("app_table")[0].getElementsByTagName("bgimage")[0].childNodes[0].nodeValue;
		aptbbgcolor=y[j].getElementsByTagName("app_table")[0].getElementsByTagName("bgcolor")[0].childNodes[0].nodeValue;
		//sets applications
		application1=y[j].getElementsByTagName("Cell")[0].getElementsByTagName("Application")[0].childNodes[0].nodeValue;
		document.getElementById("app1").innerHTML=application1;
		application2=y[j].getElementsByTagName("Cell")[1].getElementsByTagName("Application")[0].childNodes[0].nodeValue;
		document.getElementById("app2").innerHTML=application2;
		application3=y[j].getElementsByTagName("Cell")[2].getElementsByTagName("Application")[0].childNodes[0].nodeValue;
		document.getElementById("app3").innerHTML=application3;
	}
}
//end
}
//write coloumns
document.write('<table width="100%" border="'+aptbboarder+'" background="'+aptbbgimage+'" bgcolor="'+aptbbgcolor+'">');
//document.write('<table width="100%" border="1" background="none" bgcolor="#FFFFFF">');
document.write('<tr>');
document.write("<td align='center'><div id='app1'></div></td>");
document.write("<td align='center'><div id='app2'></div></td>");
document.write("<td align='center'><div id='app3'></div></td>");
document.write('</tr>');
document.write('</table>');

 

The first APT variables refer to the XML doc to get the tables defaults.

function selection() is activated when a user presses a button, the table is refreshed with new information

APT's with-in the function does not work.

APP 1,2,3 do work fine, so the function is operating properly.

The document write section correctly shows a table with the 3 app variables but will not change from the default APT's set at the beginning of the code. To me, this would work if I could make the APT's a <div> and nest them inside the table vars (for example boarder=<div id=aptboarder></div> but I don't think that's proper formatting.

 

Any ideas?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.