nikhil
nikhil

Reputation: 9363

JavaScript alertbox

Is there anyway of displaying a selectbox in an alert box of javascript. when user clicks an add button then alertbox must be displayed in which a selectbox (dropdown) must be shown with add button

Upvotes: 0

Views: 174

Answers (2)

Robin
Robin

Reputation: 127

Maybe this will do the trick:

<input type="button" onclick="alert('message to pop up');" value="button text" />

The input type will define what controls will JavaScript define it as. And the "OnClick" function will set the controls to what will happen next. In this case, an alertbox. The value will be the text displayed visually in the button. Hope this solved your answer.

Upvotes: 1

deceze
deceze

Reputation: 522005

You might want to look into something like jQuery UI modal dialogs, they're easy enough to set up.

Upvotes: 3

Related Questions