Solved

Javascript Submit Link with Confirm box problems

Posted on 2004-09-09
6
282 Views
Last Modified: 2008-03-17
I have text link that should submit form, before submitting form it should verify if you would like to proceed w/ submitting form, then if you hit ok it should submit it, however when you hit ok it does nothing. If I use a submit button it works, and i do not need the document.dupeForm.submit()" if i use a submit button, however i cannot use a submit button when doing this, it must be done w/ a text link

here is the code:
<form action = "http://127.0.0.1/quotes/duplicate.asp" method = "post" name="dupeForm">
      <td bgcolor = "white" style = "border:1px black solid;font-size:9pt;font-weight:bold;border-top:0px;"><a href = "#" onClick="return confirm ('Are You Sure You Want To Duplicate This Quote?');document.dupeForm.submit()">Duplicate Quote</a></td>
</form>

thanks!
0
Comment
Question by:LTY83
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 12018142
<A href="#" onclick="if(confirm('Are you sure?')document.dupeForm.submit();return false;">submit</a>
0
 
LVL 33

Accepted Solution

by:
knightEknight earned 500 total points
ID: 12018148
oops, missing )

<A href="#" onclick="if(confirm('Are you sure?'))document.dupeForm.submit();return false;">submit</a>
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 12018165
<a href = "#" onClick="if (confirm('Are You Sure You Want To Duplicate This Quote?'))document.dupeForm.submit();return false;">Duplicate Quote</a>
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 4

Author Comment

by:LTY83
ID: 12018175
looks good, but are ya missing a ), if so where should it be put? at the end of the whole js statement?
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 12018214
FYI - with a button:

<INPUT type="button" name="btnSubmit" value="Submit"  onclick="if(confirm('Are You Sure You Want To Duplicate This Quote?'))this.form.submit();" />
0
 
LVL 4

Author Comment

by:LTY83
ID: 12018909
Thanks!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month10 days, 17 hours left to enroll

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question