#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    entlegen
    Posts
    442
    Rep Power
    13

    does not execute javascript in php


    PHP Code:
    <?php
    $q_refno1
    ="22022";
    echo 
    "length: "strlen($q_refno1);
    if (
    strlen($q_refno1 <> ))
    {
    //echo "Jobrefno: ", $q_refno1;
    echo "<SCRIPT LANGUAGE='JavaScript' src='display-title2.php?jobrefno=$q_refno1'>";
    echo 
    "</SCRIPT>";
    //echo "Jobrefno:", $q_refno1;
    return;
    }

    ?>

    why it can't execute the js script?
    Last edited by pentium5; January 6th, 2002 at 04:27 AM.
    regards,

    wish to use AT 89c51 single chip computer to do remote sensing and send the data back from woods to office via nokie 3330 and internet. HOW?
    first I must revise C program thro' example, what's next?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    16
    if (strlen($q_refno1 <> 0 ))

    needs to be

    if (strlen($q_refno1) != 0 )

    Other then that, its up to the client's browser to execute the javascript. Put in those forums for answers on that.
    Jon Coulter
    ledjon@ledjon.com
  4. #3
  5. phpkid ~~~~~~ :o)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Nov 2000
    Location
    NJ, USA
    Posts
    2,534
    Rep Power
    17
    This would give you error right ?

    What you are trying to do here, is put up php script's out put at javascrpt source and you are writing some crap [ 'ssss' ] between<script> and </script> tags. How that would work ?

    I think you need to rethink upon all this.
    Yours is totally wrong way.

    JD
    _____________________________
    d.k.jariwala (JD)
    ~ simple thought, simple act ~
    I blog @ http://jdk.phpkid.org
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    entlegen
    Posts
    442
    Rep Power
    13
    I take away 'aaaa' are for testing, u know this help to know what whether it passes all the steps after the condition-if.

    <> are samewith != and try this too.

    it still does not do the js since I have read through the text if I can't solve header and include problem with passing parameters.

    please help!!!!
    Last edited by pentium5; January 6th, 2002 at 04:40 AM.
    regards,

    wish to use AT 89c51 single chip computer to do remote sensing and send the data back from woods to office via nokie 3330 and internet. HOW?
    first I must revise C program thro' example, what's next?
  8. #5
  9. phpkid ~~~~~~ :o)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Nov 2000
    Location
    NJ, USA
    Posts
    2,534
    Rep Power
    17
    Is the code from display-title2.php ?

    Then its sure that this wont work.

    JD
    _____________________________
    d.k.jariwala (JD)
    ~ simple thought, simple act ~
    I blog @ http://jdk.phpkid.org
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    entlegen
    Posts
    442
    Rep Power
    13
    please explain why it won't work.
    Last edited by pentium5; January 6th, 2002 at 04:45 AM.
    regards,

    wish to use AT 89c51 single chip computer to do remote sensing and send the data back from woods to office via nokie 3330 and internet. HOW?
    first I must revise C program thro' example, what's next?

IMN logo majestic logo threadwatch logo seochat tools logo