Jump to content

Server Side Include


xcandiottix

Recommended Posts

I have a tough problem here. Currently, I have a page that runs a little ajax. It calls out to an XML file and returns a text string. I need to replace the test string with the location of a .php file. When the page loads, I need the .php file to be loaded in place of the text string.

 

function selection(selected){
var y=xmlDoc.getElementsByTagName("Name");
for (j=0;j<y.length;j++){
	if(selected == y[j].getAttribute("N")){
		//sets titles
		title1=y[j].getElementsByTagName("Cell")[0].getElementsByTagName("title")[0].childNodes[0].nodeValue;
		document.getElementById("tit1").innerHTML=title1;
		title2=y[j].getElementsByTagName("Cell")[1].getElementsByTagName("title")[0].childNodes[0].nodeValue;
		document.getElementById("tit2").innerHTML=title2;
		title3=y[j].getElementsByTagName("Cell")[2].getElementsByTagName("title")[0].childNodes[0].nodeValue;
		document.getElementById("tit3").innerHTML=title3;
		//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
}

 

Above, I am checking the XML page to get the title and application text strings. They are printed out on the screen like so:

 

Title 1    Title 2    Title3

App 1    App 2    App 3

 

What I need to happen is:

 

Title 1                                                                Title 2

the actual app1.php file to be loaded here      etc..

 

How can I do this?  :confused:

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.