|
Prev: still hoping for a little help!
Next: Appending Events
From: nobody on 5 May 2008 22:32 On Mon, 05 May 2008 21:12:46 -0400, sheldonlg <sheldonlg> wrote: >Dr J R Stockton wrote: >> In comp.lang.javascript message <-5KdnXsg_YpthYLVnZ2dnUVZ_hudnZ2d(a)gigane >> ws.com>, Mon, 5 May 2008 10:25:28, sheldonlg <sheldonlg@?.?.invalid> >> posted: >>> Thank you for your suggestion. When I made that change, all hell broke >>> loose in the rendering of the table. Investigating, I found that my >>> error had nothing to do with this problem. There was an <input >>> type="hidden"> in the table. I had failed to close that with the " >>> />". Apparently, Firefox was smart to enough to say "Dummy, you forgot >>> to close this so I will do it for you", and rendered the table as I >>> wanted it. When I fixed the error, IE also displayed properly and >>> without a JS error. >> >> Restore the error, then see what W3's downloadable TIDY (used as a >> checker) and also an on-line tester say about it. I predict that you >> will then form the habit of using them. >> >> <FAQENTRY> Section 2.3. >> Add something on the desirability of verifying HTML before worrying >> about what the script seems to do; particularly before posting. >> > >I wish I could do that. However, if I do a "view source", all I see is >the template. This is on an AJAX foundation using php to write the >html. From what I have researched on the web, the validator can't be >used with php, let alone html that is written at run time via AJAX. > >If I am wrong, them please enlighten me. I would love to check for >errors by validations. As it is, I found this by taking my code and >cutting and pasting into a dreamweaver window and then manually >indenting and examining it line by line. (I just indented the print >statements as I would have done for the tage). Ever tried to use MS VS.NET for debugging JS? Try it, and you'll never want to use anything else. Even the obsolete 7.0 (.NET FW 1.0) that can be had for next to nothing does the job (or in case you don't care about Bill Gates' profit, just eMule it). Firefox script debugger next to it is like Hyundai next to BMW. And to see dynamically built object html, try entering into IE address bar javascript:alert(document.getElementById('some id').innerHTML); Works with FF, too. NNN
From: sheldonlg on 6 May 2008 07:54
nobody(a)nowhere.net wrote: > And to see dynamically built object html, try entering into IE address > bar javascript:alert(document.getElementById('some id').innerHTML); > Works with FF, too. Thanks. That was [almost] great. The "almost" is because I can't cut and paste it. If I could do the cut and paste, I could either (a) format it nicely to see where I may have made a mistake or (b) put it into a separate html file that I could then validate and have W3C do that work for me. Is there a variant that would allow me to do that. BTW, IE changes things slightly. It removes the quotes around things like class="thisclass" whereas FF doesn't. However, the formatting in IE is somewhat better in starting new lines. |