开发者

Custom validation

I'm creating an web app using jQuery Validation and jQuery UI. I'd like to know:

  • Is there some way to open a modal window only when the user forget 开发者_运维问答to fill an specific field?

  • Is there some way to create a custom validation which call a SELECT to check if the username is available?

Thankss!


Is there some way to open a modal window only when the user forget to fill an specific field?

$("#buttonID").click(function () {  // on click
if ($("input[type$='text']").val().length < 1) // if all input by type=text is null
$("#model").dialog("open"); // open dialog box

*Is there some way to create a custom validation, which call a SELECT to check if the username is available? *

I would probably use an Ajax call to database using php, asp or .net to check your Database for username and respond back, (with out knowing your scripting language I cant help you further)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