Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
130
rated 0 times [  136] [ 6]  / answers: 1 / hits: 23651  / 10 Years ago, mon, march 10, 2014, 12:00:00

How can I display the popup below using the onclick method in JavaScript with a button?



 <div data-role=popup id=myPopupDialog4>
<a href=# data-rel=back class=ui-btn ui-corner-all ui-shadow ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-right>Close</a>

<div data-role=header>
<h4>Post Update </h4>
</div>

<div data-role=main class=ui-content>
<pre><B>
<div id=resultDayOfWeek></div>
<div id=resultNum></div>
<div id=resultDir></div>
<div id=resultStop></div>
<div id=resultTime></div>
</B>
</pre>
<fieldset data-role=controlgroup>
<legend>Choose Status</legend>

<label for=Arrived/Left>Arrived/Left</label>
<input type=radio name=status id=Arrived/Left value=Arrived/Left>
<label for=Delayed>Delayed</label>
<input type=radio name=status id=Delayed value=Delayed>
<label for=Canceled>Canceled</label>
<input type=radio name=status id=Canceled value=Canceled>
<label for=getupdate>getupdate from others</label>
<input type=radio name=status id=getupdate value=getupdate>
<label for=Other>Other</label>
<input type=radio name=status id=Other value=Other>
</fieldset>

<textarea name=addinfo id=info> Comments goes here.... </textarea>
<input type=submit value=Submit onclick=postSubmit();>
<div id=poststatus></div>
</div>

<div data-role=footer >
<h1>Footer Text</h1>
</div>

</div>

More From » javascript

 Answers
30

Just use window.open:



var referenceToNewWindow = window.open(url, name, features);

[#72067] Saturday, March 8, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
naomim

Total Points: 344
Total Questions: 95
Total Answers: 114

Location: Wales
Member since Mon, May 17, 2021
3 Years ago
;