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

RadAlert, RadConfirm, RadPrompt does not work with ScriptmanagerProxy RadAjaxManagerProxy and MasterPages

14 Answers 593 Views
Window
This is a migrated thread and some comments may be shown as answers.
ACruz
Top achievements
Rank 1
ACruz asked on 09 Oct 2007, 06:55 PM
Hello,

I have a solution containing a master page with scriptmanager and RadAjaxManager.

According to your instructions i should place on the pages a scriptmanagerproxy and a radajaxmanagerproxy.


When calling radalert, radconfirm, radprompt there is a java exception "Object required" or Sys.invalidOperationException - Two components with the same ID 'alert' can't be added to the application.

A curious note is that if i remove the proxies and leave the scriptmanager and radajaxmanager on the master page the problem still persists.

If i place the radajaxmanager and scriptmanager into the page and remove them from the master page the error still occurs.

After carefull testing apparently radalert, etc don't work on master pages, it works however in standalone pages.


Currently I had to use Radwindow from radControls and not prometheus.


What am i doing wrong or what shoudl be done?

14 Answers, 1 is accepted

Sort by
0
Jason Maronge
Top achievements
Rank 1
answered on 10 Oct 2007, 03:55 AM
I also ran into problems with radalert and masterpages.  I will try and come up with a test project tomorrow if I have time.

Jason
0
Georgi Tunev
Telerik team
answered on 10 Oct 2007, 05:12 AM
Hi guys,

Indeed, there is a problem with radalert / radconfirm / radprompt in MasterPage scenario. The problem was discovered some time ago and the fix will appear with the service pack that will be available later today.

We apologize for the temporary inconvenience.




All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ACruz
Top achievements
Rank 1
answered on 10 Oct 2007, 09:54 AM

Hello,

I live in Europe, today is when? :)


I downloaded a hotfix available for prometheus on the client.net, i have no idea if that is the hotfix you mention.

The versions and files contained in the hotfix are exactly the same  (version and date) of the Q2 release...


As i pointed out on General Suggestions, it would be nice to at least have some info inside the zip file for hotfix specifying the "real" build date and what it fixes.

Anyway, the hotfix available on client.net and if it is the hotfix you mentioned still has the same problem.

thank You,

0
Georgi Tunev
Telerik team
answered on 11 Oct 2007, 09:43 AM
Hello Leandro,

I see that Ivo has already answered your other forum thread. As for the update, it will appear today (Thursday) - we've had to postpone the release with 1 day due to some last-minute changed that had to be made. We apologize for the delay.


Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Andrew Pike
Top achievements
Rank 1
answered on 15 Oct 2007, 08:50 AM
I'm having the same issues with radalert & master pages, and the hotfix doesn't appear to be available yet. Any word on the release?
0
Tervel
Telerik team
answered on 16 Oct 2007, 04:41 PM
Hello Andrew,

The update was released several days ago, and you can download the latest Prometheus version from your Client.net account. Let us know if you experience any difficulties.


Best wishes,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Puneet Jain
Top achievements
Rank 1
answered on 03 Mar 2010, 05:21 PM
We are using Q3 2009 in our organisation and still facing this problem, not able to call radwindow manager and rad alerts on master page when using radajax manager proxy.

Please provide solution.
0
Georgi Tunev
Telerik team
answered on 08 Mar 2010, 12:33 PM
Hello Puneet,

In such case I would like to ask you to open a support ticket and to send us a small sample project where this issue could be reproduced. Once we have a better view over your case, we will do our best to help.


Sincerely yours,
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
Hephzibah
Top achievements
Rank 1
answered on 08 Feb 2011, 12:08 AM
Hi,

 I am facing the same issue.
I am using Master pages and content pages.
When I use RadPrompt (the OK and Cancel buttons) are not firing

I have Rad controls version 2010.2.929.35 for (.net 3.5)
Please let me know the solution.

Thanks,


 
0
Georgi Tunev
Telerik team
answered on 10 Feb 2011, 02:18 PM
Hello Hephzibah,

If you are using a recent version of the controls, you should not experience this problem - this forum thread is almost 4 years old and the problem was fixed then.
To be able to help, we will need a better view over your case. Please open a support ticket and send us a sample project where the problem can be reproduced so we can investigate further.

Greetings,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Hephzibah
Top achievements
Rank 1
answered on 10 Feb 2011, 03:29 PM
Hi,

I am attaching my code. Its the same example found at
http://demos.telerik.com/aspnet-ajax/window/examples/browserdialogboxes/defaultcs.aspx
 I did download the latest version of Rad Controls v.2010.3.1215.35
I am using dll for .NET 3.5 and running it on IE 8

None of the prompt buttons are working!
Please reply me witha possibel solution.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadPrompt._Default" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head id="Head1" runat="server">

<!-- custom head section -->

<!-- end of custom head section -->

<style type="text/css">

* + html .PostbackButton, * html .PostbackButton

{

margin-left: 15px;

}

</style>

</head>

<body class="BODY">

<form runat="server" id="mainForm" method="post">

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

</telerik:RadScriptManager>

<telerik:RadFormDecorator ID="RadFormDecorator1" DecorationZoneID="DecoratedControlsContainer"

runat="server" />

<div class="module" style="width: 90%;">

<b>Browser GUI: Alert, Prompt, Confirm</b><br />

<hr />

<br />

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">

</telerik:RadWindowManager>

<table style="width: 100%;">

<tr>

<td id="DecoratedControlsContainer">

<script type="text/javascript">

//<![CDATA[

function confirmCallBackFn(arg) {

radalert("<strong>radconfirm</strong> returned the following result: <h3 style='color: #ff0000;'>" + arg + "</h3>", null, null, "Result");

}

