473,320 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

shorttags

I am trying to debug an application that is an intranet app behind a
firewall accessible only via vpn. The problem I am having is that the
tables sorting is now working properly in Firefox 2.

Doing a "view source" only yields the template, as the the page is
written as a response back from an AJAX call. So, I went to internet
explorer and did a javascript:document.write(mainwapper.innerHTML). My
intent was to build a page that was close to what the actual page was by
doing a "view page" from there and cutting and pasting.

The problem with this procedure is that it converts things like id="foo"
to id=foo. Doing a validation with W3C then yields tons of errors
stating that SHORTTAGS YES needs to be there. Researching how to put it
in gave me to info to change the doctype. I don't want to do that, as I
want to keep it "strict" and XHTML.

How can I get the writing to not strip off the surrounding quotes?

While we are at it, --- and this may sound simple ---, W3C validation
with "strict" complains about align="center" for <td>, and about other
attributes. How can I write these to accomplish the centering and still
be compliant with the "strict"?
Jul 23 '08 #1
23 1131
sheldonlg wrote:
I am trying to debug an application that is an intranet app behind a
firewall accessible only via vpn. The problem I am having is that the
tables sorting is now working properly in Firefox 2.

Doing a "view source" only yields the template, as the the page is
written as a response back from an AJAX call. So, I went to internet
explorer and did a javascript:document.write(mainwapper.innerHTML). My
intent was to build a page that was close to what the actual page was by
doing a "view page" from there and cutting and pasting.

The problem with this procedure is that it converts things like id="foo"
to id=foo. Doing a validation with W3C then yields tons of errors
stating that SHORTTAGS YES needs to be there. Researching how to put it
in gave me to info to change the doctype. I don't want to do that, as I
want to keep it "strict" and XHTML.

How can I get the writing to not strip off the surrounding quotes?
Did you consider getting the Developer Toolbar extension for Firefox? It
has a view generated source function. You can then run that through the
W3C validator.
>
While we are at it, --- and this may sound simple ---, W3C validation
with "strict" complains about align="center" for <td>, and about other
attributes. How can I write these to accomplish the centering and still
be compliant with the "strict"?
I don't know if align is removed in XHTML, but try setting it in the
stylesheets instead. HTML shouldn't be used for presentation.

--
Morten 'T-Hawk' Holt
In the joy of anticipation there's the anticipatory
letdown of anticipating not anticipating anticipation
of some future anticipation.
Jul 23 '08 #2
Morten Holt wrote:
sheldonlg wrote:
>I am trying to debug an application that is an intranet app behind a
firewall accessible only via vpn. The problem I am having is that the
tables sorting is now working properly in Firefox 2.

Doing a "view source" only yields the template, as the the page is
written as a response back from an AJAX call. So, I went to internet
explorer and did a javascript:document.write(mainwapper.innerHTML).
My intent was to build a page that was close to what the actual page
was by doing a "view page" from there and cutting and pasting.

The problem with this procedure is that it converts things like
id="foo" to id=foo. Doing a validation with W3C then yields tons of
errors stating that SHORTTAGS YES needs to be there. Researching how
to put it in gave me to info to change the doctype. I don't want to
do that, as I want to keep it "strict" and XHTML.

How can I get the writing to not strip off the surrounding quotes?
Did you consider getting the Developer Toolbar extension for Firefox? It
has a view generated source function. You can then run that through the
W3C validator.
I have that, but it does other things like optimizing the line. I
wanted a truer representation.

>
>>
While we are at it, --- and this may sound simple ---, W3C validation
with "strict" complains about align="center" for <td>, and about other
attributes. How can I write these to accomplish the centering and
still be compliant with the "strict"?
I don't know if align is removed in XHTML, but try setting it in the
stylesheets instead. HTML shouldn't be used for presentation.
What attribute? When I tried style=" and waited for the choices, I
didn't see align anywhere in there. Which one will align a <td>?
>
Jul 23 '08 #3
sheldonlg wrote:
>>While we are at it, --- and this may sound simple ---, W3C validation
with "strict" complains about align="center" for <td>, and about
other attributes. How can I write these to accomplish the centering
and still be compliant with the "strict"?
I don't know if align is removed in XHTML, but try setting it in the
stylesheets instead. HTML shouldn't be used for presentation.

