Re: passing variables from php to javascript

From: Date: Tue, 11 Jul 2000 12:13:14 +0000
Subject: Re: passing variables from php to javascript
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5903@lists.php.net to get a copy of this message
At 07:06 AM 7/11/00 -0500, you wrote: >I have been working on integrating a small javascript function in with php. I am including the code. Everything works as is, but I also need to pass a variable from the html/php into the javascript function to print out the string length of the text post. Please let me know how this can be done. That simply cannot be done, php is server-side and javascript is client side, there is NO interaction WHATSOEVER in between and they have NOTHING to do with eachother. I'm guessing there's a possibilty in javascript to access the form fields directly to determine the length of the current string, but that's not a php issue, so you'll have to browse through javascript resources to find out how to do that. I am afraid I don't know how to do it myself, otherwise I would tell you =)

« previous php.general (#5903) next »