Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding refreshing a JSP page

 
Sharmeela Manivannan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im designing a shopping cart.in that when add to cart is clicked..if not logged previously..login form is given in javascript window.after the login is successful,the shopping page they are currently in should refreshed..with session value of the user..but the contents of the apge should be retained...
 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From a use-case point of view, generally you would not need to login to add items to your shopping basket - only when you are checking out.

Relying on JavaScript to log people in is a bad idea, for reasons of browser compatabilities and the fact that some people disable JavaScript
 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you insist on using javascript, I'd recommend using either hidden iframes or Ajax (preferable, but some compatibility issues) to get data from the server without reloading the entire page. Look in the HTML/Javascript forum for more info.

-Yuriy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic