CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2011

    PHP to Javascript

    Hey all,

    I am stuck with trying to make javascript code do the same function as a php code;

    I have a test page, which a client chooses answers in a radio button, the answer, dependent on the result shows a certain picture,

    I have this working with StressTest.html & Results.php as included in the attached zip, I have tried the html results, but struggling to get a code similar to work, that does the same thing.

    Could someone please help me :-)
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2001
    Sunny South Africa

    Re: PHP to Javascript

    I wonder why this is the latest trend in scripting.... Everyone seems to forget the distinction between JavaScript ( Clinet side language ) and PHP ( Server side language ).

    In my opinion, when you have to "convert" code to JavaScript from PHP, it is :

    1) Bad planning and design
    2) Completely and utterly unecessary
    3) Senseless.

    Make your PHP code as such, that JavaScript an access objects from it as well - a common way of doing this is through the URL string manipulation and hidden HTML Form fileds.

  3. #3
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002

    Re: PHP to Javascript

    [ moved thread ]
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.