faure Posted January 15, 2018 Share Posted January 15, 2018 <?php session_start(); ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> <title>bz888</title> <style> </style> </head> <body> <script type="text/javascript"> function formv() { //alert("1"); // HERE OK //---------------------------------------- document.getElementById(liste).style.visibility = "visible"; //-----------------------HERE DONT WORKING id liste alert("2"); } function Lien() { alert("zz"); i = document.Choix.Liste.selectedIndex; if (i == 0) return; url = document.Choix.Liste.options.value; parent.location.href = url; } </script> <p>first</p> <!-- this form hidden after load --> <form id="liste" name="nameliste" visibility: hidden> <!-- here ok --> <!--------------------------------------------------------> <fieldset> <legend>Personalia:</legend> </fieldset> </form> <!-- button with onclick to put visible the form liste by script formv--> <form id="bouton2" name="bouton2"> <p><input type="button" name="bouton2" value = "OKOK" onclick="formv()" ></p> </form> </body> </html> Link to comment Share on other sites More sharing options...
dsonesuk Posted January 15, 2018 Share Posted January 15, 2018 Put id reference value in quotes, as it is now its treating liste as undefined variable. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now