I am currently importing a third party HTML file into my page and it has following java script method tied to a form submit.
function ValidateInput(){
//some code
if(validationFailed){
alert("Validation failed");
return false;
}else{
return openWin("URL");
}
}
I don’t have control over this code. But I want to intercept the URL that is mentioned in the openWin function and I want to do some validation on that URL before it opens.
Is it possible with JQuery?
You don’t need jQuery.
You can replace the function with your own and call the old one if you want.