Calling Javascript Function from file loaded using Ajax

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • goodamr
    New Member
    • Jun 2007
    • 24

    Calling Javascript Function from file loaded using Ajax

    Dear All,

    I'm loading php file called details.php into my main webpage called main.php using Ajax.

    The loaded php file (details.php) contains a link. When clicking it, it calls a javascript function.

    Code:
    <a onClick="call_function();">
    This function body exists in the main webpage (main.php):

    When I click the link, the page shows this error:
    Code:
    Error: 'FLD' is undefined
    and there is no varaible called FLD in my code.

    I searched the net and many people say that I should use EVAL function.

    Code:
    <a onClick="EVA(call_function());">
    but, also it dosen't work.

    Could you please help me?

    Thanks alot.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    When I click the link, the page shows this error:

    Error: 'FLD' is undefined

    and there is no varaible called FLD in my code.
    the error surely points to a line in your code throwing that error. 'FLD' is supposed to be there.

    Comment

    • goodamr
      New Member
      • Jun 2007
      • 24

      #3
      Thanks Dormilich for replying.

      FLD dosen't exist in the whole both pages.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Let's see the code.

        Comment

        Working...