Jump to content

BrunetteCP

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by BrunetteCP

  1. Hi, I have a main page that contains a menu and a "div" named "div1". when I click my menu (ie: Menu 1 or Menu 2) I want to load my page into my div.So this is the result i want to have:- Click on the menu "Menu 1" = load the page "Menu1.html" in my div named "div1" in my page and fill a form.- Click on the menu "Menu 2" = load the page "Menu2.html" in my div named "div1" in my page and I fill another form this work fine . my problem is: when i make transition from menu2 to menu1 i lose all my data in the form i had filled. My question : how to do to prevent losing my form`s data.Thank you! My CODE: -------------- <!DOCTYPE html><html><head><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script><script>function Myload(ref) {$(document).ready(function(){$("a").click(function(){$("#div1").load(ref);});});}</script></head><body><div class="divCenter" id="div1"><h2> This Text</h2></div><a href="#" onClick="Myload('Menu1.html')" > Menu 1 </a> <br><a href="#" onClick="Myload('Menu2.html')" > Menu 2 </a></body></html>
×
×
  • Create New...