• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on using Ajax.Updater

 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic