954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

dhtml popup in php

I require to appear the Name which i click on the "new.php" page in the "Window_open.php" page..I use some Java Script also to accomplish this but I couldn't..

how to pass textbox value in popup....

Could you pleas Help ...!!!

Expand|Select|Wrap|Line Numbers

1. ----------The Code in "Window_open.php" -------------------
2.
3. <html>
4.
5. <head>
6. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
7. <title>New Page 1</title>
8. </head>
9.
10. <body>
11.
12.
13. <FORM>
14. <INPUT type="button" value="New Window!" onClick="window.open('new.htm','mywindow','width=400,height=200')">
15. 
16. </FORM>
17.
18. <table width="533" height="242" border="1">
19. <tr>
20. <td align="center" valign="middle">Name<?php echo $post["txt"]?></td>
21. </tr>
22. </table>
23. </body>
24.
25. </html>
26.
27.
28. ------------------code in "new.php"---------------------------------

Expand|Select|Wrap|Line Numbers

1. <html>
2. <body>
3.
4. <p><font size="5">This is the result of&nbsp; on click Opening
5. Window..............</font>
6. 
7. 
8. <a id="100" onClick="window.close(),pass(100)">Taniya Moses</a>
9. <a id="101" onClick="window.close(),pass(101)">Ranjan Ramanayaka</a>
10. <a id="102" onClick="window.close(),pass(102)">Wikram Silva</a>
11. <a id="103" onClick="window.close(),pass(103)">Wikram Silva</a>
12. <a id="104" onClick="window.close(),pass(104)">Janaka Wujerathna</a>
13. 
14.
15.
16. <Script type="text/javascript">
17. function pass(I)
18. {
19. var C = document.getElementById("I").value;
20. document.getElementById("txt").value = C;
21. window.location.href="new.html";
22. //window.close();
23. }
24. </Script>
25. </p>
26. <form action="window_open.html", method="post">
27. <input type="hidden" id="txt" name="txt" />
28. </form>
29.
30. </body>
31.
32. </html>
ursrathika
Newbie Poster
5 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

The text box is not in the form, If the text box is in the form, We can retrieve the textbox value in the new.php page using $_REQUEST variable.

If you need it in new.html page, we need to give an id to text box and we can display that value in the popup as

window.parent.getElementById('textboxid').value
saiprem
Posting Whiz in Training
210 posts since Feb 2010
Reputation Points: 16
Solved Threads: 28
 

saiprem says true. I don't see a textbox anywhere in your HTML...

Jerail
Light Poster
39 posts since Feb 2010
Reputation Points: 11
Solved Threads: 5
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You