Pekka
Pekka

Reputation: 449385

Cross browser way of setting IFrame to "about:blank"?

Does anybody know a proper, cross-browser way to "empty" an IFrame? Is "about:blank" recognized without error across all browsers? Is it valid to give an IFrame an empty src?

Upvotes: 6

Views: 1865

Answers (1)

marcgg
marcgg

Reputation: 66436

How about

src="javascript: ;"

or

src="javascript:void(0)"

This should work fine with IE and Firefox

Upvotes: 3

Related Questions