Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-05-2006, 05:18 PM   PM User | #1
ellisd5
Regular Coder

 
ellisd5's Avatar
 
Join Date: Jun 2002
Location: Uk
Posts: 160
Thanks: 5
Thanked 0 Times in 0 Posts
ellisd5 is an unknown quantity at this point
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
__________________
ellisd5 is offline   Reply With Quote
Old 12-05-2006, 05:57 PM   PM User | #2
A1ien51
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
A1ien51 will become famous soon enough
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]
A1ien51 is offline   Reply With Quote
Old 12-05-2006, 06:01 PM   PM User | #3
A1ien51
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
A1ien51 will become famous soon enough
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]
A1ien51 is offline   Reply With Quote
Old 12-06-2006, 11:01 AM   PM User | #4
ellisd5
Regular Coder

 
ellisd5's Avatar
 
Join Date: Jun 2002
Location: Uk
Posts: 160
Thanks: 5
Thanked 0 Times in 0 Posts
ellisd5 is an unknown quantity at this point
OK thanks the link has answered my question.

Thanks
Dale
__________________
Dale Ellis
__________________
ellisd5 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:07 AM.


Advertisement
Log in to turn off these ads.