/    Sign up×
Community /Pin to ProfileBookmark

SRC= a variable, need help, please

The following works nicely:
<script language=”javascript” src=”http://www.rss-info.com/rss2.php?integration=js&windowopen=1&rss=http%3A%2F%2Fwww.cstv.com%2Fsports%2Fm-wrestl%2Fheadline-m-wrestl-rss.xml&number=100&width=320&ifbgcol=FFFFFF&bordercol=D0D0D0&textbgcol=F0F0F0&rssbgcol=F0F0F0&showrsstitle=1&showtext=1“> </script>

BUT THIS DOES NOT:

<script language=”javascript”
var STRINGER=”http://www.rss-info.com/rss2.php?integration=js&windowopen=1&rss=http%3A%2F%2Fwww.cstv.com%2Fsports%2Fm-wrestl%2Fheadline-m-wrestl-rss.xml&number=100&width=320&ifbgcol=FFFFFF&bordercol=D0D0D0&textbgcol=F0F0F0&rssbgcol=F0F0F0&showrsstitle=1&showtext=1“;

src=STRINGER> </script>

Why won’t the use of a variable work with src=? Do I have to do something else to get this to work, sorry I am not a javascript guy and can’t figure this out.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@felgallSep 26.2006 — The script tag is HTML. You can't put Javascript inside HTML tags, you can only put Javascript between the open and close script tags or in the external file referenced by the src= attribute of the script tag. The only Javascript that can go anywhere else are event handlers that can be added to some tags. These event handlers all start with on eg. onmouseover, onclick, onkeypress. The "var STRINGER = ..." has to go in the external file or between the script tags.
Copy linkTweet thisAlerts:
@1maddogauthorSep 27.2006 — Isnt <script language="javascript" the opening tag of Java Script and </script> the closing tag?? So then the var STRINGER= is between the Java tags?
×

Success!

Help @1maddog 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.19,
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,
)...