vendredi 1 juillet 2016

Popup window with three buttons

I need to popup a window with three buttons when the user clicks on a text.

What I have in my java class:

myHtml.append("<a href="" + myUrl+ "" onclick="javascript: return confirm('" + myMessage + "')">" + myLink + "</a>");

What I need is to not use "confirm". I need to use a popup similar to confirm() but with 3 different actions.

How can I replace confirm() to have 3 different actions instead of "ok" and "cancel" only?

EDIT

I have another idea, I can call prompt from the java class but my problem is how to get the prompt result inside my java class??

myHtml.append("<a href="" + myUrl + "" onclick="javascript: return prompt('" + myMessage + "')">" + myLink + "</a>");

Aucun commentaire:

Enregistrer un commentaire