473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Trying to use AjaxRequest Toolbox class

myAjax = new AjaxRequest();

//I am trying to use this as an object, but it gives errors when I try
to call myAjax.get() telling me that it is not a public function

so I try direct method acces:

AjaxRequest.url = newLocation;
AjaxRequest.get(
{
'onSuccess':function(req){ document.getElementById("content") =
newLocation; }
}
);

All I want is to load a <div id=contentasynchronously, with the value
of newLocation (which is a web address)

I do not understand how to use this object 'arg' parameter for this
method.
I do not know what the req is as a function parameter

Sep 14 '06 #1
4 1913
VK

KnighT wrote:
All I want is to load a <div id=contentasynchronously, with the value
of newLocation (which is a web address)
Why not use the documentation?
<http://www.ajaxtoolbox.com/request/documentation.php>

In the particular AjaxRequest.async = true will do the job for you.

Sep 14 '06 #2
I got it to work.

AjaxRequest.url = newLocation;
AjaxRequest.get(
{
'onSuccess':function(req){
document.getElementById("content").innerHTML = req.responseText; }
}
);

I had to reset req.url in the ajaxRequest.js class a few times because
it kept pulling the url from the address bar, or querystring.

Sep 14 '06 #3
KnighT wrote:
AjaxRequest.url = newLocation;
AjaxRequest.get(
{
'onSuccess':function(req){
document.getElementById("content").innerHTML = req.responseText; }
}
);
Instead, pass url as a paramter:

AjaxRequest.get({
'url':newLocation,
'onSuccess':function(req){ ... }
});

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 14 '06 #4
Oh, ok......now I see how to use the parameters. You did a very nice
job on the AjaxRequest class. Thank you Mr.Kruse
Matt Kruse wrote:
KnighT wrote:
AjaxRequest.url = newLocation;
AjaxRequest.get(
{
'onSuccess':function(req){
document.getElementById("content").innerHTML = req.responseText; }
}
);

Instead, pass url as a paramter:

AjaxRequest.get({
'url':newLocation,
'onSuccess':function(req){ ... }
});

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Adam Nowotny | last post by:
I've created library with some "user controls" and they all showed up in the toolbox, so it is easy to drag them to a form in Forms Designer. Now we want to use the controls in our main project...
2
by: Chien Lau | last post by:
I frequently define internal UserControl-derived classes in my WinForms apps: internal class MyUserControl:UserControl{ ... } I'll often need to embed these controls in a Form, whose class...
10
by: Nak | last post by:
Hi there, I'm having problems with the Toolbox in VB.NET 2002 Standard. I have 2 class libraries, 1 contains licensing classes and references nothing but standard namespaces and the other...
4
by: Nadav Popplewell | last post by:
Hi everybody, I've install Visual studio Team Edition for Testers on my computers, And I can't seem to find how to show the toolbox. The documenation says there should be a 'Toolbox' menuitem...
5
by: Jeronimo Bertran | last post by:
Building a web control library using VS2005, the WebCustomControls are automatically added to the toolbox but the CompositeControls are not. Is there a way to make the CompositeControls...
2
by: Mark Collard | last post by:
I've developed a C# Windows Control Library project (using Visual Studio 2003). It contains a public component class and a public control class. When I add a reference to the compiled project dll...
5
by: craigkenisston | last post by:
I created a derived class from "Literal". I put the code in the App_Code folder and the control is working as expected. Now, I wan this control to be in the ToolBox, just like the others, what...
2
by: alberthung01 | last post by:
Hi all, I wrote a component with ComponentDesigner to let users drag and drop it to WebPage from toolbox directly. Just like the behavior of dataAdapter. But it works fine on ASP.NET 1.1 but not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.