Join our DNN Community    (Newsletter, Tips, Tricks and Forums for DNN Skins & Modules)

 


 
Microsoft Gold Certified Partner - DNN Benefactor

DotNetNuke Powered! 


Monday, December 01, 2008 Register · Login · Contact · Search:  
Company Solutions Portfolio Contact
Forums
General
The ever-powerful ListX module forum. Post your questions, new configuration ideas and reviews.
Subject: Strange Issue on SQL

You are not authorized to post a reply.   
Author Messages
vdelisi
Posts:50

08/25/2008 11:50 AM Alert 
Maybe it is strange for me, but I've this situation:
- two module on different tab (search result and detail page)
- on the search result module (a grid) for each element I have a link to its detail page
- everytime that the user click on the link I want to store this click on the row of the product and on a log table

So I do this, that sometime work and sometimes no...<img src='http://dnn.bi4ce.com/desktopmodules/ntforums/images/emoticons/crazy.gif' height='20' width='20' border='0' title='Crazy' align='absmiddle'>


1) create a Message Variable called GoTo that fill @ProdID

2) create a Message Action

Message: Awaiting incoming message with Type 'GoTo'.

3) create an Execute Query nested to the Message Action

Execute Query[UPDATE_VIEW]:

INSERT INTO [Prod_LogView] ([ProdID] ,[Date]) VALUES (@ProdID ,getdate() )

UPDATE [Products] SET [NumView] = isNull([NumView],0) + 1 WHERE [ProdID]=@ProdID


4) on the Format (List Item) I've written

<div><a onclick="{ACTION, [ProdID],GoTo,,Message,FALSE}" href="http://[ALIAS,System]/tabid/57/default.aspx?prodid=[ProdID]" >[Name]</a><div>



What's wrong?

Thanks
Vincenzo
svedire
Cruiserweight
Posts:107

08/25/2008 1:15 PM Alert 
Hi Vincenzo,

In your <a> tag, you have provided a link in the href. So, its always taking you to the detail page without executing the statements in the onclick event.

Try doing it the following way:

<a href="#" onclick="{ACTION, [ProdID],GoTo,,Message,FALSE};return false;">[Name]</a>

Do the same thing as you are doing under Action:Message but because you want to go the detail page after doing these actions, add Action:Redirect (indented under Action:Message after all your SQL statements are done). You can use the debugger to see if everything is correct.

Hope this helps.

Let me know if you have questions.

Thanks,
Sindura
R2integrated

vdelisi
Posts:50

08/26/2008 2:18 AM Alert 
Ok, it works

Thanks
Vincenzo
You are not authorized to post a reply.
Forums > Bi4ce.Modules.ListX > General > Strange Issue on SQL



ActiveForums 3.6
Latest Post
 
At R2integrated (formerly Bi4ce), we take support seriously.  That's why we support our customers and DNN community with daily monitoring from our experienced engineering team.  We ask that the first step taken is to read the relevant documentation and support forums prior to submitting any questions that may already be available or have been answered.  We ask that you review the documentation that we provide for our products before posting a question.

The Forums are for our customers to chat, exchange ideas and strategies, and submit feedback.  Please be sure to perform keyword searches for previous related forum responses.

To be helpful when submitting a new item, please include the following: 
  1. DNN Version
  2. Module Version
  3. Admin Log Viewer Information
  4. Environment detail: Operating system, .NET framework version, database and version, IIS version, Browser version (if appropriate)
We always try to respond quickly and monitor the forums daily during business hours (EST).  Occasionally, requests for a specific project requirement may not apply for the free support offered. For project specific support please submit via our Information Request form.

Thank you for using our Forums.

Click here to register for the Forums
 
© 2008 by R2integrated (formerly Bi4ce) | DNN® is a registered trademark of DotNetNuke Corporation