Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Test</title>
</head>
<body>
  <button onclick="test()">Test</button>
  
  
  <script>
    
    function test() {
      getvals("start first", "start second");
    }
    
    
function getvals(first,second) {
    alert(''+first+'');
    alert(''+second+'');
    mywindow=window.open('','Send Mail','height=200,width=400');
    mywindow.document.write("<FORM NAME='test'>");
    mywindow.document.write("<table align='center'><tr><td>User/Group: </td><td><input type='text' id='newfirst' name='iuser'></td></tr>");
    mywindow.document.test.iuser.value = ''+first+'';
    mywindow.document.write("<tr><td>Issue Key: </td><td><input type='text' id='newsecond' name='ikey'></td></tr>");
    mywindow.document.test.ikey.value = ''+second+'';
    mywindow.document.write("<tr><td><a href=\"javascript:opener.popitup(document.getElementById('newfirst').value,document.getElementById('newsecond').value);\">Send Mail</a></td></tr></table>");
    mywindow.document.write("</FORM>");
}
function popitup(user,key) {
    alert(''+user+'');
    alert(''+key+'');
    var url = 'http:\/\/localhost:8080/plugins/servlet/mailservlet?receiver=' + user + '&issue=' + key;
    newwindow=window.open(url,'name','height=400,width=400');
    if (window.focus) {newwindow.focus()}
}
</script>
  
  
</body>
</html>
 
<script>
function getvals(first,second) {
    alert(''+first+'');
    alert(''+second+'');
    mywindow=window.open('','Send Mail','height=200,width=400');
    mywindow.document.write("<FORM NAME='test'>");
    mywindow.document.write("<table align='center'><tr><td>User/Group: </td><td><input type='text' id='newfirst' name='iuser'></td></tr>");
    mywindow.document.test.iuser.value = ''+first+'';
    mywindow.document.write("<tr><td>Issue Key: </td><td><input type='text' id='newsecond' name='ikey'></td></tr>");
    mywindow.document.test.ikey.value = ''+second+'';
    mywindow.document.write("<tr><td><a href='javascript:popitup(document.getElementById('newuser').value,document.getElementById('newkey').value);'>Send Mail</a></td></tr></table>");
    mywindow.document.write("</FORM>");
}
function popitup(user,key) {
    alert(''+user+'');
    alert(''+key+'');
    var url = 'http:\/\/localhost:8080/plugins/servlet/mailservlet?receiver=' + user + '&issue=' + key;
    newwindow=window.open(url,'name','height=400,width=400');
    if (window.focus) {newwindow.focus()}
}
</script>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
raghavvpro
0viewers