views:

127

answers:

1

Hey is it possible that I insert the source for a frame in the same page in which it is defined.

Like instead of giving the location to the document, can I insert the source in the frame tag?

The problem is I'm calling a function, which is not valid in the other page. So I have to call it in the same page, Got mE?

A: 

I think that you are able to do this with the data: tag.

<iframe src="data:<source of the page>">. That is how Yahoo recommends for images, so I expect it might work the same from source code.

Another Idea is you can create an empty frame with no source and then use Javascript/jQuery to add HTML.

Chacha102
yes though i'd check browser support. ie is pretty slow on the uptake of features like this and i'm reasonably sure ie6 doesn't support data:
SpliFF