colap Posted October 10, 2009 Share Posted October 10, 2009 If i click a button then a new page will come in a div. Is it possible with php? I have tried this but it doesn't work. <?php if(isset($_POST['nmdiv'])) { echo "<div class=\"cldiv1\" id=\"iddiv1\"><?php include(\"copyright.php\")?></div>"; } ?> <html> <head> <title>phptest</title> <script type="text/javascript" language="javascript"> function makediv(){ var tmp=document.getElementById("iddiv1"); tmp.style.border="solid"; tmp.style.position="absolute"; tmp.style.left="300px"; tmp.style.top="100px"; tmp.style.width="400px"; tmp.style.height="200px"; } </script> </head> <body> <form method="post"> <input type="button" name="nmdiv" value="click" onclick="makediv()"/> </form> </body> </html> Link to comment https://forums.phpfreaks.com/topic/177164-placing-a-page-in-a-div/ Share on other sites More sharing options...
robert_gsfame Posted October 10, 2009 Share Posted October 10, 2009 Sure you can! Put this beween <head></head> <style type="text/css"> #Div1 { left:431px; top:30px; } </style> <?php echo "<div id='Div1'>Hello world!!</div>";?> Is that what you mean?? Link to comment https://forums.phpfreaks.com/topic/177164-placing-a-page-in-a-div/#findComment-934136 Share on other sites More sharing options...
colap Posted October 10, 2009 Author Share Posted October 10, 2009 Sure you can! Put this beween <head></head> <style type="text/css"> #Div1 { left:431px; top:30px; } </style> <?php echo "<div id='Div1'>Hello world!!</div>";?> Is that what you mean?? No, i want to put/place a web page in that div,not only "Hell world". And it will happen after clicking the button. Can someone give some clue for that? Link to comment https://forums.phpfreaks.com/topic/177164-placing-a-page-in-a-div/#findComment-934149 Share on other sites More sharing options...
colap Posted October 10, 2009 Author Share Posted October 10, 2009 How can i do this with php? Can anyone give me some idea? Link to comment https://forums.phpfreaks.com/topic/177164-placing-a-page-in-a-div/#findComment-934185 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.