problem in javascript using php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sravani1
    Banned
    New Member
    • Mar 2008
    • 10

    #1

    problem in javascript using php

    hi,

    the below line will not work properly.please tell that what i did the mistake in that code.
    [php]echo "<td><A HREF='javascrip t:pick(" . $row['first_name']
    . ")'>" . $row['first_name'] . "</A></td>";[/php]
    Last edited by ronverdonk; Mar 25 '08, 11:23 AM. Reason: code tags!
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Please enclose your posted code in [code] tags (See How to Ask a Question).

    This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

    Please use [code] tags in future.

    MODERATOR

    Comment

    • hsriat
      Recognized Expert Top Contributor
      • Jan 2008
      • 1653

      #3
      [php]echo "<td><a href=\"javascri pt:pick('". $row['first_name']."')\">".$ro w['first_name']."</a></td>";[/php]

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        Originally posted by sravani1
        hi,

        the below line will not work properly.please tell that what i did the mistake in that code.
        [php]echo "<td><A HREF='javascrip t:pick(" . $row['first_name']
        . ")'>" . $row['first_name'] . "</A></td>";[/php]
        What do you mean by ...'not work properly...'. Does it return an error? Does it not execute? Only thing I can see is that the first_name is not enclosed within quotation marks.

        Ronald

        Comment

        Working...