Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...New Scrolling Problem[Plz help me]New Scrolling Problem[Plz help me]
Previous
 
Next
New Post
5/14/2007 11:40 AM
 

Hi Guys,

I have develope a site in dnn.on one of the page, i have used my customer developed "News" module.Now my client wants that his news scroll on every page at the top.So i have developed a skinobject.My problem is that i have to call a java script function on load event to load scroll text in textbox and  as we can not use body tag in user control.So where do i call my javascript function?

My code is as follow

<%

 

@ Control Language="vb" AutoEventWireup="false" Codebehind="NewsScroller.ascx.vb" Inherits="TFP.DNN.SkinObjects.NewsScroller.NewsScroller"

%>

<

 

HTML

>

<

 

HEAD

>

<

 

SCRIPT LANGUAGE

="JavaScript">

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http:

 

//javascript.internet.com -->

<!-- (c) http:

 

//www.wyka-warzecha.com -->

 

<!-- Begin

// THESE VARIABLES CAN BE CHANGED //

var

 

myMainMessage=" Try this out! The message just keeps repeating. Use it for announcements, news and other items! "

;

var

 

speed=150;

var

 

scrollingRegion=50;

// END CHANGEABLE VARIABLES //

var

 

startPosition=0;

function

 

mainTextScroller() {

 

 

var

mainMessage=myMainMessage;

 

 

var

tempLoc=(scrollingRegion*3/mainMessage.length)+1;

 

 

if

(tempLoc<1) {tempLoc=1}

 

 

var

counter;

 

 

for

(counter=0;counter<=tempLoc;counter++)

mainMessage+=mainMessage;

document.getElementByID(mainTextScroller).value=mainMessage.substring(startPosition,startPosition+scrollingRegion);

startPosition++;

 

 

if

(startPosition>scrollingRegion) startPosition=0;

setTimeout(

 

"mainTextScroller()"

,speed); }

// End -->

</

 

SCRIPT

>

</

 

Head

>

 

 

<body MS_POSITIONING="GridLayout" onload

="mainTextScroller()">

 

 

<input type="text" name="mainTextScroller" size

="40">

 

 

 

</body

>

</

HTML>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guys please help me out in resloving this issue.

Thank in Advance

 

 
New Post
5/22/2007 12:38 AM
 

Hi Guys,

i have used marque tag instead of javascript code for scrolling headline.it has solved my problem.

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...New Scrolling Problem[Plz help me]New Scrolling Problem[Plz help me]


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out