Re: MySql, PHP and Javascript

2003-02-01 Thread Benjamin Pflugmann
Hi.

On Fri 2003-01-31 at 08:27:11 +, [EMAIL PROTECTED] wrote:
> 
> Is it possible to mix javascript and PHP in the same script??

Of course. One (PHP) is run on the server side in order to create a
page which is sent to the client (here: the browser). The other
(Javascript) may be contained in that page and is executed on the
client side. So if you want to use Javascript, you have to write your
PHP pages in a way that they output the needed Javascript. Which
should be easy, if you kept your algorithms and HTML kind of seperated
in PHP.

HTH,

Benjamin.


PS. If you completly mixed printing the HTML into the algorithms, then
it isn't going to be easy, but no change to the HTML would be - so you
didn't do that, right?

> I have a number of web based apps written in PHP/MySql and while they 
> are functionally pretty good they are aesthetically garbage. I'll like 
> to pretty up the interfaces with rollovers etc, but haven't got time to 
> learn JS properly especially if I have to completly re-write the 
> functionality.
[...]

-- 
[EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySql, PHP and Javascript

2003-01-31 Thread Brian

- Original Message -
From: Steve Davies <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 31, 2003 3:27 AM
Subject: MySql, PHP and Javascript


> Hi All
>
> Is it possible to mix javascript and PHP in the same script??
>

Short answer:   Yes   :)

Longer explanation:
Javascript is just for font end presentation, or formating.. Like HTML   it
doesnt effect the php or mysql

php gets processed on the server..  JS gets processed on the client browser



Brian


> I have a number of web based apps written in PHP/MySql and while they
> are functionally pretty good they are aesthetically garbage. I'll like
> to pretty up the interfaces with rollovers etc, but haven't got time to
> learn JS properly especially if I have to completly re-write the
> functionality.
>
> Any help greatly appreciated
>
> Steve
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: MySql, PHP and Javascript

2003-01-31 Thread Jennifer Goodie
PHP is server side, javascript is client side, they do not interact with
each other.  PHP gets parsed by on the server before the page is rendered,
javascript is interpreted by the browser.  You can either have PHP generate
the javascript or just put it in the page.  Rollovers have nothing to do
with backend programming.

