hi experts,

Here i have a problem with innerHTML in php page.

<script type="text/javascript"> 
function GetInner(sid)
{
document.getElementById("sid").innerHTML='<?php $id='+sid+'?>';
}
}
</script>

<body> 
<p id="sid">&nbsp;</p>
</body>

it doesn't give any result.

Please help me.

That's because Javascript is client side, while PHP is server side. What exactly are you trying to do here?

THis is my code:

<html> <head> 
<style type="text/css"> 
.popup { border: solid 3px #008040; font-family: Tahoma; font-size: 12px; display: none; position: absolute; width: 650px;z-index: 60; } 
.popuptitle { background: #FFFFBB; color: #800000; font-weight: bold; height: 15px; padding: 5px;text-align: right; } 
.popupbody { background: #FFFFBB; padding: 5px; height:300px; text-align: center; } 
#popup1 { top: 200px; left: 300px; } </style> 
<script type="text/javascript"> 
function popupWindow(o,d,sid)
{
var obj = document.getElementById(o); 
if(d)
{
var stid = '$id='+sid;
alert(stid);
document.getElementById("sid").innerHTML=
obj.style.display = 'block'; 
}
else 
{
obj.style.display = 'none';
}
}
</script> 
</head> 
<body> 
<p id="sid">&nbsp;</p>
<a href="javascript: popupWindow('popup1',true,'');">N081234</a> 
<br>
<a href="javascript: popupWindow('popup1',true,'N081234');">N081235</a> 

<div id="popup1" class="popup"> 
<div class="popuptitle"><font style="font-size:20px" color="#8B0000"><a href="javascript: popupWindow('popup1',false,'N');">X</a></font></div>
<div class="popupbody"> 
<? 
$path = "incl.php";
include($path); 
?>
</div> 
</div> 
</body> </html>

When i click on ID, i need to get details of particular ID

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.