Jump to content

Project deadline in 1 day..please help.


Eoin

Recommended Posts

 

i am having a problem passing variables from a php file to a html file using a javascript funtion. here is the code i have.

/////////InteractiveMap.HTML//////////////////////////////////////////////////// 
<script type="text/javascript">  

 // This function is called when a building is clicked.     
 function buildingClick(id,name,desc) 
 { 	 
 var mywin;
 var isOpen = false;	 
 var searchInt;
 var passVal;	
 passVal = desc;
 mywin = window.location.href = "informationPage.html";
 searchInt = setInterval(function(){if(isOpen){var      display=mywin.document.getElementById("infoArea"); 
display.value = passVal;}});}	 
///////////////////////////////////////////////////////////////////
////////////InformationPage.html///////////////////////////////
<script type="text/javascript">
window.onload = function(){window.opener.window["isOpen"] = true;};
</script>	
<textarea disabled id="infoArea"></textarea>
//////////////////////////////////////////////////////

I am just tryin to display the variable desc in the textarea "infoArea" but it wont work.Any help would be appreciated.

eoin

Link to comment
https://forums.phpfreaks.com/topic/262565-project-deadline-in-1-dayplease-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.