943,102 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 758
  • PHP RSS
Feb 5th, 2010
0

dhtml popup in php

Expand Post »
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
PHP Syntax (Toggle Plain Text)
  1. 1. ----------The Code in "Window_open.php" -------------------
  2. 2.
  3. 3. <html>
  4. 4.
  5. 5. <head>
  6. 6. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  7. 7. <title>New Page 1</title>
  8. 8. </head>
  9. 9.
  10. 10. <body>
  11. 11.
  12. 12.
  13. 13. <FORM>
  14. 14. <INPUT type="button" value="New Window!" onClick="window.open('new.htm','mywindow','width=400,height=200')">
  15. 15. <br>
  16. 16. </FORM>
  17. 17.
  18. 18. <table width="533" height="242" border="1">
  19. 19. <tr>
  20. 20. <td align="center" valign="middle">Name<br><?php echo $post["txt"]?></td>
  21. 21. </tr>
  22. 22. </table>
  23. 23. </body>
  24. 24.
  25. 25. </html>
  26. 26.
  27. 27.
  28. 28. ------------------code in "new.php"---------------------------------
  29.  
  30. Expand|Select|Wrap|Line Numbers
  31.  
  32. 1. <html>
  33. 2. <body>
  34. 3.
  35. 4. <p><font size="5">This is the result of&nbsp; on click Opening
  36. 5. Window..............</font><br>
  37. 6. <br>
  38. 7. <br>
  39. 8. <a id="100" onClick="window.close(),pass(100)">Taniya Moses<br></a>
  40. 9. <a id="101" onClick="window.close(),pass(101)">Ranjan Ramanayaka<br></a>
  41. 10. <a id="102" onClick="window.close(),pass(102)">Wikram Silva<br></a>
  42. 11. <a id="103" onClick="window.close(),pass(103)">Wikram Silva<br></a>
  43. 12. <a id="104" onClick="window.close(),pass(104)">Janaka Wujerathna<br></a>
  44. 13. <br>
  45. 14.
  46. 15.
  47. 16. <Script type="text/javascript">
  48. 17. function pass(I)
  49. 18. {
  50. 19. var C = document.getElementById("I").value;
  51. 20. document.getElementById("txt").value = C;
  52. 21. window.location.href="new.html";
  53. 22. //window.close();
  54. 23. }
  55. 24. </Script>
  56. 25. </p>
  57. 26. <form action="window_open.html", method="post">
  58. 27. <input type="hidden" id="txt" name="txt" />
  59. 28. </form>
  60. 29.
  61. 30. </body>
  62. 31.
  63. 32. </html>
Last edited by nav33n; Feb 5th, 2010 at 5:19 am. Reason: Please use [code] tags to wrap your code for easy readability.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ursrathika is offline Offline
5 posts
since Jan 2010
Feb 8th, 2010
0
Re: dhtml popup in php
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

php Syntax (Toggle Plain Text)
  1. window.parent.getElementById('textboxid').value
Reputation Points: 16
Solved Threads: 28
Posting Whiz in Training
saiprem is offline Offline
209 posts
since Feb 2010
Feb 8th, 2010
0
Re: dhtml popup in php
saiprem says true. I don't see a textbox anywhere in your HTML...
Reputation Points: 11
Solved Threads: 5
Light Poster
Jerail is offline Offline
39 posts
since Feb 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: xml in php
Next Thread in PHP Forum Timeline: Insert Missing Months In an Array





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC