<input type="text" placeholder="Game" class="game_selector" name="game" autocomplete="off"/>
Basically calls a php case called game_selector. This php case makes a call to my database, pulls some data, and then displays it back to the user. The user then has to select one of the bits of data they are provided with. With this javascript validation, I am displaying errors in real time. At the moment, for the above field, I only have
$("[name='game']").blur(function(){
var to = $("input[name='game']").val();
if(to != 0)
{
$("#wGame").css({
"background-image": "url('http://www.example.com/tick.png')"
});
} else {
$("#wGame").css({
"background-image": "none"
});
}
});
So it only makes sure the input isnt 0. Is there anyway I may be able to get it to check that something from the displayed results is selected? The php code puts the results from the database call into an array
array_push($game, $thisgame);
I am not to sure if I can do anything with this. I cant use the error handling from the php because this isnt executed until the submit button is pressed.
Anyways, I am pretty lost as to what my options are, so any advise appreciated.
Cheers
This post has been edited by Dormilich: 30 July 2012 - 01:08 AM
Reason for edit:: I doubt you own the test.com domain

New Topic/Question
Reply



MultiQuote




|