'Trick' to see AJAX-adjusted HTML on the client side?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scubak1w1
    New Member
    • Feb 2008
    • 53

    #1

    'Trick' to see AJAX-adjusted HTML on the client side?

    Hello,

    Is there a 'trick'/technique to see what the code on a page looks like on the client side after AJAX adjusts part of it?

    (for the example I had in mind, as the user selects items from <select>s on a form and AJAX adjusts the available <option>s in the next <select> based on the user's selection... and I would like to see what the HTML looks like - especially related to the <input> tag - related to another post)

    That is, if you 'view source' in the browser you seem to see just the original page as 'sent' by the web server... even if you do so after the page has been adjusted by AJAX client-side...

    Newbie alert BTW! :-)

    Regards & TIA,
    GREG...
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    just use firefox/mozilla's DOM-inspector or the firebug extension where you may explore the current dom-tree of a document ...

    kind regards

    Comment

    • hsriat
      Recognized Expert Top Contributor
      • Jan 2008
      • 1653

      #3
      Find the add-on for the Firefox here.
      You may find it useful for other things too.

      Regards

      Comment

      • scubak1w1
        New Member
        • Feb 2008
        • 53

        #4
        sorry about the delay in replying, some fires and all that!

        thank you gentleman for the suggestion/s... off to explore those now...

        Regards,
        GREG...

        Comment

        • mmurph211
          New Member
          • Jan 2008
          • 13

          #5
          This'll work in any major browser:

          ---------------------------------------------------------------------------------------
          [HTML]<style type="text/css">
          textarea#doc_so urce {
          position:fixed; z-index:1000; bottom:10px; right:20px; width:600px; height:300px; display:none; overflow:scroll ;
          }

          input#doc_butto n {
          position:fixed; z-index:1000; top:10px; right:20px; width:120px;
          }
          </style>

          <!--[if lte IE 6]>
          <style type="text/css">
          textarea#doc_so urce {
          position: absolute;
          }

          input#doc_butto n {
          position: absolute;
          }
          </style>
          <![endif]-->

          <textarea id="doc_source " onblur="this.st yle.display='no ne';">
          </textarea>

          <input
          id="doc_button "
          type="button" onclick="docume nt.getElementBy Id('doc_source' ).style.display ='block'; document.getEle mentById('doc_s ource').value=' '; document.getEle mentById('doc_s ource').value=d ocument.documen tElement.innerH TML; document.getEle mentById('doc_s ource').focus() ;"
          value="View Source" />[/HTML]
          ---------------------------------------------------------------------------------------

          Just paste it in whenever you need it.
          Discover seamless mobile betting experience and top-tier app performance with 10CRIC in India, unlocking fast bets, secure transactions, and live sports action
          Last edited by gits; Apr 8 '08, 07:00 AM. Reason: remember to use CODE TAGS!!!!

          Comment

          Working...