Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP/JavaScript How to combine 2 page in one
    text
    copied!<p>I need a reference on how to make 2 pages become one.</p> <p>Originally i have 2 php pages. View.php and comment.php</p> <p>The view.php will have a link to call comment.php. When click the 'comment' link, it will open comment.php like pop up. After fill in the comment, and click send, it will closed and return the view.php. </p> <p>The problem is, Instead of popup i want it hide until i click it. I dont know what is the exact term to call this process. I know it got something to do with javascript, using id, onclick function and similar to frame function. Because i dont know what it call, it hard for me to research. So anyone please tell me what it called or gimme any references or example solution on how to do it.</p> <p>thank you very much</p> <p>UPDATED:</p> <p>dear all..</p> <p>found this code in internet. Like RageZ said..it uses css and javascript to show and hide img. how to use for others? </p> <p>do i need to convert my comment.php into a function and put in view.php n use the id for that function. is it possible?</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script&gt; function changeme(id, action) { if (action=="hide") { document.getElementById(id).style.display = "none"; } else { document.getElementById(id).style.display = "block"; } } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;img id="myIMG" style="display: none;" src="question.php.html"width="100" height="100" /&gt; &lt;span onclick="changeme('myIMG', 'show');" style="color: blue; text-decoration: underline; cursor: pointer;"&gt;Show the image&lt;/span&gt; &lt;span onclick="changeme('myIMG', 'hide');" style="color: blue; text-decoration: underline; cursor: pointer;"&gt;Hide the image&lt;/span&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload