R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
Weird issues with Javascript & ListX
Last Post 11 Mar 2009 07:22 PM by svedire. 5 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
csaxenaUser is Offline
New Member
New Member
Posts:21

--
13 Oct 2008 11:17 PM  
I am trying to use Listx to dynmically populate some data in Charts. I am using a module called AMCharts which uses Javascript to populate chart data. I have tried this multiple ways.

I used Action variables to run muleiple queries and then use the outout of the query in the Format section to populate the charts. What I have noticed is that only the last chart gets populated with the data and others are blank.

I used SUBQUERY clause in Format section to populate chart data in Javascript for displaying the chart. Again only the last one gets populated.

I used Action variables to store the entire Javascript for generaing the charts. This Action variables also executes the query and populates chart data. When I view it in "Debug" mode, I can see the correct values getting populated in Action variable. However when I print it out it just prints the variable name instead of the value. Am I doing something wrong?

Can you please help? I will email you the XML for this ListX.
Thanks,
Chhavi


ewalkerUser is Offline
Basic Member
Basic Member
Posts:221

--
14 Oct 2008 02:25 PM  
You might try writing the text directly to the page (not as javascript) to prefect your subquery. Then you can throw the javascript tags back in.

Also, you might try writing the javascript out by hand first to see if you can get the chart working manually.

thanks,
-Eric


Eric Walker - R2integrated
csaxenaUser is Offline
New Member
New Member
Posts:21

--
14 Oct 2008 02:52 PM  
If I hard code the values in the JavaScript it works fine. If I have just one chart on the page, it works fine. When I have multiple charts, then only the last one gets renders. It might have something to do with the order of how things are rendered.

Thanks,
Chhavi


csaxenaUser is Offline
New Member
New Member
Posts:21

--
14 Oct 2008 04:34 PM  
Here is the XML for the ListX that I am using.

Attachment: listx2.xml

csaxenaUser is Offline
New Member
New Member
Posts:21

--
14 Oct 2008 07:52 PM  
I have tried a few different things and I feel that this is somehow related to JavaScript and ListX and how the two interact. I have 3 Actions, each of which execute a query. In the format section I have client side JavaScript code that takes the values from the query executed in Action and embeds it along with other stuff. When I do a view source of the code the first two sections have the query variable name (example: [complPct,qryAP], [complOnTimePct,qryAP]) embedded instead of the value of the query result, only the last one has the correct value. If I change the order of the statements in format section, the last one always works. Has anyone run into this before?
Thanks



svedireUser is Offline
Basic Member
Basic Member
Posts:128

--
11 Mar 2009 07:22 PM  
Hi,

Do three query actions executed have a different name? If they have the same name, then you are overriding whatever is coming from the first two query actions. I tried loading your configuration on my system but it failed. Would you mind uploading it again?

Sindura
R2integrated


You are not authorized to post a reply.

Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share