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.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Saving Dynamic Page

    Hi..Friends.. Am in confusion to creating html page.
    I have a 2 fields in my form and I have added another text box by clicking add button.
    Text Box appears. Now totally 3 fields are there in a form..
    And Now I need to save this page with 3 fields as Reg.html
    How can I do it??????????????
    Anybody Plz help me out!!!!!!

  • #2
    Regular Coder
    Join Date
    Mar 2008
    Location
    London
    Posts
    152
    Thanks
    4
    Thanked 42 Times in 42 Posts
    Browser "view source" or "save web page" does not preserve dynamically created DOM objects. For that use below given function, which will open a new window with all the source code including dynamically created DOM objects -

    Code:
    function viewSource()
    {
      var win     = window.open('','_blank');
      var results = document.documentElement.innerHTML;
      var match = "<";
      var re = new RegExp("<", "g");
      var newresults = results.replace(re, "&lt;");
      win.document.write('<pre>' +newresults+'</pre>' );
    }


  •  

    Posting Permissions

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