![]() |
|
#1
|
|||
|
|||
|
We have been using CoolMenus 3 on our site for a while. This worked well until we switched the site to use SSL. When running on IE and you click on our print version option we are getting a page can not be found error. When you check the url, it is simular to https://dev.dc.keylogic.com/javascript:submitForm(). Basically as you can see from the very stripped down code below, the menu option should be calling a JS function that will submit a form. Like I said this worked fine before enabling SSL and it still works for FireFox browsers but dies with IE. An other thing I notice with IE is you are getting challenged for a user name and password before navigating to the error page.
This is an IIS server using basic athentication. [code:sy12wiv8ad] <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <LINK rel="stylesheet" type="text/css" href="../efactsCom.css"> <script language="javascript"> function submitForm() { document.printForm.submit() } </script> <TITLE>eFacts: NPL Sites</TITLE> </head> <BODY background="..\images\bluebar5.gif" BGCOLOR="#ffffff"> <script language="JavaScript1.2" src="../coolmenus3.js"> /************************************************** *************************** Copyright (c) 2001 Thomas Brattli (www.bratta.com) eXperience DHTML coolMenus - Get it at www.bratta.com Version 3.02 This script can be used freely as long as all copyright messages are intact. ************************************************** ****************************/ </script> <font color="purple">PLUS ALL THE CODE NEEDED TO BUILD THE MENU</font id="purple"> /* START MAIN MENU*/ oCMenu.makeMenu('print','','Print Version','','',0,0,'','') oCMenu.makeMenu('browserPrint','print','Printable Web Page','javascript:submitForm()','',0,0,'','') //Leave these two lines! Making the styles and then constructing the menu oCMenu.makeStyle(); oCMenu.construct() </script> <form name="printForm" action="chart_main.asp?chartname=npl&print=true" method="POST" target="NEW"> <input type="hidden" name="closeme" value="OK"> <input type="hidden" name="print" value="true"> </form> </BODY> </HTML> [/code:sy12wiv8ad] |
|
#2
|
|||
|
|||
|
Well I found my problem. In the coolmenus3.js file I had to had a check for the https protocol to the cm_checkFolder function. The highlighted items are what I added to the function to make it work for me.[code:5h8idptqxh]
function cm_checkFolder(tmp,url){ if(url.indexOf("mailto:")>-1 || url.indexOf("/")==0 || url.indexOf("http://")==0 <font color="purple">|| url.indexOf("https://")==0</font id="purple">) return url else if(this.useframes && bw.ie || bw.ns6) return url var addr=''; var lvl=''; var off_cnt=0; var cnt=0; if(tmp.indexOf('file:')>-1 || tmp.charAt(1)==':') addr=this.offlineUrl; else if(tmp.indexOf('http:')>-1) addr=this.onlineUrl; <font color="purple">else if(tmp.indexOf('https:')>-1) addr=this.onlineUrl;</font id="purple"> for(var i=0;i<addr.length;i++){if(addr.charAt(i)=='\/') off_cnt+=1} for(var i=0;i<tmp.length;i++){if(tmp.charAt(i)=='\/'){ cnt+=1; if(cnt>off_cnt) lvl+='../'; }} return lvl + url } [/code:5h8idptqxh] |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|