View Full Version : Edit Post
CoffeeRain
January 12th, 2012, 03:45 PM
Hello! I have noticed that when the "Edit Post" button is clicked on this forum, it is linked to "editpost.php," but it stays on the same page and just adds a box to edit your post. How does this work? I would like to implement this on my website, but I can't figure it out. Thanks! :)
Bachstelze
January 12th, 2012, 06:19 PM
Probably some Javascript magic.
CoffeeRain
January 12th, 2012, 06:22 PM
That certainly clears things up! :) Would I just use the innerhtml=newhtmlcode to do this?
dazman19
January 12th, 2012, 07:29 PM
its possible that field is hidden and just displayed when you click the button.
but what you may want to learn about is ajax.
http://www.w3schools.com/ajax/default.asp
This will allow you to create post/get requests and output their responses to certain parts of your page.
CoffeeRain
January 12th, 2012, 08:55 PM
I'm thinking that just writing a form that gets displayed on the click might work. Thanks for the ideas. :)
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.