Re: Get PHP generated Javascript to work
| From: | Justin French | Date: | Mon, 19 May 2003 02:54:03 +0000 |
| Subject: | Re: Get PHP generated Javascript to work | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148136@lists.php.net to get a copy of this message | ||
If you suspect it's JS related, then view>source in your browser, and check
the code is what you expected. If it is, copy the related code bits into an
email, and send it/post it to a JS newsgroup or list.
Easy.
Justin
on 17/05/03 4:39 AM, Info@Best-IT (info@best-it.biz) wrote:
> I have a drop dow list with the following options:
>
> "<option name=\"title$i\" value=\"$id\" onChange=\"return
> reloadLoc();\">$element</option>\n";
>
> It is getting built in a while loop. I also have a file called loc.html
> that holds the java script function. So I read in that function with the
> following method:
>
> function SetScripts($filename)
> {
>
>
>
> $handle = fopen($filename, "r");
>
>
> $contents = fread($handle, filesize($filename));
>
>
> $this->scripts = $contents;
>
>
> fclose($handle);
>
>
> }
>
> $this->scripts then gets passed to a display() function. The HTML looks
> good in the source code of the page but does not execute. Here is my JS:
>
>
> <script language="JavaScript1.4" type="text/javascript">
> function reloadLoc()
> {
> window.location.href =
> "http://cajunmikes.com/adminform.php?table=$id";
> window.location.reload();
> }
> </script>
>
> Any insights why it won't work?
>
> /T
>