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.
 
lxExpander Upgrades
Last Post 01 Jan 1900 05:00 AM by . 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
pauldesUser is Offline
Veteran Member
Veteran Member
Posts:1392

--
01 Feb 2007 11:07 PM  
1. On the lxExpander row, need to conditionally change the text or graphic? ie. I want to show a + sign when a row is collapsed and show a - sign when a row is open.

2. How do you maintain the state of the row, when a refresh occurs? ie. I have an address row that collapses and hides. User clicks to open it, they change a field that has an lxFetch on it, it executes and the row collapses causing the user to have to navigate back through the collapsed rows to where they were before lxFetch ran.
ListX....makes you look brilliant, even though you're not.
rtoneriiUser is Offline
Basic Member
Basic Member
Posts:308

--
01 Feb 2007 11:38 PM  
Hi Paul,
You could just use a javascript variable and set it to 1 or 0. All you need to do with the image is do a innerHTML replace. Something like this:

<script type="text/javascript">
<!--
var mModule = [ModuleID,System]
function ShowSection() {
var srcval = '<img id="imglxModImg" alt="max" src="[PORTALPATH,System]images/min.gif" style="cursor: pointer;" onclick="HideSection()" border="0" />';
document.getElementById('sExpanderImage').innerHTML =srcval;
lxModule(mModule ,false);
}
function HideSection() {
var srcval = '<img id="imglxModImg" alt="max" src="[PORTALPATH,System]images/max.gif" style="cursor: pointer;" onclick="ShowSection()" border="0" />';
document.getElementById('sExpanderImage').innerHTML =srcval;
lxModule(mModule ,true);
}
//-->
</script>


<span id="sExpanderImage">
<img id="imglxModImg" alt="max" src="[PORTALPATH,System]images/max.gif" style="cursor: pointer;" onclick="HideSection()" border="0" />
</span>


This has not been tested. I just threw it together. If you still have problems I might be able to throw together an LP on it.

Let me know if this works, I would be curious to see if I did it right.

Rick
nxtrackUser is Offline
New Member
New Member
Posts:53

--
21 May 2007 03:43 AM  
This might be what you're looking for. I like it even better because you can click the graphic to expand/collapse, too!

{IIF,"'[fob1,C]'='1'","
<span onclick=\"lxToggle('ob1','C','fob1','1','0','vis1','src','http://\[ALIAS,System\]/images/minus.gif','http://\[ALIAS,System\]/images/plus.gif');\"><img id=vis1 src=\"http://\[ALIAS,System\]/images/minus.gif\">Click Me!</span>
","
<span onclick=\"lxToggle('ob1','C','fob1','1','0','vis1','src','http://\[ALIAS,System\]/images/minus.gif','http://\[ALIAS,System\]/images/plus.gif');\"><img id=vis1 src=\"http://\[ALIAS,System\]/images/plus.gif\">Click Me!</span>
"}
<div id=ob1 style='display: {IIF,"'[fob1,C]'='1'","block","none"};'>Here's the extra detail.</div>
nxtrackUser is Offline
New Member
New Member
Posts:53

--
21 May 2007 04:01 AM  
(I just noticed the date of your post... you may have an alternative already)
If you add your mouseover style edits, from another post, and it gets downright pretty:

{IIF,"'[fob1,C]'='1'","
Click Me!
","
Click Me!
"}
Here's the extra detail.


----------------------------
The span/lxToggle is dupped on both sides of the IIF because on a refresh, you wouldn't know what side of it you would be on. If there's a shorter way, I'm all ears.
nxtrackUser is Offline
New Member
New Member
Posts:53

--
21 May 2007 04:02 AM  
{IIF,"'[fob1,C]'='1'","
<span onmouseover=\"this.style.color='#CC0000'\" onmouseout=\"this.style.color='#666666'\" onclick=\"lxToggle('ob1','C','fob1','1','0','vis1','src','http://\[ALIAS,System\]/images/minus.gif','http://\[ALIAS,System\]/images/plus.gif');\"><img id=vis1 src=\"http://\[ALIAS,System\]/images/minus.gif\">Click Me!</span>
","
<span onmouseover=\"this.style.color='#CC0000'\" onmouseout=\"this.style.color='#666666'\" onclick=\"lxToggle('ob1','C','fob1','1','0','vis1','src','http://\[ALIAS,System\]/images/minus.gif','http://\[ALIAS,System\]/images/plus.gif');\"><img id=vis1 src=\"http://\[ALIAS,System\]/images/plus.gif\">Click Me!</span>
"}
<div id=ob1 style='display: {IIF,"'[fob1,C]'='1'","block","none"};'>Here's the extra detail.</div>
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