Hi Telerik,
I am trying to get the return value from radconfirm. below is the my code.
//javascript
I am trying to get the return value from radconfirm. below is the my code.
//javascript
function ValidateFn()
{
var clk;
clk = radconfirm(
'Do you want to accept changes done by ABC?',callbackFn,310,100,null,'Title');
alert(clk);
}
function callbackFn(arg)
{
//Here i need to store this variable in a hidden field which i will be using in server side code.
alert(arg);
}
<asp:ImageButton ID="ImageButton1" OnClientClick="ValidateFn(); return false;" runat="server" />
But when i click on image button then radconfirm window itself is not coming. this problem is occurring only in case when the page is inherited from master page. In case of simple page it is working fine.
Please help me to short out this problem.
waiting for reply!
5 Answers, 1 is accepted
0
Binod
Top achievements
Rank 1
answered on 26 Mar 2010, 06:12 AM
Hi Telerik ..
i didn't get any reply ... need ur help.
Guys anyone if having any idea regarding this issue please reply.
i didn't get any reply ... need ur help.
Guys anyone if having any idea regarding this issue please reply.
0
Accepted
Hi Binod,
The code that you posted works fine (no matter where the RadWindowManager is - in the master page or in the content one). Please check the attached movie and test setup and let me know if I am missing something.
Regards,
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.
The code that you posted works fine (no matter where the RadWindowManager is - in the master page or in the content one). Please check the attached movie and test setup and let me know if I am missing something.
Regards,
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
Binod
Top achievements
Rank 1
answered on 29 Mar 2010, 07:20 AM
thanks a lot for ur reply..
0
Binod
Top achievements
Rank 1
answered on 05 Apr 2010, 02:33 PM
<script language="javascript" type="text/javascript"> |
var oldConfirm = radconfirm; |
window.radconfirm = 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){} |
} |
} |
} |
oldConfirm(text, callBackFn, oWidth, oHeight, callerObj, oTitle); |
} |
return false; |
} |
</script> |
Sorry for the late Reply..but the code which you sent here is not working when we use above script in asp page:
please reply with the alternative solution in this case because i need this code in my page.
waiting for your reply
Thank you in advance.
0
Hello Binod,
The code that you posted in your last reply is a workaround that helps mimicking the blocking of the execution thread with radconfirm() in some scenarios. I don't know what your scenario is, but I suggest to examine the demo in which we use that code (check the info on the page as well as it contains important information about the popups) and this Code Library article.
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.
The code that you posted in your last reply is a workaround that helps mimicking the blocking of the execution thread with radconfirm() in some scenarios. I don't know what your scenario is, but I suggest to examine the demo in which we use that code (check the info on the page as well as it contains important information about the popups) and this Code Library article.
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.