Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Ajax
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 21st, 2006, 01:27 AM
Registered User
 
Join Date: Sep 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ajax and javascript loading

Hello,
I'm using Ajax to load javascript functions and also HTML. In this HTML there is event like onkeyup that use the javascript function loaded. The code is added with an innerHTML = responseText.

When I don't use the Ajax loading everything works fine. I have read the Ajax pattern Javascript on Demand and then use an eval method. But still, I don't understand why it doesn't work.
I am looking for a simple example that works.

Those Javascript methods use the DOM to access the new loaded HTML code.
I wonder if it would be better to use responseXML to add the HTML code with another method instead of innerHTML.

About eval, how should I register my new functions ?
I've written self.myfuncname = function (myparam1, myparam2) {mycode here;}
is it OK ?

Then in my HTML code how do I use it ? onkeyup="myfuncname(param1,param2)" is it OK.

Thanks,



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax- loading content spacecraft Ajax 2 May 3rd, 2007 06:29 AM
Loading Javascript in Flashmovie marcakesson Flash (all versions) 2 February 19th, 2007 01:47 PM
javascript popup keeps loading Dj Kat Javascript How-To 2 January 3rd, 2006 10:22 AM
dynamically loading table using javascript bkalyanchakri Javascript How-To 1 November 1st, 2005 07:21 AM
Navigate XML when loading with Javascript. awetch XML 1 February 24th, 2005 03:56 AM



All times are GMT -4. The time now is 04:59 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.