javascript - Return to the previous page with inputs -


really unsure title question. feel free suggest. :)

hi guys! created simple code, represent web.

here home page:

<html>    <script type="text/javascript">     function getpage(linkpage,variables,divname){     $.get(linkpage + "?" + variables,function(data){$(divname).html(data);});                 }      function show(){               //functionname("path","data","idname");                getpage("ajaxpages/hi.php","","#container");             }     </script>     <body>     <div id="container">           first name<input type="text" />         <input type="button" value="next" onclick="show();"/>     </div> </body> </html>  

basically, ask information, name example. when button next click call javascript function call page or next page load on div id container.

next page

on next page, ask question, last name example. then, want go previous page make same changes.

here code:

<script type="text/javascript">         function show(){             ajaxgetdata("index.php","","#container1");     } </script> <div id="container"> last name<input type="text" /> make changes on previous page?<input type="button" value="back" onclick="show();"/> </div> 

when button clicked, call previous page, not include text input on textbox.

i know happens because call page..

is there way? when button clicked, reload previous page, contents/inputs.

:) :( :'( :/ :|

  • don't load additional pages. ajax.
  • if don't want, server-side script may :d

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -