Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a button, when i click on button i need a popup which should have textbox and a button "ok". in textbox i can enter numerical values like 10, 12 etc and click on ok button. Later ok button click fires a method. It is possible? Can anyone tell me the steps and code to perform the same. any javascript? i have to integrate this feature in one sharepoint webpart. Do i need to write any javascript for the same?

share|improve this question
    
of course you can make a dialog window and have there some input. what did you do so far? –  Gwny Jul 23 at 7:41
    
i have not started it yet, can you let me know the process and code for the same please –  user21081 Jul 23 at 13:23
    
what do you want to do with this values?? –  Gwny Jul 23 at 13:27

1 Answer 1

Here is a short hint for your solution: HTML:

<input type="button" id="test" value="klick"></input>
<label id="label"></label>

JavaScript:

document.getElementById("test").onclick= function (){
var person = prompt("Please enter your name", "Harry Potter");
if (person != null) {
//do some stuff if ok is clicked and value entered  
        document.getElementById("label").innerHTML =
        "Hello " + person + "! How are you today?";
}
};
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.