• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question on using Ajax.Updater

 
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic