Results 1 to 7 of 7

Thread: script to load just the form parts of the page.

  1. #1
    Join Date
    Apr 2007
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default script to load just the form parts of the page.

    Hi,

    i was wondering if there is a script that can re-load just the form parts of my web page. There are other parts of the page, like images, and other navigational items that would not need to re-load.

    What happens is my webpage has a form that when its filled out and submitted, it bring the user back to the same form to re-fill out again. So, I was wondering if there was a way to have the form re-load and the other parts not reload.

    Either that or the page never reloads, when the user hits the submit button, sends the data without actually leaving the page, then the form is blank again. Maybe a thank you text appears at the bottom. Does that make any sense?

    Thanks,
    Josh

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    the obvious question here is why the double submit?
    if you jsut want to send to 2 different places you can create a function to submit the form to 2 places..
    forcing someone to enter their data in 2 times is confusing and would be very frustrating for the user

  3. #3
    Join Date
    Apr 2007
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    o, its not like that. Its a form for a Database system. When the user fills out the form, they get the file they want, then they need to re-fill it out for the next file they want. Does that make sense?

    Thanks,
    Josh

  4. #4
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    you can create a session variable, so the user would only need to input his / her information once per browser session (from the time a browser is opened to the time the browser is closed). upon submission you write the values to the session, and you attempt to get the values from the session upon returning to the form.

    the other option is one that would allow you to transfer between session. you can write a cookie to the person's machine. if you checked "remember me" here on this site, that would be an example as you can open a new session and you would be logged in automatically.... you need to be careful with this though, because they can be abused by malicious users, so the only thing you should store in a cookie is a reference of a reference. what I mean by that is a unique identifier variable or number that is then processed on your server to grab the needed information, which is stored in the database.


    now one thing to note on this is that if the only thing you are changing is the "file input" you really do not / should not do any of this, but rather you should create a button that would dynamically create a new "file input" and after everything has been submitted, the processing would just loop through all of the set file inputs and print out an error / success for the files

  5. #5
    Join Date
    Apr 2007
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    OK, im not sure if my request makes sense then. On some sites, there are drop down menus that when each option of them is selected it loads the options info. But it just loads the info, and not the rest of the page. So, i was wondering if there was something similar that would allow me to send the form info to the regular form script, but at the same time reload the form part of the page and not the rest. (I would put the form part in its own div tag). Does that make more sense?

    thanks,
    Josh

  6. #6
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Looking for this?
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  7. #7
    Join Date
    Apr 2007
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi,

    thats really close, but the user wont be clicking on anything. The form is not really something the user fills out. It is used to display info from a CGI script and the forms on the page is updated every second, the problem is the browser refreshes, so I was looking for something that can load the info from the cgi script but not blank the page.

    Sorry, i know its not what i described now, it changed slightly. I guess i just dont want the browser to have to refresh.

    Thanks,
    Josh

Bookmarks

Posting Permissions

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