i was trying to create validation if user leaves empty prompt it gives error but as i click continue with filling it doesn't show it.
here is my jquery code.
$("#b1").click(function(){
            var pr=prompt("enter new link address");
            $("a").attr("href",pr);
            if($("pr").val() == '')
                {
                    var con1=confirm('Input can not be left blank');
                    if(con1==true)
                    {
                        var pr=prompt("enter new link address");
                        $("a").attr("href",pr);
                    }
                    else{
                        var conn=confirm('Input can not be blank'); 
                    }
                }
            });
here is my html.
<a href="https://www.google.com">google</a>
<button id="b1">attribute(a)</button>
is anyone had idea how to do in correct way to complete my assign.Thanks for your time.
 
    