Search the Community
Showing results for tags 'text tinput'.
-
Hello, I have a form built using PHP, and need to pass the text input value to an external .js file. Here is the PHP code: <?php $brsh_size = 1; ?> <span> <div><span><center><input class = 'sp-flat' type="color" id="picker" value="#000" act="get-color" /></center></div> <center class='font-brush'>Brush Size:</a><input type="text" size="3" maxlength="3" id="br_size" act="get-brushsize" value="<?php echo $brsh_size;?>"></div></center> </span> I have a case is an external .js file where the case is called correctly: case 'get-brushsize': //var myPhpValue = $("#brsh_size").val(); //console.log(myPhpValue); //var brush_size_i = document.getElementById("br_size").value; //console.log("brush size is " + brush_size_i); break; I left some of my trial code for reference, but please ignore as I've gotten much farther with this - but run into issues. I've tried every method on stack overflow and other sites, and am unable to '_GET' the value of the PHP variable (not my first choice) but preferably the text input from the input 'id'. Any help is appreciated. Thanks, DB