Re: php and javascript error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mar 7, 2007, at 10:24 AM, Ed Curtis wrote:

Edward Kay wrote:

you've got a stay quote mark in one of your PHP vars.

Not it, I looked and there's nothing there.
I'm sure it's because you've got some stray characters in your output that mess it up. It would help if you actually posted the source rather than just
saying it's OK, when it clearly isn't.

The problem wasn't a stray apostrophe. Brad Fuller was dead on. It was the space in the window name option of the javascript. It works as expected once the space is removed.

PPS: It's advisable not to use the short tags, use <?php instead of <?

Can you tell me why? Is it just a personal preference?
If you move to another server where the short tags option is off, your code
will break. From the manual:
Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are
not under your control

My scripts aren't meant for distribution also they will only ever be delpoyed on a server that I control. Thanks for the tip though and thanks to everyone that helped.

Ed

This isn't a javascript discussion list but, javascript and php compliment each other very well.

Internet Explorer has error reporting that can be turned on in the preferences.

I would try that before making any other assumptions.

Believe me, I started developing javascript before php and with no IDE for javascript you 'have to rely on the browsers error reporting facilities, and lots of alert dialogs used as break points. Safari on Mac is a head ache because it has no error reporting at all and I have encountered problems with it that do not show up in any of the browsers that do
have error reporting.
Hope that helps,
Jeff K

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux