Avoid form refreshing(Html)?

  • lucyaurora
  • Born
  • Born
  • No Avatar
  • Joined: Dec 11, 2011
  • Posts: 1
  • Status: Offline

Post December 11th, 2011, 8:13 pm

I'm developing carousel type webpage on each page I put some controls user want to select that page and post their comments, here all controls are working fine but the problem is due to carousel type while submitting the form the whole page refreshed and home page is displayed but I want after submit page should not refresh or user should stay on that page.

Note: I'm using Html and Php so vale should pass to php page to validate
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post December 11th, 2011, 8:13 pm

  • Hob Bramble
  • Proficient
  • Proficient
  • User avatar
  • Joined: Jan 21, 2004
  • Posts: 351
  • Loc: Indiana, USA
  • Status: Offline

Post December 15th, 2011, 5:37 pm

I want to be sure I'm understanding properly: what you're attempting to do is allow the user to submit a form without the POST method refreshing the page, correct?

If so, I think the simplest solution would be to use a little AJAX in place of the standard HTML form submit markup - without getting into too much detail, there's a pretty solid tutorial here that should give you a basic idea of how to do it: http://www.openjs.com/articles/ajax_xmlhttp_using_post.php - Using POST method in XMLHTTPRequest(Ajax)

Hopefully that helps.
-Patrick J. B. Simmons | @hobbramble
"If I could give you one piece of advice to remember for the rest of your life, it would be this: when Patrick tells you to do something, do the opposite." - Nolan Ladewski
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post December 19th, 2011, 10:45 pm

What is the method and action of that form?
"Bring forth therefore fruits meet for repentance:" Matthew 3:8

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 129 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.