Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIClientAPI PostBack & CallBackClientAPI PostBack & CallBack
Previous
 
Next
New Post
4/10/2006 6:35 AM
 

Hello!

I'm currently using the ClientAPI on my intranet application. The application has some documents on which the users make their changes depending on their role rights. The application has a list which shows the available documents for change.The list is refreshed automatically every 2 minutes using the ClientAPI callback. A list row must show the available document name and when clicked must perform a postback to the server and since the list is simple HTML i used on server the ClientAPI.RegisterPostBackEventHandler method and on client on every list row click I call the apropriate dnn.callPostBack function. These components work fine separately(if the list isn't refreshed from the callback the list row postback works and the refreshing of the list and the generation of the pastback functions for each list row is right), but after the list is refreshed when I click on a list row a JavaScript error shows. The error occours in the __dnn.prototype.callPostBack function because the dnn.getVar('__dnn_postBack') returns null. This is kind of urgent so if anyone can help i'd appreciate it. Thanks in advance!

 
New Post
4/10/2006 9:25 AM
 

My guess as to why this is coming back null is that on a refresh, the ID generated for the new data is changed.

The __dnn_postBack variable holds the script necessary to perform a postback and since your code is refreshing a list which I am guessing has a button/link on it that should do a postback this never gets updated. 

Probably the easiest thing to do is not use the RegisterPostBackEventHandler in this case.  If thiat is not possible, then you will need to manually make sure you keep the IDs in sync.


 
New Post
4/10/2006 9:44 AM
 

I tried to do some javascript debugging and i noticed that after a callback is done and a postback from the list is called the __dnnVariable from which is retrieved the __dnn_postBack variable(i suppose) is null(i tried with document.getElementById).

If i will not use RegisterPostBackEventHandler how can i fire an event on the server from the list item click? Thanks for your response
 
New Post
4/10/2006 3:44 PM
 
The same way you would do it in a normal asp.net application, using a control that does a postback when clicked.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIClientAPI PostBack & CallBackClientAPI PostBack & CallBack


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out