Creating an Ajax.Updater - do I have to start the request?

I realize this is a Prototype question, but I figure somebody here knows the answer.

I want to make a simple HTTP request using Javascript and spit the results out onto my page. So I made an Ajax.Updater like this:

new Ajax.Updater("view_frame", "http://localhost:3000", {asynchronous:false, evalScripts:true, method:'get'});

I've got a div whose id is view_frame, so I *think* that this should make a request and then update view_frame's innerHTML to whatever the webserver renders. However looking at the logs no request is made at all. No Javascript errors. What do I need to do in order to make the request happen?

Pat

Your javascript looks fine except you need to provide the full path to the action you want executed.

http://localhost:3000/controller/action

If the action is an RJS template then you may not need to specify view_frame as the target just use {} instead. If it is an rhtml template then all you need is to tell it what action to invoke. You do not need to start the action, it will make the request itself as part of the object creation with "new".

Michael

http://localhost:3000/ is where I want the call to do. Basically I want the same behavior as an iframe...but I want to embed the HTML directly into the page rather than using an iframe. I thought that's what this Updater is supposed to do - make an HTTP request and update some div with the results. Why is it not even making the request?

Pat

I was reading the HTML file off my desktop, and using it to fetch a page from the Rails server. When I served up the HTML file from mongrel, it did it fine. It would have been nice if Updater had given an error instead of just not responding...

So is it possible at all to do what I want? I need the HTTP request go to a different domain than the web page being served up.

Pat