Creating popup using DOM and *no* html src

G

Gérard Talbot

Matt Kruse wrote :
Ummm, that _was_ the point, you know :)




That's not true either. You can popup an about:blank window and change it.

In which browser and browser version can you do that? about:blank is an
unique domain name... With stricter security controls nowadays in
browsers, I doubt this can remain forever...

Gérard
 
A

ASM

Gérard Talbot said:
Unescaped forward slashes in a script will trigger validation errors by
the validator. That's what I meant.

Not only by the validator
most of browsers don't eat that food ( </blah> )

try :
btn.innerHTML = "Dialog <u>b<\/u>utton";
or
btn.innerHTML = "Dialog <u>b<"+"/u>utton";
 
C

Csaba Gabor

ASM said:
Not only by the validator
most of browsers don't eat that food ( </blah> )

Firefox and IE do ("eat that food"). Can you name two that don't.
try :
btn.innerHTML = "Dialog <u>b<\/u>utton";
or
btn.innerHTML = "Dialog <u>b<"+"/u>utton";

Indeed, what browser is so bad as to not realize that it's only the
<script> tag that must be closed here? But it is prudent to escape
"</script>" when appearing in a javascript string because an unescaped
"</script>" will be interpreted as closing the opening <script...>
element.

Oops, in my script above, it should be </head> that follows </title>

Gérard, I assume your question was rhetorical - after all, did you see
any <a> elements in my code?

Csaba
 
G

Gérard Talbot

Csaba Gabor wrote :
Gérard, I assume your question was rhetorical - after all, did you see
any <a> elements in my code?

Sorry about that. I misread your post.

Cheers,

Gérard
 
M

Mcginkel

what purpose does clicking the errant alert box serve?

The line "window.open("javascript:'<html><head><title>" +
"Test</title><head><body>should be a button here </body>'");
Opens a new window in another thread, the original thread continues but
you cannot be sure that window is ready. The alert gives the other
thread time to open the window and continue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top