Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-18-2013, 03:27 PM   PM User | #1
shile
New Coder

 
Join Date: Oct 2012
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
shile is an unknown quantity at this point
Error message

i made a form that has unique values,and when i enter values that are already in database and click submit button an error message(500) pops out because there are already values with the same data,i want it to be that way...but my question is,can i somehow override the output of this error,i want to show it only to the user as an usual alert box?
shile is offline   Reply With Quote
Old 01-18-2013, 03:41 PM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,102
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
"The usual alert box" is very much deprecated these days, and should be used only for debugging purposes.


All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is online now   Reply With Quote
Old 01-18-2013, 03:42 PM   PM User | #3
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 960
Thanks: 7
Thanked 100 Times in 100 Posts
WolfShade is an unknown quantity at this point
I'm assuming PK/FK constraints in the database.

You can always check to see if the data is already present, then return a message stating so and have the alert display the message.
__________________
^_^

If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
*
The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
WolfShade is offline   Reply With Quote
Old 01-18-2013, 05:39 PM   PM User | #4
shile
New Coder

 
Join Date: Oct 2012
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
shile is an unknown quantity at this point
the code is really messed up because i am recoding joomla component,this is the best solution i think...i only need this last thing...
shile is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:33 PM.


Advertisement
Log in to turn off these ads.