0

I've created two buttons using javascript; yes and no. I need to get the event triggered when the button is clicked.

i.e... onclick=getvalue().

public void SetYesButton(string msg_button_class) {
    this.msgbox_Yes_button = "<input type=\"button\" value=\"Yes\" class=\"" + msg_button_class + "\" onClick=\"getvalue()\";>";
}

public void SetNoButton(string msg_button_class) {
    this.msgbox_No_button = "<input type=\"button\" value=\"No\" class=\"" + msg_button_class + "\" onClick=\"document.getElementById('pagedimmer').style.visibility = 'hidden'; document.getElementById('msgbox').style.visibility = 'hidden';\">";
}

1 Answer 1

0

Didn't understand your question, but a suggestion.

Remove the penultimate semi-colon:

"<input type=\"button\" value=\"Yes\" class=\"" + msg_button_class + "\" onClick=\"getvalue()\">"; 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.