DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Unable to view source of code rendered by AJAX

  1. #1
    Join Date
    May 2008

    Unable to view source of code rendered by AJAX


    In my jsp page i have defined a div as below :

    <div id="editArea" > </div>

    Using ajax i am rendering an output of another jsp to this div area as :

    document.getElementById("editArea").innerHTML = ajaxObj.responseText;

    This is working fine.

    But page rendered does not show any source code of DIV innerHTML content.
    i.e. when i right click on my browser content area and select view source.
    Nothing gets displayed in <DIV> tag, whereas the output is clearly visible on JSP page.

    Please explain me why.

  2. #2
    Join Date
    May 2008
    I notice the same thing when viewing source (in Firefox) but when looking at the HTML in Firebug, the HTML the page got from Ajax (the innerHTML) is there. Maybe that will point you in the right direction to figure out what's happening. (Evidently the HTML is being put on the page - but View Source may be looking at the initial load or something.)

  3. #3
    Join Date
    May 2008


    when using ajax to append text onto an element it does not create viewable source code. You are not doing anything wrong it simply does not create any viewable source through the normal right click view source method. If you get the firefox developers toolkit you can use that to "view generated source" and see what is actuly going on.
    Home this helps

Similar Threads

  1. Replies: 3
    Last Post: 01-26-2006, 01:29 PM
  2. Java Parser Source code
    By varalakshmi in forum Java
    Replies: 1
    Last Post: 05-27-2005, 12:05 AM
  3. Are Comments a Waste of Time?
    By Glen Kunene in forum Java
    Replies: 25
    Last Post: 04-22-2002, 05:45 PM
  4. Replies: 5
    Last Post: 07-19-2001, 01:46 PM
  5. An Open Source VB?
    By Mark Alexander Bertenshaw in forum Talk to the Editors
    Replies: 20
    Last Post: 07-25-2000, 12:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center