javascript - How to intercept a URL with JQuery -


i importing third party html file page , has following java script method tied form submit.

function validateinput(){        //some code         if(validationfailed){                       alert("validation failed");                 return false;             }else{                    return openwin("url");         }     } 

i don't have control on code. want intercept url mentioned in openwin function , want validation on url before opens.

possible jquery?

you don't need jquery.

you can replace function own , call old 1 if want.

var oldopenwin = openwin; openwin = function(url) {     // validation     // call old 1     oldopenwin(url); } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -