Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Confirm Function

Status
Not open for further replies.

desiana

Programmer
Oct 31, 2001
23
MY
Currently I am doing a program using JSP. In that program I use JavaScript function "confirm". The problem is it appears twice although I only define it once. Do you have any ide what is wrong with it ? The portion of the coding is :

<%if(v_seq.size()==0) {%>
<script>
alert('No GDRN to be generated !');
window.close()
</script>
<%} else {%>
<script>
if(confirm(&quot;Are you sure you want to generate and print these GDRNs ?&quot;))
{
window.print()
location.href=&quot;mr_auto_gdrn_update.jsp&quot;
}
else
{
window.close()
}
</script>
<%}%>
 
hi,
i just copied the code and pasted in a file.
it just works fine. the confirm pops only once.
no probs for me, howz that comin twice to u.

may be i can help u !
 
I am confused also, because when I go through the coding itself, it should work just fine. Before the script, I put JSP coding and HTML to retrieve information from the database and display it in the table. Do I need to show u the whole program ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top