Re: php's variables & javascript

From: Date: Tue, 28 May 2002 18:49:14 +0000
Subject: Re: php's variables & javascript
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-99537@lists.php.net to get a copy of this message
On Tue, 28 May 2002, burak delice wrote: > I want to make a php that include javascript that use a php variable. Code > is below: > > <? > $size = GetImageSize ("images/$resim"); > echo "<script language=\"JavaScript\"> > wdth=";$size;echo";"; > echo "</script>"; > ?> > > (I am calling that php file as below) > http://localhost/Aksu/web/getimage.php?resim=K00.jpg > > But explore gives me an javascript error that syntax error. Why? and how can > do my purpose? For one thing, "wdth" is a misspelling of "width". What do you see when you view the source that gets sent to the browser? miguel

« previous php.general (#99537) next »