Learn More





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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to send http post from a link in a report?How to send http post from a link in a report?
New Post
1/21/2015 3:17 PM

I've used DNN for a lot of things, and this time I'm making a prayer request page on my church's site. We are calling it a "Prayer Wall" because after a request is made in a form, it is approved by a moderator and then put on the page in a DNN Report module in a list with all the other requests. 

So here is the question.

 I am creating the html for the report in a SQL server stored procedure and I want to put a button in the report for each line in the report that when clicked would send a silent http post to a Dynamic Forms module on another page that would run an action on the line of data (prayer request). The actions would be either to approve it or delete it, and there are some other actions too. I have all those pieces worked out. The buttons, the form and the actions. What I need help with is how to send an http post from my button or link.

From what I learned so far, I think I need to write a javascript function and put it on the page somewhere - possibly in the report header, and then call the function from the links while passing the correct parameters.

Do I have it right? Has anyone done some tips for me? I have seen javascript code for sending an http post but I don't know what to do with the script or where to put it or how to call it. I'm a quick study so if you can point me in the right direction I would very much appreciate it!

- Mark Buelsing

New Post
1/31/2015 11:47 AM
have a look at it'll show how to write a service framework and how to invoke it via ajax. However as you're using html hosted within an email, might I suggest that a simple form with method="post" would be simpler to do (the endpoint would then be a httphanlder)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
New Post
1/31/2015 12:46 PM
Thanks Cathal, but I don't understand. Email is not involved. I need a button on each row of a DNN Reoprts module. And the button will do an httppost.
New Post
1/31/2015 3:49 PM


I'm thinking NavigateURL() method would work.  In my opinion it's a lot easier than JS but I lean toward .Net.  i would think you'd want javascript to do as much of this client side as possible but clearly, going to another page is a redirect and thus a call back to the server anyhow.

I may not have your process correctly envisioned but if it's like this:

  1. I'm on page A
  2. I want to go to page B and produce an action

Then all you need to do is pass some sort of parameter in one of the .NavigateUrl overloads and call it a day.

Does that help or did I oversimplify it? (Or miss it completely!)

New Post
1/31/2015 5:26 PM
Michael and Cathal, thank you both for your help. I just worked this out by using a link in the report that runs a line of javascript like this:

"a name="mycounter" onclick="jQuery.ajax({url: 'http://MyURL?Action=IncrementCount&SPost=True&ID=MyRecordID)'})"

the SPost parameter is interpreted as a silent post by the dymamic forms module that is receiving this communication so the user is not moved from the page they were on when they clicked the link.

I just formatted the link like a button with a css class.

Thank you for your suggestions!
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to send http post from a link in a report?How to send http post from a link in a report?

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.
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?