Entries Tagged as ''

Import module definition blank page error solution DotNetNuke

In Dotnetnuke many time you can get a blank page on Import module definition.For one of my dnn(dot net nuke) site i did Host=>Module definition=>Import module definition and got a blank page.I did a google and found solution applied that and now making that code available here.For making this thing to work you ned to get few SQL commands run from host sql window.

So, the solution is to run SQL script with Run as Script option, in Host > SQL :

So, the solution is to run SQL script with Run as Script option, in Host > SQL :

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'{databaseOwner}[{objectQualifier}GetUserRoles]‘) AND OBJECTPROPERTY(id, N’IsPROCEDURE’) = 1)
DROP PROCEDURE {databaseOwner}{objectQualifier}GetUserRoles
GO


CREATE PROCEDURE {databaseOwner}{objectQualifier}GetUserRoles
@PortalId int,
@UserId int
AS
SELECT
R.*,
UR.UserRoleID,
U.UserID,
U.DisplayName,
U.Email,
UR.EffectiveDate,
UR.ExpiryDate,
UR.IsTrialUsed
FROM {databaseOwner}{objectQualifier}UserRoles UR
INNER JOIN {databaseOwner}{objectQualifier}Users U ON UR.UserID = U.UserID
INNER JOIN {databaseOwner}{objectQualifier}Roles R ON UR.RoleID = R.RoleID
WHERE
U.UserID = @UserId AND R.PortalID = @PortalId

GO

declare @ModuleDefID int

select @ModuleDefID = ModuleDefID
from {databaseOwner}{objectQualifier}ModuleDefinitions
where FriendlyName = 'Module Definitions'
IF NOT EXISTS (SELECT ModuleControlID FROM {databaseOwner}{objectQualifier}ModuleControls WHERE ModuleDefID = @ModuleDefID AND ControlKey = N'Import')
BEGIN
insert into {databaseOwner}{objectQualifier}ModuleControls ( ModuleDefID, ControlKey, ControlTitle, ControlSrc, IconFile, ControlType, ViewOrder, HelpUrl, SupportsPartialRendering )
values ( @ModuleDefID, 'Import', 'Import Module Definition', 'Admin/ModuleDefinitions/ImportModuleDefinition.ascx', NULL, 3, NULL, NULL, 0 )
END


Node List Javascript | Traverse nodes Dom Elements In javascript

The NodeList object represents a live collection of Node objects. This means that any alterations to the number or properties of nodes is immediately reflected in the list. This list permits indexed access to individual nodes as well as iteration through the collection. To demonstrate this Object we shall use the following simple XML file ‘library.xml’.

<library>
<book>
<category>fiction</category>
<title>Eyeless in Gaza</title>
<author>Aldous Huxley</author>
</book>
<book>
<category>classics</category>
<title>John Barleycorn</title>
<author>Jack London</author>
</book>
</library>

We shall now create a NodeList object of all the ‘title’ elements using the document’s getElementsByTagName method. The number of nodes in the collection is determined using the length property, and their nodeValue properties are displayed by accessing each in turn through the item method.

Code (JavaScript):
var xml_doc = new ActiveXObject(”Microsoft.XMLDOM”);
xml_doc.async = false;
xml_doc.load(”library.xml”);

var title_nodes = xml_doc.getElementsByTagName(”title”);
var n_titles = title_nodes.length
for (i = 0; i < n_titles; i++)
document.write(title_nodes.item(i).text + “<br>”);

Output:
Eyeless in Gaza
John Barleycorn

There are also Microsoft extensions for this object.
PROPERTIES

length Property
This property returns the number of items in the NodeList collection.

Syntax: NodeList.length

METHODS

item Method
This method returns the item at the specified index of the Node collection. These are numbered from 0 to one less than the value of the length property. Using an invalid index returns null.

Syntax: NodeList.item(index)


Intro to Flashvars | Passing variables to flash actionscript from the html embed | Tutorial | passing dynamic variable from php file

Overview

The property “FlashVars” can be used to import root level variables to the flash movie or swf. The flashvars propery is used in codes for embedding flash in the html page. The string of variables passed in as flashvars, will be imported into the top level of the movie when it is first instantiated. Variables are created before the first frame of the SWF is played. The format of the string is a set of name=value combinations separated by ampersand (&) symbols. Here’s some sample embed codes, including object and embed tags:

<object width=”540″ height=”240″ title=”sample”> <param name=”movie” value=”flashvarsTutorial.swf” /> <param name=”flashvars” value=”var1=here&var2=are&var3=my&var4=flashvars” /> <embed src=”flashvarsTutorial.swf” flashvars=”var1=here&var2=are&var3=my&var4=flashvars” type=”application/x-shockwave-flash” width=”540″ height=”240″ ></embed> </object> Actionscript using flashvars :- txt1.text=var1;