Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder ellisd5's Avatar
    Join Date
    Jun 2002
    Location
    Uk
    Posts
    160
    Thanks
    5
    Thanked 0 Times in 0 Posts

    AJAX returning javascript problem

    I have some AJAX code which basically updates a section of the screen with new content.

    This new content contains some javascript in it. The javascript which is return by the ajax request does not work. So my question, is there a way to dynamicly refresh the event handlers or something else maybe to get the javascript returned to work. Not show how javascript works in terms of is it loaded into memoty or soemthing at the start of a page load, but is there a way to like reload the code so my my new Javascript will be picked up?

    I know I could just have the javascript in the page that does the calling but there are 100's of screens it could call and therefore its not practical to do it this way.

    TIA
    Dale
    Dale Ellis
    __________________

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Quote Originally Posted by Ancora View Post
    LOL, and you kicked me off your forums for doing the same thing...

    Oh my!

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Quote Originally Posted by hharchester View Post
    I have some AJAX code which basically updates a section of the screen with new content.

    This new content contains some javascript in it. The javascript which is return by the ajax request does not work. So my question, is there a way to dynamicly refresh the event handlers or something else maybe to get the javascript returned to work. Not show how javascript works in terms of is it loaded into memoty or soemthing at the start of a page load, but is there a way to like reload the code so my my new Javascript will be picked up?

    I know I could just have the javascript in the page that does the calling but there are 100's of screens it could call and therefore its not practical to do it this way.

    TIA
    Dale
    You need to have the JavaScript evaled. I would look at libraries such as prototype.js or dojo which has it built in.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #4
    Regular Coder ellisd5's Avatar
    Join Date
    Jun 2002
    Location
    Uk
    Posts
    160
    Thanks
    5
    Thanked 0 Times in 0 Posts
    OK thanks the link has answered my question.

    Thanks
    Dale
    Dale Ellis
    __________________


  •  

    Posting Permissions

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