Javascript Issue - Postet den (1139 Views)
Advanced Member
Carefree
Innlegg: 4224
4224
I want to use a variable in a Javascript routine. Here's the bit, if I leave the part in red off, it works ... but users have to know the path:

Code:

function avi() {
var text = getText();
if (helpstat) {
alert("Plays various media formats.\n\nUSE: [avi]"& strForumURL & "/player.swf[/avi]");
} else if (basic) {
AddTxt="uploads/"+<%=cStr(MEMBERID)%>+"/[/red]"+ text + "\]Play Media";
AddText(AddTxt);
} else {
if (text) {
txt=prompt("URL Link to media file.",text);
} else {
txt=prompt("URL Link to media file.","Text");
}
if (txt!=null) {
AddTxt="Play Media";
AddText(AddTxt);
}
}
}
   
 Sidestørrelse 
Postet den
Support Moderator
Shaggy
Innlegg: 6780
6780
You'll need to rewrite your JS in ASP and include the variable that way or, when calling the function, pass the variable through in the arguments.
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Postet den
Advanced Member
Carefree
Innlegg: 4224
4224
Thanks Shaggy, I'll give her a shot when I get out of the hospital again.
 
Du må legge inn en melding