SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Dec 2004
    Location
    netherlands
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    redirect to PHP ?

    Hi All,
    Newbie as I am..
    How do I redirect from js csript to a .php page ??
    Tried this but doesn't work..
    Thanks in advance !
    Code:
    slideMenu.makeMenu('sub','Level A','<?php ../OKP/KlassementOKP_A.php ?>')

  2. #2
    SitePoint Member
    Join Date
    Nov 2004
    Location
    Grand Rapids
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What exactly are you trying to do? If you're trying to redirect a user to a PHP page based on a selection in a menu (or similar) you can do that just as you would to any other page.

    If you want to include the results of a PHP operation in your javascript you have a slightly more complex task on your hands. I'd expand on that, but it doesn't look like that's what you want to do.

  3. #3
    SitePoint Addict
    Join Date
    Dec 2004
    Location
    netherlands
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi James,
    You got it right.. this is from a menuscript and I would like to include the results from that page displayed..
    Now it opens the page but I see the actual phpcode in it...
    Thanks again for helping out !!

  4. #4
    SitePoint Member
    Join Date
    Nov 2004
    Location
    Grand Rapids
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're redirecting properly and the PHP code is showing up then you have a problem with your server configuration rather than your javascript.

    Does your file have a relevant extension such as .php and is all the code enclosed within <?php ?> tags? Do other php files work when loaded directly (by typing the URL into the browser)?

  5. #5
    SitePoint Addict
    Join Date
    Dec 2004
    Location
    netherlands
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Feel a bit dumb here..
    this code works actually:
    HTML Code:
    slideMenu.makeMenu('sub','Level A','../OKP/KlassementOKP_A.php')
    Sorry for not looking further..
    Best wishes for 2005 !


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •