spooke2k Posted June 15, 2007 Share Posted June 15, 2007 <script type="text/javascript"> function function1() { var name = prompt("Please enter your name", ""); if ((name != null) && (name != "")) { document.form1.hidden1.value = name; } } </script> </HEAD> <BODY> <input type="radio" name="radio1" value="two" onclick="function1()">two <?php $name = document.form1.hidden1.value; //echo $name; ?> </form> how can i do pass the java prompt box to a php am using php self on how thing thanks spooke2k Link to comment https://forums.phpfreaks.com/topic/55706-solved-java-prompt-box-to-a-php-variable/ Share on other sites More sharing options...
Wuhtzu Posted June 15, 2007 Share Posted June 15, 2007 correct me if I'm wrong, but it seems like you have a problem because the javascript code is only executed when all PHP code is executed... Link to comment https://forums.phpfreaks.com/topic/55706-solved-java-prompt-box-to-a-php-variable/#findComment-275245 Share on other sites More sharing options...
spooke2k Posted June 15, 2007 Author Share Posted June 15, 2007 sorry im showing u snip of code the form is on a php self and that is cause by a button click which is what will cause the prompt to come up and from that i plan on using the variable collected to send to php so that it can run with that new variable at start. well thats the plan anyway Link to comment https://forums.phpfreaks.com/topic/55706-solved-java-prompt-box-to-a-php-variable/#findComment-275247 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.