473,322 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Click (alert) then submit

2
Hi,

Only new to javascript., and most of my learning is from browsing for hints - but can't find an answer to this one.

I have an order form designed for my business, that runs a series of javascript statements for validation etc. However I want to add an event on submission, that comes up with a box confirming the order is about to be submitted once OK is pressed. I figured that I could somehow combine my onsubmit with an onclick, but not exactly sure how to do it. Can somebody help out?

Thanks
Jul 17 '08 #1
3 1200
maminx
77
Your necessary is "
event onsubmit used to show a box dialog to confirm...
than what your business with onclick event??
Jul 17 '08 #2
r035198x
13,262 8TB
Just treat the confirmation as another validation step and call it as the last of the validation steps the same way you were calling the other validations.
Jul 17 '08 #3
acoder
16,027 Expert Mod 8TB
If you're calling the validation function in the correct manner, it could look something like this:
Expand|Select|Wrap|Line Numbers
  1. if (!confirm("whatever confirmation message you want to put here...")) return false;
  2. return true;
Jul 17 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Csaba2000 | last post by:
I want to be able to programatically click on the center of an <INPUT type=image ...> element (I only care about IE 5.5+). This should work regardless of whether IE has focus. Normally you would...
6
by: JSjones | last post by:
Hi all, I'm new to these boards and my javascript experience is fairly limited and basic so please bear with me. Anyway, on to the question and some background. I'm developing using ColdFusion...
3
by: CW | last post by:
In my javascript, when enter key is pressed, I want to simulate the effect of clicking a button. var mykey; var posted=false; if (window.Event){ document.captureEvents(Event.KEYDOWN); }
1
by: zoltix | last post by:
Hi, I am beginner in JavaScript. I would like to intercept all click events on my document. I use this function for that document.onmousedown=click;. It works well. But I would like to...
14
by: Sinity | last post by:
Anyone knows the method/codes to disable the clicked button after first click by using .aspx-- to prevent people to click many time when waiting for the server response. I tried to do this by...
11
by: CW | last post by:
I have message entry screen that's causing me a bit of an issue. At the moment, there are 2 buttons, one is used to send message to another user (btnSend) and another is used to send messages to...
2
by: samuelberthelot | last post by:
Hi, I've got 3 textboxes and 3 buttons on my form. When I press enter in the first textbox, I'd like to have a click performed on the first button. Same thing for the other 2. I have a...
1
by: Jon Paal | last post by:
can someone help to get this working ? <input type="submit" value="Submit" onclick=" if (document.forms.password == ''){ alert('please enter a password')} elseif (document.forms.password !=...
2
by: Eli | last post by:
HI! I made some quiz using one HTML form (few question with few radio-button each like potential answers) that have one Submit button. I would like to simulate click on this button (e.g. named...
6
by: Oleg Konovalov | last post by:
Hi, I have a Java/JavaScript Web GUI application where I perform a lot of long DB operations , which takes 5-60 secs to perform. Sometimes user double-clicks the button or just gets impatient...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.