Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Javascript Issue

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
Carefree Posted - 30 March 2011 : 00:43:21
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:


function avi() {
	var text = getText();
	if (helpstat) {
		alert("Plays various media formats.\n\nUSE: [avi]"& strForumURL & "/player.swf[/avi]");
	} else if (basic) {
		AddTxt="[url=\"pop_player.asp?MTitle=uploads/"+<%=cStr(MEMBERID)%>+"/"+ text + "\]Play Media[/url]";
		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="[url=\"pop_player.asp?MTitle="+txt+"\"]Play Media[/url]";
			AddText(AddTxt);
		}
	}
}
2   L A T E S T    R E P L I E S    (Newest First)
Carefree Posted - 30 March 2011 : 17:37:32
Thanks Shaggy, I'll give her a shot when I get out of the hospital again.
Shaggy Posted - 30 March 2011 : 06:41:48
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.


Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000 Version 3.4.07