Advertisement
Guest User

Untitled

a guest
Aug 26th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. <style>
  2. a:hover, a:active {
  3. background-color:red ;
  4. }
  5. </style>
  6.  
  7. <form action="FirstTest" method="post" id="TestForm">
  8. <input type="text" id="PrintHere"/ ><br><br>
  9. <a target="_blank" onclick="SelectName('POST')"> Repository Link </a>
  10. </form>
  11.  
  12. <script type="text/javascript">
  13. function SelectName(methodType) {
  14. var win=window.open("Popup.jsp", "thePopUp", "width=300,height=100, left=24, top=24, scrollbars, resizable");
  15. win.focus();
  16. }
  17. </script>
  18.  
  19. <form id="PopUpForm">
  20. <input type="text" id="ddlNames"> <br /> <br />
  21. <input type="button" value="Select" onclick="SetName();" />
  22. </form>
  23.  
  24. <script type="text/javascript">
  25. function SetName() {
  26. if ((window.opener != null) && !(window.opener.closed)) {
  27.  
  28. var Textvalue;
  29. Textvalue.value = document.getElementById("ddlNames").value;
  30.  
  31. var TextBox = window.opener.document.getElementById("PrintHere");
  32. TextBox.value = Textvalue.value
  33. }
  34. window.close();
  35. } </script>
  36.  
  37. <form id="PopUpForm">
  38. <input type="text" id="ddlNames"> <br /> <br />
  39. <input type="button" value="Select" onclick="SetName();" />
  40. </form>
  41.  
  42. <script type="text/javascript">
  43. function SetName() {
  44. if ((window.opener != null) && !(window.opener.closed)) {
  45.  
  46. var TextBox = window.opener.document.getElementById("PrintHere");
  47. TextBox.value = document.getElementById("ddlNames").value;
  48. }
  49. window.close();
  50. }
  51. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement