• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Display alert message for Delete

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to the JSF forum. Please don't post JSF markup in the HTML forum.
 
reply
    Bookmark Topic Watch Topic
  • New Topic