Re: javascript within php file

Re: javascript within php file

am 06.07.2007 01:52:34 von Jerry Stuckle

Kent wrote:
> Hi:
>
> I am hoping someone can help me out. I am trying to run javascript
> within a PHP file. The javascript works fine within a html file but
> when I move it over to a PHP file it longer works.
>
> Any ideas? Is there specific order?
>
> Thanks in advance!
>

Javascript runs on the client; PHP runs on the server.

As long as you either output the javascript as you would if it were in
an HTML file or echo/print it to the browser, it should work fine. The
client won't care.

But you didn't give us any code, and my crystal ball is broken, so it's
hard telling what your problem might be.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

javascript within php file

am 06.07.2007 02:24:11 von kent

Hi:

I am hoping someone can help me out. I am trying to run javascript
within a PHP file. The javascript works fine within a html file but
when I move it over to a PHP file it longer works.

Any ideas? Is there specific order?

Thanks in advance!

Re: javascript within php file

am 12.07.2007 15:32:24 von neetunayak20

On Jul 6, 5:24 am, Kent wrote:
> Hi:
>
> I am hoping someone can help me out. I am trying to run javascript
> within a PHP file. The javascript works fine within a html file but
> when I move it over to a PHP file it longer works.
>
> Any ideas? Is there specific order?
>
> Thanks in advance!

hello,
->it happens because the php file execute first and after this html

->an you can say html page is in php code so when the html page is
going to refresh that time it call PHP script first so it is specific
that you put the javascript after php tag or between php and html

Re: javascript within php file

am 11.08.2007 11:00:20 von emc2mmd2

On Jul 5, 7:52 pm, Jerry Stuckle wrote:
> Kent wrote:
> > Hi:
>
> > I am hoping someone can help me out. I am trying to runjavascript
> > within aPHPfile. Thejavascriptworks fine within a html file but
> > when I move it over to aPHPfile it longer works.
>
> > Any ideas? Is there specific order?
>
> > Thanks in advance!
>
> Javascriptruns on the client;PHPruns on the server.
>
> As long as you either output thejavascriptas you would if it were in
> an HTML file or echo/print it to the browser, it should work fine. The
> client won't care.
>
> But you didn't give us any code, and my crystal ball is broken, so it's
> hard telling what your problem might be.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

Eureka!!!
Thank God for friends like you Jerry.
I'm new at PHP also and got stuck on this, and duh... there it was.
I echoed ""
and Bingo!
Thanks again pal.
tony from ecommerceorlando.com