Pass Value from radiobutton to textbox in DynamicForm (DNN)

DynamicForm (3.4) and DNN 5.6.1

Here is the code snippet to do the trick (I only need the beginning three characters  from the selected value).

Past the following javascript in

$(PolicyRenewValue) = funcRadioCalc($(PolicyRenew_FieldID)).substring(0,3)

Advertisements

XML File Cache Issue with Flash Skin in DNN

We had a nice flash skin written by DrNuke. But when we change images for the flash to rotate, the cache issue becomes a problem to load the XML image path file.

Search around the Internet for this issue and found a solution with appending a random number at the end the XML file path.

Here is the code after change for the skin (only theis part:  …images.xml?”+Math.random()};  :

<script type=”text/javascript” src=”<%= SkinPath %>swfobject.js”></script>

<script type=”text/javascript”>

var params = { wmode: “transparent”, FlashVars: “XMLpath=<%= SkinPath %>Template-Flash-900×112-01.images.xml?”+Math.random()};

swfobject.embedSWF(“<%= SkinPath %>flash/flex-900×112.swf”, “FlashBannerContainer”, “900”, “112”, “9.0.0”, false, false, params);

</script>


Recursive CTE with subtree Count (SQL Server 2005+)

Here is a sample code with recursive CTE along the count of the subtree (children) to solve a question “Populate tree from self joined table with number of child records” at ASP.NET forum: http://forums.asp.net/t/1671284.aspx/1?Populate+tree+from+self+joined+table+with+number+of+child+records+

create table SampleRecursive (id int, name varchar(50),parentid int)

insert into SampleRecursive values(1,‘A’,0)
insert into SampleRecursive values(2,‘B’,0)
insert into SampleRecursive values(3,‘A.1’,1)
insert into SampleRecursive values(4,‘A.2’,1)
insert into SampleRecursive values(5,‘A.1.1’,3)
insert into SampleRecursive values(6,‘B.1’,2)
insert into SampleRecursive values(7,‘B.1.1’,6)
insert into SampleRecursive values(8,‘B.1.1.1’,7)
insert into SampleRecursive values(9,‘A.1.2’,3)

—-with mycte
—-as
—-(select
—- id, name, parentid, 0 as lvl from SampleRecursive sr
—-where sr.parentid=0
—-union all
—-select s.id, s.name,s.parentid,lvl+1 from SampleRecursive s
—-inner join mycte m on m.id=s.parentid
—-)

—-select * from mycte
—-order by name

;with mycte
as
(select
id, name, parentid, 0 as lvl from SampleRecursive sr
where sr.parentid=0
union all
select s.id, s.name,s.parentid,lvl+1 from SampleRecursive s
inner join mycte m on s.id=m.parentid
)

SELECT m1.id, name, parentid, (MAX(subcount)-1) [NUMBER OF CHILD RECORD FOR THIS LEVEL] FROM mycte m1
INNER JOIN (select id, COUNT(*) subCount from mycte GROUP BY id) m2 ON m1.id=m2.id
GROUP BY m1.id, name, parentid
ORDER BY m1.name


Popup Windows in coming DotNetNuke 6 (How to turn it Off)

DNN 6 (alpha (build 185 and 444) implemented popup windows (RadWindow) across the whole site by default. We have seen different responses at dotnetnuke forums about it. There are two ways we can change the default setting: from Site Amin page or from Individual Module Setting.

Method 1:

Admin>Site Settings>>Advanced Settings>>Usability Settings>>uncheck Enable Pop-Ups checkbox; 

Method 2:

Extensions>>Module >> Click Edit This Module >>From Edit Extension page, go to Module Controls section >> Click on Settings >> On Edit Module Control page, uncheck Supports Popups checkbox.