dj technics
Gebruiker
- Lid geworden
- 1 sep 2007
- Berichten
- 367
he,
eerst zal ik mij script geven;
variabele ouput is nogal vreem vind ik.
die neemt alles letter per letter inplaats van de hele string.
zou iemand mij kunnen zeggen wat ik fout doen.
ik zie het echt niet.
bedankt
dj technics
eerst zal ik mij script geven;
HTML:
$('#mainpage').submit(function(){
//var sets
var err = false;
var confirm = false;
var errMsg = new Array();
var confirmMess = new Array();
//checks
if($('#user_name').val() == ""){
err = true;
errMsg.unshift("Please insert an username.");
}
if($('#user_country').val() != autoCountry){
confirm = true;
confirmMess.unshift("The country that you\'ve selected is not the same as the country our system has detect.<br>Please check your selected country.<br>If it\'s normal click \'ok\'");
}
errMsg += "</ul>";
//error handler + output
if(err == true || confirm == true){
if(err == true){
var output = "Our system has detected some error\'s<ul>";
for(var i = 0; i < errMsg.length; i++){
output += "<li>"+errMsg[i]+"</li>";
}
output += "</ul><br />Please first solve this problems";
$(document).ready(function() {
var $dialog = $('<div></div>')
.html(output)
.dialog({
autoOpen: true,
title: 'automatic validation system'
});
});
return false;
} else if(confirm == true){
for(var i = 0; i < confirmMess.length; i++){
if(confirm(confirmMess[i])){
return true;
} else {
return false;
}
}
}
} else {
return true;
}
});
variabele ouput is nogal vreem vind ik.
Our system has detected some error's<ul><li>P</li><li>l</li><li>e</li><li>a</li><li>s</li><li>e</li><li> </li><li>i</li><li>n</li><li>s</li><li>e</li><li>r</li><li>t</li><li> </li><li>a</li><li>n</li><li> </li><li>u</li><li>s</li><li>e</li><li>r</li><li>n</li><li>a</li><li>m</li><li>e</li><li>.</li><li><</li><li>/</li><li>u</li><li>l</li><li>></li></ul><br />Please first solve this problems
die neemt alles letter per letter inplaats van de hele string.
zou iemand mij kunnen zeggen wat ik fout doen.
ik zie het echt niet.
bedankt
dj technics