1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Rep Power
    I'm building a site in PHP and I can't get javascript ot work on any of my php pages.
    I have tried <a href=right.php3 target=right onClick=parent.down.location.href=down.php3;>
    where right is the right frame and down is the bottom frame,what I want it to do is to update the bottom frame since the current page has updated the mysql databas from wich the down fram gets it's data by an sql query. I get zero action from down.php. The <a href... is called from a print"" in a php pages
  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Central Florida, USA
    Rep Power
    I don't see enough of your code to help you, but essentially, the problem is not with PHP + Javascript. PHP is transparent to Javascript; it is server-side only while Javascript is client-side only. As long as the PHP code outputs syntactically correct HTML and Javascript, the Javascript will execute. The best way to debug this is to output your PHP page to the browser, and then View Source, save that HTML output and debug your Javascript there, then see how you can change your PHP to output the right HTML.

    And vice-versa, as long as Javascript is calling the right HREF, etc... PHP will receive http requests and do its business.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Helden,Limburg,The Netherlands
    Rep Power

    Maybe first check your use of ' and ", sometimes it is better to use the ' when you are typing in a print statement, especially when Javascript is concerned...


    Ramon Litjens
    Boradoli Web Design
  6. #4
  7. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Perth West Australia
    Rep Power
    if you are using <?php print - or echo" etc you need to pass the commands as a script ie:

    <?php echo" <script>location.href="link.php3" target="etc etc ..."</script>?>

    sometimes you even have to pass a document.write(etc.



    Simon Wheeler
    FirePages -DHTML/PHP/MySQL

Similar Threads

  1. JavaScript confirm() and PHP
    By nickcwj in forum JavaScript Development
    Replies: 6
    Last Post: September 22nd, 2003, 10:41 PM
  2. I need to translate a PHP command to Javascript
    By mapg in forum JavaScript Development
    Replies: 3
    Last Post: September 7th, 2003, 02:47 PM
  3. I need to translate a PHP command to Javascript
    By mapg in forum JavaScript Development
    Replies: 0
    Last Post: September 5th, 2003, 06:56 PM
  4. Cronjob madness
    By eliteboo in forum Linux Help
    Replies: 10
    Last Post: July 14th, 2003, 10:49 AM
  5. PHP and Javascript Combined
    By ds99jove in forum JavaScript Development
    Replies: 1
    Last Post: May 21st, 2001, 05:41 AM

IMN logo majestic logo threadwatch logo seochat tools logo