Jump to content

how to start a new page


Adam77

Recommended Posts

hey guys, i hope this is the right place to my question .

 

i have an html page wich contain a section with a form for the user to fill out. now, after the user fill the form he should move to the next form in the same section of the page . the question is, how do i earse the form that already been filled out  and replace it with the next form .

 

i hope it was clear enough .  

 

thanks 

Adam

Link to comment
Share on other sites

Not really enough detail in the question to give a great answer but either submit the form and serve a new page which is easy but takes more computing resources or use Ajax (which is difficult but fast). Post what you have tried for a more specific answer.

Link to comment
Share on other sites

if you don't want to go to a whole new page you could use JQuery to hide the previous form and then show the next one. Then just use Jquery to send all the vars of the forms filled out.

 

JQuery

$(document).ready(function(){
  $("#submit_button").on("click", function(){
      $("#form_2").show();
      $("#form_1").hide();
    });
});

HTML

<div id="form_1">
    <!-- Your Form 1 data here -->
    <div id="submit_button">Go to next form.</div>
</div>

<div id="form_2" style="display: none;">
    <!-- Your Form 2 data here -->
</div>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.