javascript problem when creating frame

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • razamemon
    New Member
    • Sep 2009
    • 1

    javascript problem when creating frame

    i am struggling from last 3 days creating frames using javascript, it works fine on IE but not on firefox, when displaying language other than english, here is the code
    Code:
    self.newWin = window.open('about:blank','cal','dependent=yes,width=180,height=180,titlebar=yes,top=243,left=232');
    	
    	newWin.document.write
    	(
    	 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+
    	  "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">"+
    	  "<html xmlns=\"http://www.w3.org/1999/xhtml\">"+
    		"<HTML>\n" +
    		"<HEAD>\n" + 
    		"<META http-equiv='Content-Type' content='text/html; charset=UTF-8'\/>" +
    		"<TITLE>Select your date<\/TITLE>\n" + 
    		"<\/HEAD>\n" +
    
    		"<FRAMESET ROWS='40,*' BORDER='0' FRAMEBORDER='0'>\n" +
            "<FRAME NAME='topCalFrame' SRC='javascript:parent.opener.calDocTop' SCROLLING='no'>\n" +
            "<FRAME NAME='bottomCalFrame' SRC='javascript:parent.opener.calDocBottom' SCROLLING='no'>\n" +
            "<\/FRAMESET>\n" + 
    		
    		"<\/HTML>"
    }
    where calDocTop is the HTML for top area of calendar and calDocBottom is the HTML for bottom frame, both variables are in String format. it works perfect on Firefox but not on IE.

    your help will be grateful
    Last edited by Dormilich; Sep 13 '09, 03:23 PM. Reason: Please use [code] tags when posting code
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Does it work in IE or Firefox (you've said both!)?

    The frame src should be a file really, so I would suggest you create two files and point to them instead.

    Comment

    Working...