wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Question on using Ajax.Updater Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Question on using Ajax.Updater" Watch "Question on using Ajax.Updater" New topic
Author

Question on using Ajax.Updater

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 386

I am new to ajax. I just downloaded prototype. Ultimately what I'm trying to do is be able to update one jsp page with an html form which I am understanding ajax can do(?).

Here is a test page I came up with but when I click the getHTML button it is NOT loading the html form. Any direction or help would be greatly appreciated.

Here is my test page:



[ February 25, 2008: Message edited by: Melinda Savoy ]
[ February 25, 2008: Message edited by: Melinda Savoy ]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Nothing is happening at all? Do you mean you just aren't getting the results in the placeholder div? Or do you mean the request isn't being sent? If you are using Firefox (and you should be) then you should install the Firebug extension so that you can more easily debug these kinds of issues. You will be able to view the request and the response sent/received for all the ajax requests.

Also, it has much better JavaScript debugging support so if you are getting general JavaScript errors Firebug will tell you about them.


GenRocket - Experts at Building Test Data
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61084
    
  66

Do you really not use indentation in you code?

Do you get the expected display when you hit http://localhost:8080/StripesWebApp/createStockStep3ManualEntry.htm directly with the broswer?

And, why are you using an absolute URL? You should be specifying /StripesWebApp/createStockStep3ManualEntry.htm


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 386

Gregg, thanks for the reply. I am not getting anything when I click the getHTML button.

I will setup firebug in my firefox browser and see what errors are occurring but I'm not getting any javascript errors at all.

Thanks so much for the help and direction.

Regards.
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 386

Bear,

In response to your questions:

Do you really not use indentation in you code? I do normally use indentation.

Do you get the expected display when you hit http://localhost:8080/StripesWebApp/createStockStep3ManualEntry.htm directly with the broswer? No, that is the reason for this post.

And, why are you using an absolute URL? You should be specifying /StripesWebApp/createStockStep3ManualEntry.htm -- this was template that I was using from an example of a tutorial page. All I did was insert my pages to display.

When I turned on firebug within firefox, I saw nothing being displayed at all when I clicked the GetHTML button.

Any suggestions? Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61084
    
  66

Originally posted by Melinda Savoy:
I do normally use indentation.
You should be sure to post properly indented code. Hard-to-read code elicits much fewer responses than easily-read code.

No, that is the reason for this post.
Well, then the problem is with the URL, not with Ajax.Updater. Until the URL works from the browser, it won't work with Ajax either.
 
wood burning stoves
 
subject: Question on using Ajax.Updater