ESchmidgall
Technical User
Hello!
I am working on a database-querying script in php. It was all set up and working fabulously when I decided to make the "database information entry" form a dynamic form, since whether or not information is required in some fields depends on what is selected on the SELECT menu. To make the form dynamic, I added in a few lines of JScript, a standard form-validating function:
<script>
function CheckForm(){
if(document.insertform.locatoin_.selectedIndex ==5){
document.getElementsByName("otherloc_")[0].disabled="";
}
else{
document.getElementsByName("otherloc_")[0].disabled="disabled";
}
...and so on
}
</script>
Anyway, now that I've added in this, the php stuff that was working so beautifully before doesn't work at all. None of the queries to mySQL come back correctly, nothing gets put in the database correctly. Is there a step to integrating php and JScript that I have forgotten? Is it even possible to integrate php and JScript form validation? IF not, is there a way of doing this in php?
Thank you very much!
I am working on a database-querying script in php. It was all set up and working fabulously when I decided to make the "database information entry" form a dynamic form, since whether or not information is required in some fields depends on what is selected on the SELECT menu. To make the form dynamic, I added in a few lines of JScript, a standard form-validating function:
<script>
function CheckForm(){
if(document.insertform.locatoin_.selectedIndex ==5){
document.getElementsByName("otherloc_")[0].disabled="";
}
else{
document.getElementsByName("otherloc_")[0].disabled="disabled";
}
...and so on
}
</script>
Anyway, now that I've added in this, the php stuff that was working so beautifully before doesn't work at all. None of the queries to mySQL come back correctly, nothing gets put in the database correctly. Is there a step to integrating php and JScript that I have forgotten? Is it even possible to integrate php and JScript form validation? IF not, is there a way of doing this in php?
Thank you very much!