I have an HTML file, and in the file, I have a javascript validate function to validate if the input of the text field in the other PHP file is blank or not. How can I use the 'gateway' name from myFile.html. This is what i have now:
myfile.html
<script type="text/javascript">
function Validate() {
if ((document.getElementsByName("gateway")[0].value == '')) {//I need to get access to "gateway" from myOtherFile.php
alert('Response required');
return false;
}
else { return true; }
}
</script>
myOtherFile.php
<div id="gatewayInput">
<form action="/action_page.php">
Gateway: <input type="text" name="gateway" placeholder="Gateway Name"><br>
</form>
</div>