What attribute? When I tried style=" and waited for the choices, I
didn't see align anywhere in there. Which one will align a <td>?
The CSS attribute for alignment is text-align. But that's more a CSS,
than a HTML question. Oh and you should avoid inline styles, if possible.

--
Morten 'T-Hawk' Holt
In the joy of anticipation there's the anticipatory
letdown of anticipating not anticipating anticipation
of some future anticipation.
Jul 23 '08 #4
On Wed, 23 Jul 2008 15:42:47 -0400, sheldonlg wrote:
I am trying to debug an application that is an intranet app behind a
firewall accessible only via vpn. The problem I am having is that the
tables sorting is now working properly in Firefox 2.
"not"?
Doing a "view source" only yields the template, as the the page is
written as a response back from an AJAX call.
So, I went to internet
explorer and did a javascript:document.write(mainwapper.innerHTML).
The problem with this procedure is that it converts things like id="foo"
to id=foo.
That is valid html.
... I want to keep it "strict" and XHTML.

How can I get the writing to not strip off the surrounding quotes?
Well if internet explorer is internally converting your xhtml to html,
then perhaps what you need to debug is the html generated, not the
intermediate text that your javascript writes.

Alternatively, does your API (ajax?) provide a method to get the
generated page before it is passed to the browser? Something like
innerHTML but that gets called earlier?
While we are at it, --- and this may sound simple ---, W3C validation
with "strict" complains about align="center" for <td>, and about other
attributes. How can I write these to accomplish the centering and still
be compliant with the "strict"?
The main difference and reason that strict is preferable to transitional
is that these attributes are not allowed. You can't "sneak them in" and
still be valid. You have to use CSS for styling you pages. (Another big
difference is that frames aren't allowed).

Also, you seem to think that xhtml is somehow better than html; it
isn't.
Jul 24 '08 #5
Morten Holt wrote:
sheldonlg wrote:
>>>While we are at it, --- and this may sound simple ---, W3C
validation with "strict" complains about align="center" for <td>,
and about other attributes. How can I write these to accomplish the
centering and still be compliant with the "strict"?
I don't know if align is removed in XHTML, but try setting it in the
stylesheets instead. HTML shouldn't be used for presentation.

What attribute? When I tried style=" and waited for the choices, I
didn't see align anywhere in there. Which one will align a <td>?
The CSS attribute for alignment is text-align. But that's more a CSS,
than a HTML question. Oh and you should avoid inline styles, if possible.
I've found that only IE aligns all elements according to the text-align
attribute. Firefox and Safari won't align DIVs, OBJECTS or EMBEDS,
they'll only align text and images.

I've had to build a workaround to dynamically add the align="center"
attribute to DIVs that some page designer has used text-align:center and
expected that my Div would be centered by it, but only IE respects it.
I'd always thought the page designed was wrong to use it and said they
should use align="center" instead. My opinion wasn't based on standards,
just on what works and what doesn't.
Jul 24 '08 #6
Stevo wrote:
I've found that only IE aligns all elements according to the text-align
attribute. Firefox and Safari won't align DIVs, OBJECTS or EMBEDS,
they'll only align text and images.
Of course they do! Images are INLINE elements and divs and objects are
BLOCK elements. "test-align: /whatever/" applies to INLINE elements not
BLOCK. One of most common questions here, "how to center {insert block
element of your choice}"

STEP 1, give element an explicit width(px if it contains a static px
size content like an image, em to be proportional to textual content, %
to be proportional to canvas)

