Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  dnn.callpostback not firing postback eventhandler in module
Previous Previous
 
Next Next
New Post 8/6/2007 7:20 PM
User is offline Nath P
4 posts
..
10th Ranked


dnn.callpostback not firing postback eventhandler in module 

Hi,

I have been working on this issue for the past few days and I appear to be no closer to solving it.

Let me explain my situation, I am working on a project that requires 2 interconnected (but seperate) modules working on the same page.

When I say 'interconnected' they essentially share some session objects and shared controller class objects. 

The problem is that whilst I can get custom postbacks to work in one module on the page, I am unable to get them working on the second module.  I followed the exact same steps (even cut and pasted) the code from one module to the other but the second module will not fire the server side postback event handler function.

I have stepped into the javascript and it appears to go through the motions of dnn.callpostback but the server side event simply does not fire.

I tried RaiseClientAPICallbackEvent and this works without a problem on the second module but I need to pass a simple client side gridview textbox value to the server side event and I canot do this using the RaiseClientAPICallbackEvent.

My server side module code:

 

 

 

 

 

 

Partial Class ViewGlobalCatalogue_BasketInherits Entities.Modules.PortalModuleBaseImplements Entities.Modules.IActionableImplements IClientAPICallbackEventHandlerPrivate BasketItems As New List(Of BasketItemInfo)

 

 

'Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.LoadTry

InitClientAPI()

 

 

 

 

Me.BasketItems = Session(BasketSessionObject)Me.gvBasket.DataSource = BasketItemsMe.gvBasket.DataBind()Catch exc As Exception 'Module failed to load

ProcessModuleLoadException(

 

Me, exc)End Try

 

 

End Sub

 

 

 

Protected Sub gvBasket_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvBasket.RowDataBoundDim btnEditCartItem As ImageButton = e.Row.FindControl("btnEditCartItem")If (Not IsNothing(btnEditCartItem)) Then

btnEditCartItem.Attributes.Add(

 

"onclick", "return doUpdateCartItemQtyPostback('" & DataBinder.Eval(e.Row.DataItem, "ItemId") & "','" & e.Row.FindControl("txtQty").UniqueID & "," & "','" & DataBinder.Eval(e.Row.DataItem, "Description") & "');")End If 

 

End Sub

 

 

 

Protected Sub InitClientAPI()If ClientAPI.BrowserSupportsFunctionality(ClientAPI.ClientFunctionality.XMLHTTP) _AndAlso ClientAPI.BrowserSupportsFunctionality(ClientAPI.ClientFunctionality.XML) Then

ClientAPI.RegisterClientReference(

ClientAPI.RegisterClientReference(

 

Me.Page, ClientAPI.ClientNamespaceReferences.dnn_xml)Me.Page, ClientAPI.ClientNamespaceReferences.dnn_xmlhttp)'Register External js file

 

If Not ClientAPI.IsClientScriptBlockRegistered(Me.Page, "GlobalCatalogue_Basket.Core.js") Then

ClientAPI.RegisterClientScriptBlock(

 

 

Me.Page, "GlobalCatalogue_Basket.Core.js", _"<script src=""" & Me.ModulePath & "GlobalCatalogue_Basket.Core.js""></script>")End If

 

End If

ClientAPI.RegisterPostBackEventHandler(

 

Me, "EditBasketQty", AddressOf EditBasketQtyPostBack, False)End Sub

 

 

 

 

 

 

BasketController.Refre****em(ItemId, Description, Qty, Context)

 

Private Sub EditBasketQtyPostBack(ByVal args As ClientAPIPostBackEventArgs)Dim ItemId As Integer = CInt(args.EventArguments("itemid"))Dim Qty As Integer = CInt(args.EventArguments("qty"))Dim Description As String = args.EventArguments("description")Dim BasketController As New GlobalCatalogue_BasketControllerEnd Sub

 

 

 

OnChangeBasketQty(

 

 

Public Function RaiseClientAPICallbackEvent(ByVal eventArgument As String) As String _Implements UI.Utilities.IClientAPICallbackEventHandler.RaiseClientAPICallbackEventDim args() As String = Split(eventArgument, ",")New AddToCartEventArgs(args(0), args(1)))Return eventArgumentEnd Function

 

 

 

Public Overridable Sub OnChangeBasketQty(ByVal e As AddToCartEventArgs)RaiseEvent ChangeBasketQty(Me, e)End Sub

 

Public Event ChangeBasketQty(ByVal sender As Object, ByVal e As AddToCartEventArgs)

End Class               

My Javascript code:

// Custom Postback for adjusting basket Qty

function

doUpdateCartItemQtyPostback(itemid,qtycontroluniqueid,description) {

var

dnn.callPostBack(

}

Any assistance would me much appreciated as this is driving me insane.

qty = document.getElementById(qtycontroluniqueid);'EditBasketQty', 'itemid=' + itemid,'qty=' + qty.value, 'description=' + description);

 
New Post 1/29/2008 8:24 AM
User is offline Tigris7
165 posts
9th Ranked


Re: dnn.callpostback not firing postback eventhandler in module 

Did you ever resolve this issue?

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  dnn.callpostback not firing postback eventhandler in module
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Cygnusoft Custom Software
Cygnusoft has been providing cutting-edge custom software solutions for 20 years. Cygnusoft is also a leading start-up incubator, helping our partners build successful new businesses.
www.cygnusoft.com
Digicon: DotNetNuke design and development
Digicon is based in Brisbane, Queensland, Australia
digicon.com.au
Live Visitor Tracking & Live Chat For DotNetNuke
Track your visitors in real time and add live chat for sales & support. Free Trial.
www.whoson.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP