Wednesday, August 13, 2008

Prototype IFrame Window (PWC) appears blank in Internet Explorer 6

Prototype Window Classes used to open external pages using Ajax calls or iframe are now popular for Web 2.0 applications. Sometimes you may encounter with an issue of window opening blank, when you try to open a page with prototype iframe window option.
For example
---------------- OpenWindow_in_iframe(srcLink, title, width_px, height_px){ Win= new Window({id: "WinName", className: "alphacube", title: "TitleName", width:width_px, height:height_px,minimizable:false,maximizable:false,resizable:false,url:srcLink}); Win.setDestroyOnClose(); Win.setOpacity(0.9); Win.showCenter(true); }
----------------
Now its about how you make a call to this javascript method.

FIX

If the fuction that make the call is called from a anchor, and the anchor is in this form:

< href="javascript:void(0)" onclick="javascript:openwindow_in_iframe()">Click here...

The window will not show the url, but if instead you call onclick javascript method in href itself and write something like this:

< href="javascript:call_popupWindow()">Click here...

everything works fine.

In FF and IE 7, everything works fine. The problem is in IE6


No comments:

Chihealth - One stop Preventive Healthcare