Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I haven't dealt with framesets for almost 20 years (I'm still scarred), but I seem to recall that you can target nested frames just by providing them with a unique "name" attribute. I may be wrong though.

You may also want to change the doctype header to use the HTML 4 "frameset.dtd" instead of the "strict.dtd". Just change the first line of your frame-enabled pages to:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

Or, for extra 90's authenticity, you could use the HTML v3.2 doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">



But what I'm after is recursion. Rather than make 20 individual frameset pages each with different target="name"s, it would be way cooler simply to populate each frame area with itself.

Pedantic props for the doctype tip.

EDIT: In theory this should work, but browsers are uncooperative: http://tilde.club/~arch/frames-odd.html


According to http://www.w3.org/TR/WD-frames-970331 :

"Infinite recursion is prevented. Any frame that attempts to assign as its SRC a URL used by any of its ancestors is treated as if it has no SRC URL at all (basically a blank frame). This doesn't prevent all malicious documents, but it eliminates a troublesome class of them."

Ah well, probably for the best really... It seems to have a recursion limit of 10 on Firefox, and 12 on Chrome.

I cheated by creating your original frameset pattern and then just recursing index.html in the middle frame. It improves the recursion effect a bit, but still isn't infinite.

http://downloads.intermer.net/frames/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: