Click here to Skip to main content
15,912,313 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Display image on refresh with link [modified] Pin
daveyerwin30-Jul-10 17:47
daveyerwin30-Jul-10 17:47 
Questionvalidation using jscript Pin
Thanusree Duth29-Jul-10 18:48
Thanusree Duth29-Jul-10 18:48 
Answer[Cross-Post] validation using jscript Pin
Sandeep Mewara29-Jul-10 19:17
mveSandeep Mewara29-Jul-10 19:17 
GeneralRe: [Cross-Post] validation using jscript Pin
Thanusree Duth29-Jul-10 19:20
Thanusree Duth29-Jul-10 19:20 
Questionvalidation Pin
Thanusree Duth29-Jul-10 17:43
Thanusree Duth29-Jul-10 17:43 
Answer[Cross-Post] validation Pin
Sandeep Mewara29-Jul-10 19:16
mveSandeep Mewara29-Jul-10 19:16 
QuestionWell, soneone's gotta go first... Pin
NeverHeardOfMe22-Jul-10 9:14
NeverHeardOfMe22-Jul-10 9:14 
AnswerRe: Well, soneone's gotta go first... [modified] Pin
daveyerwin22-Jul-10 12:33
daveyerwin22-Jul-10 12:33 
NeverHeardOfMe wrote:
I feel that the "list" of allowable file types should be an array, and the test made
against that





<html><head><script>
var fileTypeAllowed = (function(){
		var ar = arguments;
	return function(arg){
		for(var i = ar.length;i--;){
			if(arg == ar[i]){return true;}}
		return false;
	};})('doc','docx','pdf');
alert(fileTypeAllowed('docx'));
alert(fileTypeAllowed('docxa'));
</script>
</head>
<body>
hi
</body></html>


modified on Tuesday, September 14, 2010 12:44 PM

GeneralRe: Well, soneone's gotta go first... [modified] Pin
NeverHeardOfMe22-Jul-10 12:45
NeverHeardOfMe22-Jul-10 12:45 
GeneralRe: Well, soneone's gotta go first... Pin
daveyerwin22-Jul-10 13:01
daveyerwin22-Jul-10 13:01 
AnswerRe: Well, soneone's gotta go first... Pin
mmagill04-Aug-10 6:57
mmagill04-Aug-10 6:57 
GeneralRe: Well, soneone's gotta go first... Pin
NeverHeardOfMe4-Aug-10 7:43
NeverHeardOfMe4-Aug-10 7:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.