Access Error Messages through JS

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
brianhd71
Profound User
Posts: 36
Joined: Thu Jan 02, 2014 6:20 pm
First Name: Brian
Last Name: Lannoye
Company Name: Dealertrack Technologies
Phone: 801.617.1806
State / Province: Utah
Zip / Postal Code: 84095
Country: United States
Contact:

Access Error Messages through JS

Post by brianhd71 »

Is there a way to do this? I can change a property with the applyProperty() api but it looks like one extra level to use this property. I need to flip the error condition on. Right now I am using an alert() message but it would look a lot nicer if I can access the error message bubble.

if (repairDate > today || repairDate <= openDate){
alert("Invalid Date.")
pui.set("RepairDate", " ");
}
User avatar
Glenn
Profound Logic Staff Member
Posts: 124
Joined: Mon Apr 14, 2014 4:08 pm
First Name: Glenn
Last Name: Hopwood
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: Access Error Messages through JS

Post by Glenn »

Brian,

I would normally suggest that you do this sort of validation on the server-side and use the 'error messages' property. Have you tried this solution and weren't happy with the way it worked, or would you just prefer this be done on the client-side?

Glenn
User avatar
Glenn
Profound Logic Staff Member
Posts: 124
Joined: Mon Apr 14, 2014 4:08 pm
First Name: Glenn
Last Name: Hopwood
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: Access Error Messages through JS

Post by Glenn »

Brian,

Just in case you do, in fact, prefer to do the validation on the client-side we provide an API to show the error messages. It's called pui.errorTip(). You can find more info here: http://www.profoundlogic.com/docs/pages ... d=13664277

Glenn
brianhd71
Profound User
Posts: 36
Joined: Thu Jan 02, 2014 6:20 pm
First Name: Brian
Last Name: Lannoye
Company Name: Dealertrack Technologies
Phone: 801.617.1806
State / Province: Utah
Zip / Postal Code: 84095
Country: United States
Contact:

Re: Access Error Messages through JS

Post by brianhd71 »

I'd prefer to do this on the back end too, but they want it on the UI. That api did the trick. Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests