Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

Resolved Issue for set attribute in mozilla

leave a comment »

I had implemented the following for setting SRC attribute for the IFRAME control.

document.getElementById(“MyFrame”).src = “page”;

I thought it would work in both IE and MOZILLA but that was the mistake. After too many hours of finding, I reach on the conclusion that above line is not working for the MOZILLA :-(. very bad…

So, what is the solution for this above. Simple, use the following :


and when you want to get SRC attribute then


Please keep in mind that use getAttribute and setAttribute for attribute settings of any control from javascript. May be you can save many hours of debugging from the future problems if you haven’t used it. Happy programming 🙂


Written by Manish

December 30, 2006 at 1:07 pm

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: