Validating after button click

Posted by / 16-Oct-2019 03:27

There's a code example here: Hope that's helpful.

I've omitted the other form fields, as I'm only interesting in refactoring the code for the onclick event of the 'Test' URL button.

I know I need to include some sort of check to see if the input is valid, and if it is, pass the URL into a new window, but I'm not sure how to go about this.

I've created a JSBin with a working example to help assist in what I'm trying to do.

I am working on simple website making a textbox and a button.

while clicking on button error should be given that "textbox value can't be empty".

validating after button click-47validating after button click-11validating after button click-67

$.Defaults(); $('#form1').validate(); $('#test Base URL').on('click', function () ); var Test Button = function (el) ; Test Button.prototype._handle Click = function (evt) ; Test Button.prototype._bind Events = function () ; var foo = new Test Button('#test Base URL');var Likes = function (el) ; Likes.= function (name) ; var Search Results = function (el) ; Search Results.Results = function (results) ; Search Results.prototype._handle Click = function (evt) ; Search Results.prototype._populate = function (results, tmpl) ; As you can see, it's a blatant ripoff of her code.