We have been trying to change the visibility of an input from within a php function. Other code will execute in the PHP code block but no luck changing the visibility of the input. will post code because it is a test project all the code is in a php file Our question is how to make the input visible with js
if($response->success == 1){
echo "<script
type='text/javascript'>document.getElementById('idb').style.visibility
='visible'; </script>";
}else{
header('location:https://androidstackoverflow.com/index.html');/* page
on
the server */
die();
}
}
?>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
<style type="text/css">
#inb{
visibility: hidden;
}
</style>
<form method="post" action="">
<input type="text" name="your_name" placeholder="Your Name" /><br /><br />
<input type="text" name="email" placeholder="Your Email Address" /><br />
<br
/>
<div class="g-recaptcha" data-sitekey="<?php print $SITE_KEY; ?>"></div>
<input id="inb" type="submit" name="submit_form" value="Submit Your
Information" />
so I am calling this function from the PHP block of code and still no results I use this to call the function echo "changeVisibility()"; and here is the function code
<script type="text/javascript">
function changeVisibility(){
var formTag = document.getElementById('inb');
formTag.style ="visibility:visible"
}