function promptCallBackFn(arg) {

radalert("After 7.5 million years, <strong>Deep Thought</strong> answers:<h3 style='color: #ff0000;'>" + arg + "</h3>", null, null, "Deep Thought");

}

//]]>

</script>

<button style="width: 150px; margin-bottom: 3px;" onclick="radalert('&lt;h4>Welcome to RadWindow!&lt;/h4>', 330, 100,'RadAlert custom title'); return false;">

radalert dialog</button><br style="clear: both" />

<br style="clear: both" />

<button style="width: 150px; margin-bottom: 3px;" onclick="radconfirm('&lt;h3 style=\'color: #333399;\'>Are you sure?&lt;/h3>', confirmCallBackFn, 330, 100, null,'RadConfirm custom title'); return false;">

radconfirm dialog</button><br style="clear: both" />

<br style="clear: both" />

<button style="width: 150px" onclick="radprompt('&lt;span style=\'color: #333399;\'>What is the answer of Life, Universe and Everything?&lt;/span>', promptCallBackFn, 330, 160, null, 'The Question', '42'); return false;">

radprompt dialog</button>

<br style="clear: both" />

</td>

<td style="width: 50px;">

&nbsp;

</td>

<td style="vertical-align: top; border-left: 1px solid #cccccc; padding-left: 40px;">

<script type="text/javascript">

//<![CDATA[

function confirmFn() {

if (confirm("Are you sure?")) {

alert("confirm returned the following result: true");

}

else {

alert("confirm returned the following result: false");

}

}

function promptFn() {

var browserprompt = prompt('What is the answer of life, Universe and everything?', 42);

alert("Prompt returned the following result: " + browserprompt);

}

//]]>

</script>

<button style="width: 150px; margin-bottom: 3px;" onclick="alert('Standard browser\'s alert!'); return false;">

alert dialog</button><br style="clear: both" />

<br style="clear: both" />

<button style="width: 150px; margin-bottom: 3px;" onclick="confirmFn(); return false;">

confirm dialog</button><br style="clear: both" />

<br style="clear: both" />

<button style="width: 150px" onclick="promptFn(); return false;">

prompt dialog</button>

<br style="clear: both" />

</td>

</tr>

</table>

<script type="text/javascript">

//the following code use radconfirm to mimic the blocking of the execution thread.

//The approach has the following limitations:

//1. It works inly for elements that have *click* method, e.g. links and buttons

//2. It cannot be used in if(!confirm) checks

window.blockConfirm = function (text, mozEvent, oWidth, oHeight, callerObj, oTitle) {

var ev = mozEvent ? mozEvent : window.event; //Moz support requires passing the event argument manually

//Cancel the event

ev.cancelBubble = true;

ev.returnValue = false;

if (ev.stopPropagation) ev.stopPropagation();

if (ev.preventDefault) ev.preventDefault();

//Determine who is the caller

var callerObj = ev.srcElement ? ev.srcElement : ev.target;

//Call the original radconfirm and pass it all necessary parameters

if (callerObj) {

//Show the confirm, then when it is closing, if returned value was true, automatically call the caller's click method again.

var callBackFn = function (arg) {

if (arg) {

callerObj["onclick"] = "";

if (callerObj.click) callerObj.click(); //Works fine every time in IE, but does not work for links in Moz

else if (callerObj.tagName == "A") //We assume it is a link button!

{

try {

eval(callerObj.href)

}

catch (e) { }

}

}

}

radconfirm(text, callBackFn, oWidth, oHeight, callerObj, oTitle);

}

return false;

}

</script>

</div>

<br />

 

<br />

<asp:Label ID="Label1" runat="server"></asp:Label>

</form>

</body>

</html>

0
Svetlina Anati
Telerik team
answered on 15 Feb 2011, 03:30 PM
Hello Hephzibah,

 I tested with your exact code, the mentioned version of RadControls and under IE8 as you have noted, however - to no avail. Would you please examine the video capture I prepared for your reference and let me know if I am missing something?
 
http://screencast.com/t/PzsssOI9k

I also attached my test page - in case you reproduce the problem with the very same page, please send me a video capture or a modified page along with detailed reproduction steps and I will do my bets to help.

All the best,
Svetlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Hephzibah
Top achievements
Rank 1
answered on 15 Feb 2011, 04:10 PM
I am calling radprompt from content page of a master page ..It does not work with the code you attached in your previous reply.

Nevertheless I also tried running your code as its own applications ...Attached is the image I could capture (radprompt1)
I am not able to click OK or Cancel
But when I click the window close (X) I get the response back (radprompt2)

Now if I run the application with Firefox It works fine!

I am not sure what else can be done ?

Please help!

0
Svetlina Anati
Telerik team
answered on 18 Feb 2011, 09:32 AM
Hi Hephzibah,

 The only thing I can assume that might be happening is that you have some additional and probably global styles which are interpreted differently under IE and FF (this is a common case) and under IE there is another element (e.g a DIV) above the buttons. The result of this could be that when you click the button you actually click the DIV and the button's handler is not fired.

This being said, what I can suggest is carefully examine the page with IEDevToolBar and Firebug and find the difference which is causing the issue.

In case you need further assistance, please send us a live url where we can see the problem along with reproduction steps and we will examine it for you.

Kind regards,
Svetlina
the Telerik team
Tags
Window
Asked by
ACruz
Top achievements
Rank 1
Answers by
Jason Maronge
Top achievements
Rank 1
Georgi Tunev
Telerik team
ACruz
Top achievements
Rank 1
Andrew Pike
Top achievements
Rank 1
Tervel
Telerik team
Puneet Jain
Top achievements
Rank 1
Hephzibah
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or