-Original Message-
From: Steve Davies [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 31, 2003 12:27 AM
To: [EMAIL PROTECTED]
Subject: MySql, PHP and Javascript


Hi All

Is it possible to mix javascript and PHP in the same script??

I have a number of web based apps written in PHP/MySql and while they
are functionally pretty good they are aesthetically garbage. I'll like
to pretty up the interfaces with rollovers etc, but haven't got time to
learn JS properly especially if I have to completly re-write the
functionality.

Any help greatly appreciated

Steve


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySql, PHP and Javascript

2003-01-31 Thread Brent Baisley
Of course. Javascript is a client side scripting language and is run in 
the users browser, whereas PHP is run on the server. The javascript is 
just text to the PHP parser, like HTML.

Javascript will allow you to do dynamic stuff, but if you are looking 
for aesthetics you would be better off learning style sheets. CSS is 
much more efficient than javascript. You can actually simulate buttons, 
borders and lots of other stuff by just using CSS. And if you get good 
at CSS, you can even create themes for your website.

For instance, adding this simple code in the  of your web page 
will cause links to change to a yellow background when the mouse is over 
the link.


a:hover {background-color: yellow};
That's a heck of a lot better than adding an onMouseOver event to every link. On Friday, January 31, 2003, at 03:27 AM, Steve Davies wrote: Is it possible to mix javascript and PHP in the same script?? I have a number of web based apps written in PHP/MySql and while they are functionally pretty good they are aesthetically garbage. I'll like to pretty up the interfaces with rollovers etc, but haven't got time to learn JS properly especially if I have to completly re-write the functionality. -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Re: MySql, PHP and Javascript

2003-01-31 Thread Doug Thompson

Steve:

On Fri, 31 Jan 2003 08:27:11 +, Steve Davies wrote:


>Is it possible to mix javascript and PHP in the same script??
>

Certainly.  Exactly as HTML and PHP are intermingled in a document.

>I have a number of web based apps written in PHP/MySql and while they 
>are functionally pretty good they are aesthetically garbage. I'll like 
>to pretty up the interfaces with rollovers etc, but haven't got time to 
>learn JS properly especially if I have to completly re-write the 
>functionality.
>

Using PHP to enhance javascript's functionality doesn't eliminate the
need to know javascript.

>Any help greatly appreciated

Your inquiry will receive more detailed help on one of the lists at
www.php.net.

Regards,
Doug



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: MySql, PHP and Javascript

2003-01-31 Thread Hoffman, Geoffrey
Absoulutely.
Since PHP is server-side you can write javascript dynamically on the fly
which are then executed client-side.
Here's a simple example:



var today = '';



> -Original Message-
> From: Steve Davies [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 31, 2003 1:27 AM
> To: [EMAIL PROTECTED]
> Subject: MySql, PHP and Javascript
> 
> 
> Hi All
> 
> Is it possible to mix javascript and PHP in the same script??
> 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: MySql, PHP and Javascript

2003-01-31 Thread [EMAIL PROTECTED]
>Is it possible to mix javascript and PHP in the same script??

Yes it is, but you have to remember that PHP is server side and Javascript
is Client side. 

>I have a number of web based apps written in PHP/MySql and while they 
>are functionally pretty good they are aesthetically garbage. I'll like 
>to pretty up the interfaces with rollovers etc, but haven't got time to 
>learn JS properly especially if I have to completly re-write the 
>functionality.

Have you thought of using CSS for rollovers?  The newest browsers can do
rollovers pretty good using CSS

Ken Robinson


mail2web - Check your email from the web at
http://mail2web.com/ .



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySql, PHP and Javascript

2003-01-31 Thread Kamara Eric R-M


Hi Steve,

You can definitely mix javascript and PHP in the same script so long as
you follow the correct syntax for each language.There is no way out here
really...if you want to include javascript in your scripts then you have
to learn it:-) unless you want to hire someone to do it for you...

Regards,
Eric

 On Fri, 31 Jan 2003, Steve Davies wrote:

> Hi All
>
> Is it possible to mix javascript and PHP in the same script??
>
> I have a number of web based apps written in PHP/MySql and while they
> are functionally pretty good they are aesthetically garbage. I'll like
> to pretty up the interfaces with rollovers etc, but haven't got time to
> learn JS properly especially if I have to completly re-write the
> functionality.
>
> Any help greatly appreciated
>
> Steve
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySql, PHP and Javascript

2003-01-31 Thread Kevin Smith
Hi Steve,

Yes, it is possible to mix PHP and JavaScript, for example:

var givemeaphpvalue = ;

I use PHP and Javascript together quite often.

Regards,

Kevin
- Original Message -
From: "Steve Davies" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 31, 2003 8:27 AM
Subject: MySql, PHP and Javascript


> Hi All
>
> Is it possible to mix javascript and PHP in the same script??
>
> I have a number of web based apps written in PHP/MySql and while they
> are functionally pretty good they are aesthetically garbage. I'll like
> to pretty up the interfaces with rollovers etc, but haven't got time to
> learn JS properly especially if I have to completly re-write the
> functionality.
>
> Any help greatly appreciated
>
> Steve
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySql, PHP and Javascript

2003-01-31 Thread Josh Trutwin

> Hi All
>
> Is it possible to mix javascript and PHP in the same script??

Client-side Javascript can be sent to the user along with your html.

For Example:

echo ("\n");
echo ("\n");
echo ("\n");
echo ("\n");

and so on...

The client is then sent:






Is it possible to use JavaScript calls on the server side?  Don't think
so, but there is a Java extension to PhP that may help you if that's what
you're after:  http://www.php.net/manual/en/ref.java.php

HTH,

Josh

> I have a number of web based apps written in PHP/MySql and while they
> are functionally pretty good they are aesthetically garbage. I'll like
> to pretty up the interfaces with rollovers etc, but haven't got time to
> learn JS properly especially if I have to completly re-write the
> functionality.
>
> Any help greatly appreciated
>
> Steve



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySql, PHP and Javascript

2003-01-31 Thread Stefan Hinz, iConnect \(Berlin\)
Steve,

this list is not the right place to ask JavaScript questions. Please
check out an appropriate list at http://php.net/.

But, anyway, it's possible to mix JS and PHP, no problem.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Steve Davies" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 31, 2003 9:27 AM
Subject: MySql, PHP and Javascript


> Hi All
>
> Is it possible to mix javascript and PHP in the same script??
>
> I have a number of web based apps written in PHP/MySql and while they
> are functionally pretty good they are aesthetically garbage. I'll like
> to pretty up the interfaces with rollovers etc, but haven't got time
to
> learn JS properly especially if I have to completly re-write the
> functionality.
>
> Any help greatly appreciated
>
> Steve
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php