Update of /cvsroot/magicajax/magicajax/Core/UI/Controls
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13863/Core/UI/Controls
Modified Files:
AjaxPanel.cs
Log Message:
--If another form tag was added to page, MagicAjax did not work; fixed it
--Corrected an encoding issue (solution provided by erivas)
--Some controls with AutoPostBack set to 'true' were not working properly; fixed it
--Set the version number to 0.3.0
Index: AjaxPanel.cs
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** AjaxPanel.cs 8 Feb 2006 20:48:43 -0000 1.59
--- AjaxPanel.cs 9 Feb 2006 13:41:00 -0000 1.60
***************
*** 535,539 ****
string clientID = (string)attrNameValues["id"];
! if (name == null)
continue;
--- 535,539 ----
string clientID = (string)attrNameValues["id"];
! if (name == null || clientID == null)
continue;
***************
*** 557,570 ****
case "checkbox":
if (isChecked != (form[name] != null))
! AjaxCallHelper.WriteFormat("document.forms[0][\"{0}\"].checked={1};\r\n", clientID, (isChecked) ? "true" : "false");
break;
case "radio":
if (isChecked && form[name] != value)
{
! AjaxCallHelper.WriteFormat("document.forms[0][\"{0}\"].checked=true;\r\n", clientID);
}
else if (!isChecked && form[name] == value)
{
! AjaxCallHelper.WriteFormat("document.forms[0][\"{0}\"].checked=false;\r\n", clientID);
}
break;
--- 557,570 ----
case "checkbox":
if (isChecked != (form[name] != null))
! AjaxCallHelper.WriteFormat("__PageForm[\"{0}\"].checked={1};\r\n", clientID, (isChecked) ? "true" : "false");
break;
case "radio":
if (isChecked && form[name] != value)
{
! AjaxCallHelper.WriteFormat("__PageForm[\"{0}\"].checked=true;\r\n", clientID);
}
else if (!isChecked && form[name] == value)
{
! AjaxCallHelper.WriteFormat("__PageForm[\"{0}\"].checked=false;\r\n", clientID);
}
break;
***************
*** 634,638 ****
{
if (oneSelection == null)
! AjaxCallHelper.WriteFormat("document.forms[0][\"{0}\"].selectedIndex=-1;\r\n", clientID);
else
AjaxCallHelper.WriteSetFieldScript(clientID, oneSelection);
--- 634,638 ----
{
if (oneSelection == null)
! AjaxCallHelper.WriteFormat("__PageForm[\"{0}\"].selectedIndex=-1;\r\n", clientID);
else
AjaxCallHelper.WriteSetFieldScript(clientID, oneSelection);
***************
*** 653,657 ****
if (!elemWritten)
{
! AjaxCallHelper.WriteFormat("o=document.forms[0][\"{0}\"].options;\r\n", clientID);
elemWritten = true;
}
--- 653,657 ----
if (!elemWritten)
{
! AjaxCallHelper.WriteFormat("o=__PageForm[\"{0}\"].options;\r\n", clientID);
elemWritten = true;
}
***************
*** 667,671 ****
if (!elemWritten)
{
! AjaxCallHelper.WriteFormat("o=document.forms[0][\"{0}\"];\r\n", clientID);
elemWritten = true;
}
--- 667,671 ----
if (!elemWritten)
{
! AjaxCallHelper.WriteFormat("o=__PageForm[\"{0}\"];\r\n", clientID);
elemWritten = true;
}
|