You probably have forms on your child pages. You don't need that. The form on the master page is quite sufficient.

 

I define a script on the master page so that I can submit the master page from scripts on child pages. I also use hidden text elements to pass action verbs back to the page if necessary. You can have any number or these hidden verbs on a page, so you can get a very fine degree of control.

 

You can handle the postback on the master page or the child pages as you see fit.

 

There may be minor typos in the following script since I typed it directly in (I can't test it here).

 

<form id='MainForm' runat=server>

       <input id='hiddenAction' type='hidden' runat=server/>

</form>

 

<script language="_javascript_" type="text/_javascript_">

      

       var MainForm = DocAll('<% =MainForm.UniqueId.Replace("$","_") %>');

       var hiddenAction = DocAll('<% =hiddenAction.UniqueId.Replace("$","_") %>');

       function SubmitForm(Action)

       {     

              hiddenAction.value = (typeof(Action) == "undefined" ? "" : Action);

              MainForm.submit();

 

       }

 

       //support script

       var bDocAll = false;

       if (document.all)

       {

              bDocAll = true;

}

       function DocAll(szID)

       {

              if (bDocAll)

              {

                     return document.all(szID);

              }

              else

              {

                     return document.getElementById(szID);

              }

       }

 

</script>

 

Geoffrey J. Swenson

[EMAIL PROTECTED]

 

 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of ShadowLord
Sent: Thursday, July 20, 2006 6:58 AM
To: Ajax.NET Professional
Subject: [ajaxpro] AJAX Not working in Particular Masterpages

 

 

Because we need the W3C certification for Html 4.01 Transitional, we

have removed the tag <form id="form1" runat="server"> from our

masterpages. This step was necessary, otherwise the validation tool

complains that the form element should not be nested.

 

In this scenario, ajaxpro.net (6.7.19.1) fails to include the 4 js

needed for ajax interoperability. Thus _javascript_ will not work

correctly.

 

 

Is there any workaround, for this scenario?

 

Thanks in advance,

Pier

 

 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---

Reply via email to