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

RadAlert - How do position at the top of the page?

4 Answers 96 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 01 Sep 2010, 05:44 PM
Hi..
I'm using the following code. WHen a user clicks a Save button at the bottom of the page.

 

 

string scriptstring = "radalert('Information Added!',300, 100);";

 

 

 

ScriptManager.RegisterStartupScript(this, this.GetType(), "radalert", scriptstring, true);

 


How can I position the RadAlert at the top of the page? So the user can begin to enter a new record? I tired

txtLastName.Focus()

but it doesn't seem to work...

thanks

4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 03 Sep 2010, 12:19 PM
Hi Jon,

I assume you want to focus a textbox after the radalert's OK button is clicked. If this is so, you could use the add_close() method of the object to execute your focusing code:

function alertFn()
{
    var oWnd = radalert("alertmsg");
    oWnd.add_close(function ()
    {
        $get("txt1").focus();
    });
}


Greetings,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jon
Top achievements
Rank 1
answered on 07 Sep 2010, 03:28 PM
I'm getting object is null .... I know the name of the Rad Combo Box IS cmbPREFIX.. any ideas ?  thanks

function

 

 

alertSaved() {

 

 

 

var oWnd = radalert("Information Added!",300,100, "TRU");

 

oWnd.add_close(

 

function () {

 

$get(

 

"cmbPREFIX").focus();                      <--- ERROR HERE

 

});

}


0
Jon
Top achievements
Rank 1
answered on 07 Sep 2010, 04:27 PM
I got it working.. BUT it does not set the focus on the RadCombo... Looks like nothing gets focus

 

 

function alertSaved() {

 

 

 

var oWnd = radalert("Constituent Information Added!",300,100, "TRU");

 

oWnd.add_close(

 

function () {

 

document.getElementById(

 

'<%= cmbPREFIX.ClientID %>').focus()

 

 

});

}


HELP
0
Jon
Top achievements
Rank 1
answered on 07 Sep 2010, 08:00 PM
I'm going open a ticket..  need this fixed  asap.. thanks
Tags
Window
Asked by
Jon
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Jon
Top achievements
Rank 1
Share this question
or