STEP 2, set the left & right MARGINS on the element( "margin-right:
auto; margin-left-auto;" or set top & bottom also "margin: 0 auto;" or
set top &bottom to different values "margin: 0 auto 1em auto;"
>
I've had to build a workaround to dynamically add the align="center"
attribute to DIVs that some page designer has used text-align:center and
expected that my Div would be centered by it, but only IE respects it.
I'd always thought the page designed was wrong to use it and said they
should use align="center" instead. My opinion wasn't based on standards,
just on what works and what doesn't.
Vintage 1990's solution--try moving into this millennium.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jul 24 '08 #7
viza wrote:
On Wed, 23 Jul 2008 15:42:47 -0400, sheldonlg wrote:
>I am trying to debug an application that is an intranet app behind a
firewall accessible only via vpn. The problem I am having is that the
tables sorting is now working properly in Firefox 2.

"not"?
Typo. Of course it is "not".
>
>Doing a "view source" only yields the template, as the the page is
written as a response back from an AJAX call.
>So, I went to internet
explorer and did a javascript:document.write(mainwapper.innerHTML).
>The problem with this procedure is that it converts things like id="foo"
to id=foo.

That is valid html.
But W3C validation complains.
>
>... I want to keep it "strict" and XHTML.

How can I get the writing to not strip off the surrounding quotes?

Well if internet explorer is internally converting your xhtml to html,
then perhaps what you need to debug is the html generated, not the
intermediate text that your javascript writes.
I want to debug what is actually sent to the browser.
>
Alternatively, does your API (ajax?) provide a method to get the
generated page before it is passed to the browser? Something like
innerHTML but that gets called earlier?
Possible. I'll look into that.
>
>While we are at it, --- and this may sound simple ---, W3C validation
with "strict" complains about align="center" for <td>, and about other
attributes. How can I write these to accomplish the centering and still
be compliant with the "strict"?

The main difference and reason that strict is preferable to transitional
is that these attributes are not allowed. You can't "sneak them in" and
still be valid. You have to use CSS for styling you pages. (Another big
difference is that frames aren't allowed).
I am not trying to "sneak things in". I simply wanted a method to align
it. I found out what that is and I don't mind putting it into css.
>
Also, you seem to think that xhtml is somehow better than html; it
isn't.
Not my choice. The template is XHTML and I need to stay with that.
Jul 24 '08 #8
Jonathan N. Little wrote:
Stevo wrote:
>I've found that only IE aligns all elements according to the
text-align attribute. Firefox and Safari won't align DIVs, OBJECTS or
EMBEDS, they'll only align text and images.

Of course they do! Images are INLINE elements and divs and objects are
BLOCK elements. "test-align: /whatever/" applies to INLINE elements not
BLOCK. One of most common questions here, "how to center {insert block
element of your choice}"

STEP 1, give element an explicit width(px if it contains a static px
size content like an image, em to be proportional to textual content, %
to be proportional to canvas)

STEP 2, set the left & right MARGINS on the element( "margin-right:
auto; margin-left-auto;" or set top & bottom also "margin: 0 auto;" or
set top &bottom to different values "margin: 0 auto 1em auto;"
I just tried that, it works a treat. Thanks a lot.
>I've had to build a workaround to dynamically add the align="center"
attribute to DIVs that some page designer has used text-align:center
and expected that my Div would be centered by it, but only IE respects
it. I'd always thought the page designed was wrong to use it and said
they should use align="center" instead. My opinion wasn't based on
standards, just on what works and what doesn't.

Vintage 1990's solution--try moving into this millennium.
We're all trying our best to keep up ;-)
Jul 24 '08 #9
Stevo wrote:
Jonathan N. Little wrote:
>Stevo wrote:
>>I've found that only IE aligns all elements according to the
text-align attribute. Firefox and Safari won't align DIVs, OBJECTS or
EMBEDS, they'll only align text and images.

Of course they do! Images are INLINE elements and divs and objects are
BLOCK elements. "test-align: /whatever/" applies to INLINE elements
not BLOCK. One of most common questions here, "how to center {insert
block element of your choice}"

STEP 2, set the left & right MARGINS on the element( "margin-right:
auto; margin-left-auto;" or set top & bottom also "margin: 0 auto;" or
set top &bottom to different values "margin: 0 auto 1em auto;"

I just tried that, it works a treat. Thanks a lot.
I don't actually understand how changing the margin to auto changes it
from being a block element to an inline element though. It's still the
same element type. If a DIV is a block, then isn't it still a block when
it has auto margin? The answer won't change anything for me, it's
working great now, but I can't help wondering.
Jul 24 '08 #10
Gazing into my crystal ball I observed Stevo <no@mail.invalidwriting
in news:g6*************@news.t-online.com:
Stevo wrote:
>Jonathan N. Little wrote:
>>Stevo wrote:
I've found that only IE aligns all elements according to the
text-align attribute. Firefox and Safari won't align DIVs, OBJECTS
or
>>>EMBEDS, they'll only align text and images.

Of course they do! Images are INLINE elements and divs and objects
are
>>BLOCK elements. "test-align: /whatever/" applies to INLINE elements
not BLOCK. One of most common questions here, "how to center
{insert
>>block element of your choice}"

STEP 2, set the left & right MARGINS on the element( "margin-right:
auto; margin-left-auto;" or set top & bottom also "margin: 0 auto;"
or
>>set top &bottom to different values "margin: 0 auto 1em auto;"

I just tried that, it works a treat. Thanks a lot.

I don't actually understand how changing the margin to auto changes it
from being a block element to an inline element though. It's still the
same element type. If a DIV is a block, then isn't it still a block
when
it has auto margin? The answer won't change anything for me, it's
working great now, but I can't help wondering.
Declaring margin auto does not change an element from block to inline.
Since block elements take up 100% of their containing element, declaring
width and/or height constrains it, and thus allowing auto margin to
"center" the element.

To make a block element inline, one would declare "element
{display:inline}" and conversly, "element {display:block}" to make an
inline element display as a block element.
Jul 24 '08 #11
In article <29***************************@NAXS.COM>,
"Jonathan N. Little" <lw*****@central.netwrote:
Stevo wrote:
Stevo wrote:
Jonathan N. Little wrote:
Stevo wrote:
I've found that only IE aligns all elements according to the
text-align attribute. Firefox and Safari won't align DIVs, OBJECTS
or EMBEDS, they'll only align text and images.

Of course they do! Images are INLINE elements and divs and objects
are BLOCK elements. "test-align: /whatever/" applies to INLINE
elements not BLOCK. One of most common questions here, "how to
center {insert block element of your choice}"

STEP 2, set the left & right MARGINS on the element( "margin-right:
auto; margin-left-auto;" or set top & bottom also "margin: 0 auto;"
or set top &bottom to different values "margin: 0 auto 1em auto;"

I just tried that, it works a treat. Thanks a lot.
I don't actually understand how changing the margin to auto changes it
from being a block element to an inline element though.

It doesn't! It remain a block element it just make the margin on the
left and right automatically the same. You need to understand what
margins are:

http://www.w3.org/TR/CSS21/box.html#box-dimensions
Indeed, I would be inclined to start here:

http://www.w3.org/TR/CSS21/

and read the lot.
Jul 24 '08 #12
Tim Streater wrote:
In article <29***************************@NAXS.COM>,
"Jonathan N. Little" <lw*****@central.netwrote:
>http://www.w3.org/TR/CSS21/box.html#box-dimensions
Indeed, I would be inclined to start here:
http://www.w3.org/TR/CSS21/
and read the lot.
Oh I'd love to, but I'm hoping my brief foray into CSS has been and gone
and doesn't come back ;-) We're in-between CSS gurus where I work,
otherwise I wouldn't have had to find out what the deal was here.

Thanks again though guys, this rocks :-)
Jul 24 '08 #13
On 23 Jul, 20:42, sheldonlg <sheldonlgwrote:
I am trying to debug an application
So post a URL
that is an intranet app behind a
firewall accessible only via vpn.
So post a URL to a copy of it, redacted as necessary.
Jul 24 '08 #14
Andy Dingley wrote:
On 23 Jul, 20:42, sheldonlg <sheldonlgwrote:
>I am trying to debug an application

So post a URL
>that is an intranet app behind a
firewall accessible only via vpn.

So post a URL to a copy of it, redacted as necessary.
I am unable to do that! This is an AJAX app, where the various pages
depend upon accessing databased to build the html and then sending it
back to be displayed via html. When I simply try to make an app with
the final html output, it works properly and I cannot reproduce the error.

I fully understand that a URL would be best - but that is impossible in
this case. That is why I asked about how to get the javascript
document.write to no remove the quotes. I want to try to validate that
stuff using the same headers that are used in the real application.
Perhaps I can find something in the validation that might get it to work.

Again, a URL is impossible to provide and a "copy of it" does not
reproduce the problem -- so it is useless.
Jul 24 '08 #15
sheldonlg wrote:
Andy Dingley wrote:
>On 23 Jul, 20:42, sheldonlg <sheldonlgwrote:
>>I am trying to debug an application

So post a URL
>>that is an intranet app behind a
firewall accessible only via vpn.

So post a URL to a copy of it, redacted as necessary.

I am unable to do that! This is an AJAX app, where the various pages
depend upon accessing databased to build the html and then sending it
back to be displayed via html. When I simply try to make an app with
the final html output, it works properly and I cannot reproduce the error.

I fully understand that a URL would be best - but that is impossible in
this case. That is why I asked about how to get the javascript
document.write to no remove the quotes. I want to try to validate that
stuff using the same headers that are used in the real application.
Perhaps I can find something in the validation that might get it to work.

Again, a URL is impossible to provide and a "copy of it" does not
reproduce the problem -- so it is useless.
Have you tried id='foo' instead of id="foo"?

[to get the javascript document.write to not remove the quotes] = [for
javascript to carry and not act on it (as a string)] is something like this:

id=/'foo/' or id=/"foo/"

isn't it?

--
Gus
Jul 24 '08 #16
Gus Richter wrote:
Have you tried id='foo' instead of id="foo"?
One further possibility (you'll probably know right away whether it's
worth trying or not) is this:

id="'foo'"

Maybe the double quotes will be removed leaving only the singles. Of
course if you have a whole string wrapped in single quotes then you'd
need something like this:

'~~ bla bla bla ~~ id="\'foo\'" ~~ bla bla ~~'
Jul 24 '08 #17
On Wed, 23 Jul 2008 15:42:47 -0400
sheldonlg <sheldonlgwrote in:
<5b******************************@giganews.com>

[snip]
Doing a "view source" only yields the template, as the the page is
written as a response back from an AJAX call. So, I went to internet
explorer and did a javascript:document.write(mainwapper.innerHTML).
My intent was to build a page that was close to what the actual page
was by doing a "view page" from there and cutting and pasting.
[snip]
How can I get the writing to not strip off the surrounding quotes?
[snip]

Internet Explorer Developer Toolbar

http://tinyurl.com/6pmvb9

If you lean how to use it, it will allow you to access the source as it
is.

Install it, play around with it, if you can't figure it out just ask.
--

BootNic Thu Jul 24, 2008 04:39 pm
It is well known that "problem avoidance" is an important part of
problem solving. Instead of solving the problem you go upstream and
alter the system so that the problem does not occur in the first
place.
*Edward de Bono*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkiI6JMACgkQylMUzZO6jeKO3wCgwx2egzjwwQ bxXSmQ7TSMRobq
u3AAn3pFHWoTjTogxrMQIVjWM0HIFgx4
=n2cZ
-----END PGP SIGNATURE-----

Jul 24 '08 #18
BootNic wrote:
On Wed, 23 Jul 2008 15:42:47 -0400
sheldonlg <sheldonlgwrote in:
<5b******************************@giganews.com>

[snip]
>Doing a "view source" only yields the template, as the the page is
written as a response back from an AJAX call. So, I went to internet
explorer and did a javascript:document.write(mainwapper.innerHTML).
My intent was to build a page that was close to what the actual page
was by doing a "view page" from there and cutting and pasting.
[snip]
>How can I get the writing to not strip off the surrounding quotes?
[snip]

Internet Explorer Developer Toolbar

http://tinyurl.com/6pmvb9

If you lean how to use it, it will allow you to access the source as it
is.

Install it, play around with it, if you can't figure it out just ask.
Actually, it also strips the quotes. In Firefox's Firebug, the html
area does not strip the quotes.
Jul 24 '08 #19
On Jul 24, 5:42*am, sheldonlg <sheldonlgwrote:
I am trying to debug an application that is an intranet app behind a
firewall accessible only via vpn. *The problem I am having is that the
tables sorting is now working properly in Firefox 2.

Doing a "view source" only yields the template, as the the page is
written as a response back from an AJAX call. *So, I went to internet
explorer and did a javascript:document.write(mainwapper.innerHTML). *My
intent was to build a page that was close to what the actual page was by
doing a "view page" from there and cutting and pasting.
There is no public specification for innerHTML, so what it produces is
entirely implementation dependent. Since IE doesn't know what XHTML
is, it is unlikely that its version of innerHTML will generate valid
XHTML.

Similarly, in Firefox, the markup generated by innerHTML is not
identical to the original source. For example, tags that do not need
to be closed in valid HTML 4 strict such as P, LI, TD, etc. are closed
in Firefox's innerHTML even if they aren't in the source. Further,
when browsers get invalid markup they will perform error correction to
fix it. In these cases, the innerHTML reflects the modified DOM, not
what was sent.

Therefore there seems little point in using innerHTML to validate
markup. What you are validating is the ability of the browser to
generate valid markup from its DOM.

The problem with this procedure is that it converts things like id="foo"
to id=foo. *Doing a validation with W3C then yields tons of errors
stating that SHORTTAGS YES needs to be there. *Researching how to put it
in gave me to info to change the doctype. *I don't want to do that, as I
want to keep it "strict" and XHTML.
Validators are intended to validate the markup *sent* to user agents.
What you are trying to validate is the markup that the UA *generates*
from its DOM. It is quite possible that you send valid markup, but
that the innerHTML generated by the UA is not (and vice versa).

How can I get the writing to not strip off the surrounding quotes?
Write your own "DOM to source" function?

While we are at it, --- and this may sound simple ---, W3C validation
with "strict" complains about align="center" for <td>, and about other
attributes. *How can I write these to accomplish the centering and still
be compliant with the "strict"?
Use CSS.
--
Rob
Jul 25 '08 #20
Gus Richter wrote:
Have you tried id='foo' instead of id="foo"?
That would make no difference at all.
[to get the javascript document.write to not remove the quotes] = [for
javascript to carry and not act on it (as a string)] is something like this:

id=/'foo/' or id=/"foo/"
Syntax error.

<'and <"delimit string literals with no difference in parsing their
content (in contrast to, e.g. PHP); `/' delimits RegExp (Regular Expression)
literals.
isn't it?
It is not, that is utter nonsense. RTFM before you make any recommendation.

<http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference>
F'up2 c.l.js

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Jul 25 '08 #21
Thomas 'PointedEars' Lahn wrote:
Gus Richter wrote:
>Have you tried id='foo' instead of id="foo"?

That would make no difference at all.
>[to get the javascript document.write to not remove the quotes] = [for
javascript to carry and not act on it (as a string)] is something like this:

id=/'foo/' or id=/"foo/"

Syntax error.

<'and <"delimit string literals with no difference in parsing their
content (in contrast to, e.g. PHP); `/' delimits RegExp (Regular Expression)
literals.
>isn't it?

It is not, that is utter nonsense. RTFM before you make any recommendation.

<http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference>
F'up2 c.l.js
Restored to also include alt.html
PointedEars
Not being into javascript, I bow to your expertise as a javascript guru.
I was just _suggesting_ he check his nesting of quotes as per:

document.write("you said, 'hi' to me");
document.write('you said, "hi" to me');

Then I suggested that he could also try the Escape Character to escape
the quotes as per:

document.write("you said, \"hi\" to me");
document.write('you said, \'hi\' to me');

I placed a question mark (?) in my response since I was not sure about
the (/), thinking that since he was using javascript he would pick up on
the obvious mistake, as you did. I'm extremely sorry that I made a
mistake in using / instead of \.

Try to get the gist of what is written before coming on so strong. The
OP has a problem, so I tried to make suggestions that I thought might
help since none were being provided. Correct my mistakes, no problem,
but RTFM and nonsense do seem very harsh.

Oh, and why not provide the proper, in fact any, answer to the OP
instead since you're so knowledgeable?

--
Gus

Jul 25 '08 #22
On Thu, 24 Jul 2008 19:32:59 -0400
sheldonlg <sheldonlgwrote in:
<Mr******************************@giganews.com>
BootNic wrote:
>On Wed, 23 Jul 2008 15:42:47 -0400
sheldonlg <sheldonlgwrote in:
<5b******************************@giganews.com>

[snip]
>>Doing a "view source" only yields the template, as the the page is
written as a response back from an AJAX call. So, I went to
internet explorer and did a
javascript:document.write(mainwapper.innerHTML ). My intent was to
build a page that was close to what the actual page was by doing a
"view page" from there and cutting and pasting.
[snip]
>>How can I get the writing to not strip off the surrounding quotes?
[snip]
>
If you lean how to use it, it will allow you to access the source as
it is.

Install it, play around with it, if you can't figure it out just
ask.
Actually, it also strips the quotes. In Firefox's Firebug, the html
area does not strip the quotes.
Interesting. I am not able to get it to strip quotes, in fact it seems
that if I remove them it adds them.

--

BootNic Fri Jul 25, 2008 02:37 pm
The human mind treats a new idea the same way the body treats a
strange protein; it rejects it.
*P. B. Medawar*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkiKHWEACgkQylMUzZO6jeLjZgCgshn6esKYES ZLF9ViMvYOjWiA
taEAmgORtd0IRDx0bRQspXuLcSd37tNL
=NPBw
-----END PGP SIGNATURE-----

Jul 25 '08 #23
BootNic wrote:
sheldonlg <sheldonlgwrote in:
>BootNic wrote:
>>sheldonlg <sheldonlgwrote in:
[snip]
Doing a "view source" only yields the template, as the the page is
written as a response back from an AJAX call. So, I went to
internet explorer and did a
javascript:document.write(mainwapper.innerHTML) . My intent was to
build a page that was close to what the actual page was by doing a
"view page" from there and cutting and pasting.
[snip]
How can I get the writing to not strip off the surrounding quotes?
[snip]
>>If you lean how to use it, it will allow you to access the source as
it is.

Install it, play around with it, if you can't figure it out just
ask.
Actually, it also strips the quotes. In Firefox's Firebug, the html
area does not strip the quotes.

Interesting. I am not able to get it to strip quotes, in fact it seems
that if I remove them it adds them.
The proprietary `innerHTML' property value of an element object provides an
*HTML serialization* of the represented element's subtree (no matter the
underlying markup language); only certain HTML attribute values need to be
delimited with the <"or <'characters:

<http://www.w3.org/TR/1999/REC-html401-19991224/intro/sgmltut.html#h-3.2.2>

In contrast, Firebug's HTML tab shows an *XML serialization* of the DOM tree
(no matter the underlying markup language); in applications of XML (like
XHTML), all attribute values must be delimited with the <"or <'characters:

<http://www.w3.org/TR/2006/REC-xml-20060816/#NT-AttValue>

(Try and inspect an HTML element like `<BR>'; it shows `<br/>' instead.
Tested with Firebug 1.2.0b6.)
HTH

PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Jul 25 '08 #24

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: The Plankmeister | last post by:
Hi... I seem to remember reading somewhere about the proper way of doing this sort of thing in the middle of some html, for example: <a href="<?= $some_url_or_other ?>">Click this!</a> What...
5
by: Pierre | last post by:
I'm doing some tutorials with the book: PHP by example. The following program should according to the book, generates a personalized greeting for a visitor, but it doesn't. Any ideas why? Here's...
8
by: STEPHEN GOODE | last post by:
I am getting the following error. I've changed the paths and file names here to protect my client's confidentiality. Warning: session_start(): Cannot send session cache limiter - headers already...
24
by: Nick Kew | last post by:
There's a new beta of the W3C Markup Validation Service now live at <URL:http://validator.w3.org:8001/> Probably the most important change is verbose output, including attempts to explain the...
23
by: Hostile17 | last post by:
I keep coming across people, online and in real life, who believe that to code single tags like <br> and <img> with trailing slashes, <br /> and <img /> is considered "best practice" and when...
4
by: bill drescher | last post by:
Here is the context in question: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta content="text/html; charset=ISO-8859-1"...
10
by: NikitaTheSpider | last post by:
Hi all, I would like to announce the alpha release of a service that does bulk/batch HTML validation, link checking and more. During alpha testing, the service is free -- I need people to try this...
30
by: abracad_1999 | last post by:
Is it possible to serve valid xhtml with php? xhtml requires the 1st line: <?xml version="1.0" encoding="iso-8859-1"?> But php interprets the opening <? as a php statement. If I try to echo...
4
by: Pakku | last post by:
On this site http://www.onlamp.com/pub/a/php/2001/05/03/php_foundations.html I discovered that I could embed php variables in html using this notation The variable $var has a value of:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.