Author |
Topic |
SamC
White Water Yakist
3467 Posts |
Posted - 2006-04-12 : 17:03:00
|
Ajax brings a whole new level of JavaScript usage to page rendering. When a page containing an Ajax datagrid is run through an HTML validator (like W3C's), the static HTML and the static JavaScript are validated, but not the JavaScript-generated HTML. Only the browser "sees" that code.Is it possible to capture the JavaScript-rendered HTML and run that (along with the static HTML) through a validator? |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-04-12 : 17:11:30
|
send the rendered html to the validator when you click on the button...document.innerHTML or something...Go with the flow & have fun! Else fight the flow Blog thingie: [URL="http://weblogs.sqlteam.com/mladenp"] |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2006-04-12 : 17:18:40
|
I don't know for sure, but I'd wager a month's pay that innerHTML returns the static JavaScript, not the code rendered by the executed JavaScript.Did I really wager that? It's a joke! Really! |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2006-04-12 : 20:40:05
|
Nope, document.innerHTML grabs the "current state" of the rendered page. That's how I test all of my dynamic client side code.Try it, and then send me your paycheck. :)If you'd like me to make you a sample, I can probably do that for ya.Michael<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda>Opinions expressed in this post are not necessarily those of TeleVox Software, inc. All information is provided "AS IS" with no warranties and confers no rights. |
|
|
DustinMichaels
Constraint Violating Yak Guru
464 Posts |
Posted - 2006-04-12 : 21:20:48
|
I would recommend downloading the web accessibility toolbar (google those exact words). One of the things that it has is the ability to view the exact source code of the page which will capture stuff created or deleted with JavaScript. |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-13 : 02:28:23
|
MS have got a developers toolbar too - sorry, not at work and the link is there. I'll dig it out later if I remember, or someone tickles this thread! It has a bunch of stuff for examining the DOM etc., might have something useful for this job too.But a button to post the innerHTML to W3C sounds like an excellent idea!Kristen |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-04-13 : 05:01:15
|
michael... we split that check! Go with the flow & have fun! Else fight the flow Blog thingie: [URL="http://weblogs.sqlteam.com/mladenp"] |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-13 : 05:05:07
|
Internet Explorer Developer Toolbar : http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en |
|
|
SamC
White Water Yakist
3467 Posts |
|
|