/    Sign up×
Community /Pin to ProfileBookmark

How do I use an ASP created variable in Javascript?

[SIZE=2][FONT=Century Gothic]I’m fairly new to ASP and Javascript, but I’m gradually learning the ropes and pushing what I can do based on stuff I see on the net.

What I’m trying to do is the following:

First of all, I can create dynamic text in ASP based on database values including links etc and output this to the page the client sees, plus I can scroll text in Javascript on the client.

However, what I want to do is combine the two ideas to create a dynamic piece of text to scroll. However, I’m having problems trying to pass the dynamic variable that holds the text I want to scroll into Javascript.

One idea I’ve had is to use a Cookie, but is there a better way? If a Cookie is the option, what’s the syntax to store it using ASP and also how to retrieve it using Javascript?

Any thoughts/ideas would be appreciated.

This is probably a fairly basic question, but I’m still learning!!!

stevusuk ? [/FONT] [/SIZE]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@stevusukauthorAug 20.2005 — It's okay - I've come across the solution: simple really. Write a line to include the Javascript variable from the ASP code....
×

Success!

Help @stevusuk 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.18,
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,
)...