Sheets Posted June 17, 2012 Share Posted June 17, 2012 I have a button that updates a field when it reloads the page however i would like it to run a function to store a value then update the field without reloading the page. Thank you for your time Quote Link to comment https://forums.phpfreaks.com/topic/264321-how-should-i-do-thisnoob/ Share on other sites More sharing options...
trq Posted June 17, 2012 Share Posted June 17, 2012 Ajax. Google it. Quote Link to comment https://forums.phpfreaks.com/topic/264321-how-should-i-do-thisnoob/#findComment-1354571 Share on other sites More sharing options...
Sheets Posted June 17, 2012 Author Share Posted June 17, 2012 Ajax. Google it. I did and it makes no sense to me what so ever help noobs Quote Link to comment https://forums.phpfreaks.com/topic/264321-how-should-i-do-thisnoob/#findComment-1354664 Share on other sites More sharing options...
ZulfadlyAshBurn Posted June 17, 2012 Share Posted June 17, 2012 You would need the fundamental basic of javascript. It's also best if you learn jQuery which would help a lot in ajax and javascript stuffs. Quote Link to comment https://forums.phpfreaks.com/topic/264321-how-should-i-do-thisnoob/#findComment-1354674 Share on other sites More sharing options...
coded4u Posted September 21, 2012 Share Posted September 21, 2012 Use Ajax new XMLHttpRequest(); As for the content being updated you can use new XMLHttpRequest(). responseText to return the update. Quote Link to comment https://forums.phpfreaks.com/topic/264321-how-should-i-do-thisnoob/#findComment-1379776 Share on other sites More sharing options...
Christian F. Posted September 21, 2012 Share Posted September 21, 2012 Do what ZulfadlyAshBurn said, and learn/use jQuery for this. It alleviates a LOT of the manual work and browser incompatibilities surrounding AJAX. Doing it manually, as C4U said, is not a good idea for production. One thing to do it manually to learn how AJAX works, another thing to waste the time and effort which should be spent on other things, when putting it into a production system. Quote Link to comment https://forums.phpfreaks.com/topic/264321-how-should-i-do-thisnoob/#findComment-1379811 Share on other sites More sharing options...
Adam Posted September 21, 2012 Share Posted September 21, 2012 I think he may have sussed it after 3 months Quote Link to comment https://forums.phpfreaks.com/topic/264321-how-should-i-do-thisnoob/#findComment-1379817 Share on other sites More sharing options...
Christian F. Posted September 21, 2012 Share Posted September 21, 2012 *Sighs* I hate it when people necro threads... Quote Link to comment https://forums.phpfreaks.com/topic/264321-how-should-i-do-thisnoob/#findComment-1379888 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.