/    Sign up×
Community /Pin to ProfileBookmark

I’ve seen this done in applets and I was just wondering if there were anyway it could be done in Javascript. If not, then could someone please direct me to the proper information.

The following is my entire code for a scroller I have, the rest is in .js files (as you can see). What I would like to know is there anyway to allow anyone to enter parameters from here (such as background images or even text and images to scroll) other than going into the .js files and altering them there?

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>

<html>
<HEAD>
<title></title>

<!– Insert this tag into the header –>
<script language=”JavaScript” src=”javas/initializeScroller.js”>
</script>

</head>

<!– IMPORTANT TO LOAD THE FUNCTION “LoadFuncs()” HERE!!!!! –>
<body onLoad = “LoadFuncs()”>

<!– example that you can have the scroller anywhere you wish now –>
<table align=”center” border=”2″><tr><td>

<!– Insert this script to where you want it –>
<script language = “JavaScript1.2″ src=”javas/scroller.js”>
</script>

</td></tr></table>
</body>
</html>

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63Feb 05.2003 — Its difficult to assume that which approach the code writer has taken,but surely in the

javas/initializeScroller.js

file the text or the parameters are set.

Look for a function or for the varaibles that constitute the scrollers message/images

then in the head section below the

javas/initializeScroller.js

call

create another block of script and in this block give those variables values you wish.

cheers

Khalid
Copy linkTweet thisAlerts:
@havikauthorFeb 05.2003 — K, thanks

I'll give it a shot and report back later.

Havik
Copy linkTweet thisAlerts:
@havikauthorFeb 05.2003 — Well, I got it to work, and this is how (for anyone interested). It's not pretty but it works.

Anyone have any ideas of how I can have a separate text file that I can scroll, as of right now the content to be scrolled is located within document.write tags, which isn't very user friendly.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<HEAD>

<title></title>

<script language="JavaScript" src="javas/initializeScroller.js">

</script>

</head>


<body onLoad = "LoadFuncs()">


<script language = "JavaScript1.2">

var pixels = 1;

var viewBoxHeight = 160;

var viewBoxWidth = 150;

var scrollBoxHeight = 160;

var scrollBoxWidth = viewBoxWidth - 30;

var defaultScrollSpeed = 50;

var scrollBG = "";

var font_color = "black";

var buttonBG = "white";

var border = "0";

var bordercolor = "white";

</script>

<script language = "Javascript1.2" src="javas/scroller.js">

</script>

</body>

</html>
×

Success!

Help @havik spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...