Hi,
I have created a validation file in js that will direct users to another page if the link they clicked on is stored on the file however I need the if function contained in the file to work with arrays or a list of some sort
thnx in advance here is the code I have been working with
[CODE=javascript]<!--
function validate(url){
outlink = url
str0 = 'page1.htm'
str1 = 'page2.htm'
str2 = ''
if ( outlink == str0 || outlink == str1 || outlink == str2 ){
outlink = 'error.htm'
}
else{
outlink = outlink
}
window.location .href=(outlink)
}
// -->[/CODE]
I have created a validation file in js that will direct users to another page if the link they clicked on is stored on the file however I need the if function contained in the file to work with arrays or a list of some sort
thnx in advance here is the code I have been working with
[CODE=javascript]<!--
function validate(url){
outlink = url
str0 = 'page1.htm'
str1 = 'page2.htm'
str2 = ''
if ( outlink == str0 || outlink == str1 || outlink == str2 ){
outlink = 'error.htm'
}
else{
outlink = outlink
}
window.location .href=(outlink)
}
// -->[/CODE]
Comment