This is a migrated thread and some comments may be shown as answers.

Set default radprompt textbox default value

1 Answer 99 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
EVERIAL
Top achievements
Rank 1
EVERIAL asked on 02 Dec 2011, 04:05 PM
Hi everybody,

I would like to set a default value in the textbox of my radprompt, but I still can't do that :(

The prompt is displayed when user click on an image in my application, and I implement the javascript in behind-code.
Example :

StringBuilder sb = new StringBuilder();
            sb.Append("<script language= javascript ");
            sb.Append("type=\"text/javascript\">");
            sb.Append("function promptEmail");
            sb.Append(this.ClientID);
            sb.Append("(param){radprompt('email:', promptEmailCallBack, 300, 100, param, 'Title');}");
            sb.Append("</script>");
            if (!Page.ClientScript.IsClientScriptBlockRegistered("promptEmail" + this.ClientID))
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "promptEmail" + this.ClientID, sb.ToString());

I add an argument to radprompt like
radprompt('email:', promptEmailCallBack, 300, 100, param, 'Title', 'My Default text');

but this display nothing in my textbox :(

Can you please help me?

Thanks
jean

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Dec 2011, 05:10 AM
Hello,

Try the following.

radprompt('Client RadPrompt: What is the answer of Life, Universe and Everything?', promptCallBackFn, 330, 160, null, 'Client RadPrompt', '42')
Note: Here 42 is the default value.

Also take a look into the following documentation.
Working with the Prompt Dialog

Thanks,
Princy.
Tags
Ajax
Asked by
EVERIAL
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or