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
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  ClientAPI PostBack & CallBack
Previous Previous
 
Next Next
New Post 4/10/2006 4:35 AM
User is offline Gjergji Spaho
13 posts
www.devalbania.com
10th Ranked


ClientAPI PostBack & CallBack 

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 7:25 AM
User is offline Jon Henning
1622 posts
www.codeendeavors.com
5th Ranked










Re: ClientAPI PostBack & CallBack 

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 7:44 AM
User is offline Gjergji Spaho
13 posts
www.devalbania.com
10th Ranked


Re: ClientAPI PostBack & CallBack 

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 1:44 PM
User is offline Jon Henning
1622 posts
www.codeendeavors.com
5th Ranked










Re: ClientAPI PostBack & CallBack 
The same way you would do it in a normal asp.net application, using a control that does a postback when clicked.
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  ClientAPI PostBack & CallBack
 


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.

 


PointClick DotNetNuke Solutions
PointClick Technologies provides high-end DNN Hosting for businesses.
PointClick.Net Hosted Solutions
Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com
DotNetNuke Marketplace - Modules & Skins
The DotNetNuke Marketplace is the official e-commerce gateway for the DNN ecosystem. It's the place to buy and sell DotNetNuke modules, DotNetNuke skins, and other DNN offerings.
DotNetNuke Marketplace

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