Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    New Coder
    Join Date
    Aug 2011
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool Form submit with-out re-submit on back button?

    Hey CF,

    I'm brand spankin new to the forums. I think I'll get comfortable around here.

    My first question goes something along the lines of this:

    I want to be able to submit a form, and have the page refresh (like a normal form submit) but if the user hits the back button, I don't want it to ask them to resend the post data. I have seen many popular websites do this such as Plentyoffish.com.

    Are these websites just submitting a form using Ajax and then using a javascript re-direct? If so, please explain how I can use ajax to change the url. My understanding of Ajax is quite minimal but I've never managed to make Ajax do anything except send data and then request data, I've never been able to make it control the browser.

    If they aren't using Ajax (hopefully there is a simpler technique) I would love to learn about it.

    Thanks for reading!

  • #2
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'd actually like to figure this one out too. I have a client that gets stuck on this particular problem when pulling stock numbers.

  • #3
    New Coder
    Join Date
    Aug 2011
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by fthomas137 View Post
    I'd actually like to figure this one out too. I have a client that gets stuck on this particular problem when pulling stock numbers.
    I know, you'd think this would be something that would have been commonly address along time ago.

  • #4
    New Coder
    Join Date
    Aug 2011
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by fthomas137 View Post
    I'd actually like to figure this one out too. I have a client that gets stuck on this particular problem when pulling stock numbers.
    Quote Originally Posted by jennis View Post
    [spam]
    I see these forums aren't moderated?
    Last edited by VIPStephan; 08-13-2011 at 11:48 AM. Reason: removed spam link

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts
    Quote Originally Posted by wh333t View Post
    I see these forums aren't moderated?
    They are but it’s weekend and not everybody is around 24/7. That’s why we have the report feature so moderators are notified by e-mail. As with everything on these forums: be patient and you will be helped.

  • #6
    New Coder
    Join Date
    Aug 2011
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by VIPStephan View Post
    They are but it’s weekend and not everybody is around 24/7. That’s why we have the report feature so moderators are notified by e-mail. As with everything on these forums: be patient and you will be helped.
    I understand. I actually hit the report post button after.

  • #7
    New Coder
    Join Date
    Aug 2011
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    * Bump *

    Surely someone has some info to share on this matter.

  • #8
    New Coder
    Join Date
    Aug 2011
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    * Bump *

  • #9
    New Coder
    Join Date
    Aug 2011
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Bump !

  • #10
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,742
    Thanks
    41
    Thanked 191 Times in 190 Posts
    you are not getting answers because this has nothing to do with html/CSS... can you link a site that you have seen this working? then ask for help determining how exactly it is done (ie javascript, server-side (and what language) ) and then we (moreover you) can then PM a moderator to move this thread to the appropriate section of the forum.

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #11
    New Coder
    Join Date
    Aug 2011
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by alykins View Post
    you are not getting answers because this has nothing to do with html/CSS... can you link a site that you have seen this working? then ask for help determining how exactly it is done (ie javascript, server-side (and what language) ) and then we (moreover you) can then PM a moderator to move this thread to the appropriate section of the forum.
    I put it in HTML/CSS at first because I figured it might be an HTML 5 thing. I later thought it must be some kind of Javascript trick but I didn't want to double post (that's a no no on forums right?).

    The website where I've seen it work is Plentyoffish.com The website I'm working on unfortunately I can't show because it's inside the management area, but it's nothing special, just a bunch of forms with regular submit buttons and such.

  • #12
    Regular Coder
    Join Date
    Jan 2009
    Posts
    193
    Thanks
    0
    Thanked 20 Times in 20 Posts
    I am thinking they are using server side code to do a redirect to the same page or a different page after the form has been process to clear out any post/get data.

  • #13
    New Coder
    Join Date
    Aug 2011
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by skywalker2208 View Post
    I am thinking they are using server side code to do a redirect to the same page or a different page after the form has been process to clear out any post/get data.
    Hrmmm, I don't think so. I think this is a client side thing because no amount of Server Side scripting can change the functionality of the browser (not that I'm aware of at least, that sounds like a huge security risk). I'm quite confident it's all done on the client side, but oddly not many people seem to be able to pull this kind of thing off.

    It's quite easy to direct to different pages with serverside scripting, but how does that prevent the browser from re-submitting data when you hit back buttons? All that information and the desire to re-submit the data is part of how the browser functions, to my knowledge at least.

    I appreciate the response anyhow

  • #14
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,742
    Thanks
    41
    Thanked 191 Times in 190 Posts
    Quote Originally Posted by wh333t View Post
    Hrmmm, I don't think so. I think this is a client side thing because no amount of Server Side scripting can change the functionality of the browser (not that I'm aware of at least, that sounds like a huge security risk). I'm quite confident it's all done on the client side, but oddly not many people seem to be able to pull this kind of thing off.

    It's quite easy to direct to different pages with serverside scripting, but how does that prevent the browser from re-submitting data when you hit back buttons? All that information and the desire to re-submit the data is part of how the browser functions, to my knowledge at least.

    I appreciate the response anyhow
    it can be done... and actually is more secure... I can for example make certain xml tags in my config file and when you do some action I can pull that data and store it in my config... now this is even more secure than your cookies or cache or w/e... or i could take it and throw it into a database. client side storage of data is IMO unsafe... serverside is a lot more secure and I bet it is being done that way... now as to what language it is in... there is an extension embedded in the page "index.aspx" which means it is an aspx page and i have no clue what second tier language... Also unfortunately, granted i love this forum, it seems to be a more open source oriented forum and idk if you will get too much help doing so... you may find help figureing it out in the php section but idk much about php... I imagine if you PM Apost or VIP they would move you... if not I have seen Fou (php mod) move many threads; maybe he will. best of luck

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #15
    New Coder
    Join Date
    Aug 2011
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by alykins View Post
    it can be done... and actually is more secure... I can for example make certain xml tags in my config file and when you do some action I can pull that data and store it in my config... now this is even more secure than your cookies or cache or w/e... or i could take it and throw it into a database. client side storage of data is IMO unsafe... serverside is a lot more secure and I bet it is being done that way... now as to what language it is in... there is an extension embedded in the page "index.aspx" which means it is an aspx page and i have no clue what second tier language... Also unfortunately, granted i love this forum, it seems to be a more open source oriented forum and idk if you will get too much help doing so... you may find help figureing it out in the php section but idk much about php... I imagine if you PM Apost or VIP they would move you... if not I have seen Fou (php mod) move many threads; maybe he will. best of luck
    Either I'm misunderstanding you, or you are misunderstanding me.

    How does a server side language prevent the browser from acting the way it's designed too? In this case, prevent the browser from re-submitting form data. I've never witnessed any server side language that could manipulate the default behavior of the browser, if it's possible to do so, that's why I said it seemed like a security risk.

    I don't know much about ASP, it's a Microsoft technology and I've learned to stay away from them.

    I will PM them and see what they can do, thank you for responding.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •