Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Javascript Submit Link with Confirm box problems

Posted on 2004-09-09
6
Medium Priority
?
283 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 2000 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
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

722 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