• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display alert message for Delete

 
Sam Saha
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wanted to display two different java script alert messages from one Delete button.
When try to delete a person for Auto the message should be:
"Are you sure you would like to delete this Named Person for Auto?"
When try to delete a person for Hab the message should be:
"Are you sure you would like to delete this Named Person for Hab?"

Now it display the same message "Are you sure you would like to delete this Named Person for Auto?" for both Auto and Hab. But I wanted to split them for Auto and Hab.

I have a ternary condition like
value="#{pc_EndorseNamedPerson.habPolicy ? msg.habnamedPersonDel : msg.namedPersonDel}" which basically displays two different text in the Delete button for Auto and Hab. I wanted to use this same condition for java script alert message. But I am not really sure how to use this in java script function. I would appreciate if some body can help me how to use this ternary condition in java script method to display two different messages

JSP Code:



Java script function:

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the JSF forum. Please don't post JSF markup in the HTML forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic