RE: php and javascript error

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

 



> >>><a href="#" onclick="javascript:window.open('web_forward.php?address=<?
> >>>echo $web_url; ?>&agent=<? echo $agent; ?>&real_company_name=<? echo
> >>>$real_company_name; ?>', 'Web Site');">
> >>>
> >>
> >>This is a JavaScript issue, but may have something to do with
> the data you
> >>are echoing out in PHP. Look at the source in the browser. My guess it
> >>that
>
> >>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.


> >>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, because short tags may not be supported on the
target server. For portable, redistributable code, be sure not to use short
tags.

-- 
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