hello.
i would like to know how i can use the message box ok/cancel to confirm the delete os data in the database. as javascript is clientside and php in server side hw i can do it? how i can send it to php undestand that is to del the data? i'm just getting started in java so it's dificult for me. sorry for my english but as you could probably seen i´m not one.
heliumgas
0
Newbie Poster
Recommended Answers
Jump to PostSubmit the form data to the php script only if the user clicks on OK.
function checkSubmission(form) { var ans = confirm("Are you sure you want to delete the row?"); if(ans) { //perform validation form.submit(); } }
Call this function on the onclick event of the submit …
Jump to PostYou forgot to open the <script> tag for the second function i.e. put a script tag after the second </form>.
Jump to PostYou need to be more precise when you say its not working. You either need to paste a working example here or try to put a lot of alert statements here and there in your code to see which part is creating problems for you.
All 9 Replies
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
heliumgas
0
Newbie Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
heliumgas
0
Newbie Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
MidiMagic
579
Nearly a Senior Poster
heliumgas
0
Newbie Poster
heliumgas
0
Newbie Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.