ttinger
Sent: 12 April 2006 01:32
To: Chrome
Cc: Mace Eliason; php-general@lists.php.net
Subject: Re: [PHP] php varible in Javascript alert()
Yes, alert() as in the javascript:
var $errorMsg = <?php echo addslashes($phpError) ?>;
alert('error found: ' + $errorMsg);
On 4/11/0
; Dan
>
> ---
> http://chrome.me.uk
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anthony
> Ettinger
> Sent: 12 April 2006 00:58
> To: Chrome
> Cc: Mace Eliason; php-general@lists.php.net
> Subj
--
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anthony
Ettinger
Sent: 12 April 2006 00:58
To: Chrome
Cc: Mace Eliason; php-general@lists.php.net
Subject: Re: [PHP] php varible in Javascript alert()
On 4/11/06, Chrome <[EMAIL PROTECTED]> wrote:
> Does $errorMessage have an
On 4/11/06, Chrome <[EMAIL PROTECTED]> wrote:
> Does $errorMessage have any single quotes in it? Eg:
>
> Can't connect to DB
>
> Because if it does it will cause a Javascript error:
>
> alert('Can't connect to DB');
>
> Just another thing to look for :)
>
> Dan
>
> ---
> http://ch
Does $errorMessage have any single quotes in it? Eg:
Can't connect to DB
Because if it does it will cause a Javascript error:
alert('Can't connect to DB');
Just another thing to look for :)
Dan
---
http://chrome.me.uk
-Original Message-
From: Mace Eliason [mailto:[E
> On 4/11/06, Mace Eliason <[EMAIL PROTECTED]> wrote:
> > I am not sure why this won't work I am pretty sure I have done it before;
> >
> > if($error)
> > {
> > echo $errorMessage; // for testing error message is
displayed to screen
> > echo"alert('$errorMessage');";
> > }
At 11:19 AM
actually...
alert('');
On 4/11/06, Anthony Ettinger <[EMAIL PROTECTED]> wrote:
> alert('echo $errorMessage');
>
> On 4/11/06, Mace Eliason <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am not sure why this won't work I am pretty sure I have done it before;
> >
> > if($error)
> > {
> > echo $err
alert('echo $errorMessage');
On 4/11/06, Mace Eliason <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am not sure why this won't work I am pretty sure I have done it before;
>
> if($error)
> {
> echo $errorMessage; // for testing error message is displayed to screen
> echo"alert('$errorMessage');";
>
[snip]
if($error)
{
echo $errorMessage; // for testing error message is displayed to
screen
echo"alert('$errorMessage');";
}
[/snip]
What does $error contain? Echo it's output to the screen too, for
testing.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.
9 matches
Mail list logo