FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » how to add javascript in php
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
how to add javascript in php [message #32529] Fri, 07 July 2006 02:50 Go to next message
coolbens is currently offline  coolbens   Philippines
Messages: 2
Registered: July 2006
Karma: 0
Junior Member
how to add javascript in php? lets say that the javascript is question and answer javascript and i want to add it in the database plz. help me this is our project.

plz give me the code and step by step instructions on how to do it..

i am a student.. i am a newbie of php please help me php masters!!!!

thanks....
Re: how to add javascript in php [message #32717 is a reply to message #32529] Mon, 17 July 2006 17:27 Go to previous messageGo to next message
satovey is currently offline  satovey   United States
Messages: 3
Registered: July 2006
Karma: 0
Junior Member
I'm not a php master,
but you can easily add your html code to
a php program by first entering
the php end tag script

<?PHP

Your php code is hear

?>

Your html or javascript code is here.

<?PHP

Your back to the php coding here.

<?

If you do a bit of googling, you can find
good examples of this. Go to zend.com and
you can get semi working copies of code,
not to mention a plethora of tutorials and
other documentation.


Scott
Yevotas® Site
Yevotas.biz
Re: how to add javascript in php [message #32788 is a reply to message #32529] Fri, 21 July 2006 11:03 Go to previous messageGo to next message
cancan is currently offline  cancan   United Kingdom
Messages: 2
Registered: July 2006
Karma: 0
Junior Member
coolbens wrote on Thu, 06 July 2006 22:50

how to add javascript in php? lets say that the javascript is question and answer javascript and i want to add it in the database plz. help me this is our project.

plz give me the code and step by step instructions on how to do it..

i am a student.. i am a newbie of php please help me php masters!!!!

thanks....


I'm not quite sure what you're meaning - are you meaning you want javascript to talk to your database?
Confused
Re: how to add javascript in php [message #32840 is a reply to message #32529] Wed, 26 July 2006 06:32 Go to previous messageGo to next message
coolbens is currently offline  coolbens   Philippines
Messages: 2
Registered: July 2006
Karma: 0
Junior Member
yes
Re: how to add javascript in php [message #34257 is a reply to message #32529] Mon, 16 October 2006 12:42 Go to previous message
sBForum is currently offline  sBForum   Jordan
Messages: 5
Registered: October 2006
Location: Jordan
Karma: 0
Junior Member

u can't do that ! except for using another technology like AJAX for requesting another PHP page by JavaScript to do something on the server side ..

but u can control JavaScript by PHP easily by ECHOing the javascript normally like this :
<?php

echo "<script language='javascript'>
YOUR JAVASCRIPT CODE GOES HERE!
</script>";

?>


anything else?

regards,
sBForum
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: cookies or sessions???
Next Topic: Newbie Question - Ignore missing ? links in URL
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Dec 02 18:20:22 GMT 2024

Total time taken to generate the page: 0.02151 seconds