Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AJAX - Can I trigger an XMLHTTPREQUEST using onClick() ???

Status
Not open for further replies.

josel

Programmer
Oct 16, 2001
716
0
0
US
Today has been very good. I have successfully completed writing a data grid table and some very nice trickery. I must say, I am very proud of myself. :) and very appreciative of this forum ...

Now, I knew I was going to end-up needing to employ AJAX for the things I have in mind. I have a book I am reading but I guess I cannot wait to find the area where subject of interest might be covered so I will ask the question here.

The data grid has about 9 columns. Some of these columns are icons intended to be used as triggers. Some of the things I want to be able to do are

1) Add
2) Edit
3) Delete
4) Print

I can do all of these without a problem at all. That said, doing them using the methods I have in mind is a different story.

I already have an idea of how to use AJAX to "auto complete" or "suggest" matches while user is typing in a field. The onload() is used within the BODY tag to activate the JavaScript needed to make a server side connection, send and receive data. Using what I've learned so far, I feel that I can get the job done except:

How do I use onClick(...) in lieu of onLoad(...)

I am going start playing around with this and I am posting the question even before I give it try. I do this simply because I am anticipating "challenges" before me and hope to come back this way and find the usual useful hints and suggestions to help me get to the next level.

Regards,


Jose Lerebours


KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
 
Maybe I'm misunderstanding your problem, but surely if all you want to do is stop the AJAX calls "onload", and use them "onclick" of some icons, all you need to do is remove the "onload" call, and move it to be an "onclick" on the relevant icons?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top