| Joomla! http://forum.joomla.org/ |
|
| [SOLVED] Tell a friend module works OK except with Internet Explorer http://forum.joomla.org/viewtopic.php?f=126&t=74853 |
Page 1 of 1 |
| Author: | elmoch [ Thu Jul 06, 2006 11:33 pm ] |
| Post subject: | [SOLVED] Tell a friend module works OK except with Internet Explorer |
Hi developers, I just published the second version of my "tell a friend" package (component+module) called JM-Recommend. Its aim is to allow visitors to recommend the site and current page to other people. More info and the zip files can be found in this topic. To recommend the current page the module is needed. It opens a pop window and calls the component, which writes the form according to the requests. I originally used Code: if (!isset($act) or $act == 1) { HTML_recommend_plus::emailForm( $mosConfig_live_site,$mosConfig_sitename,$template ); } else { $url = sefRelToAbs($_SERVER['HTTP_REFERER']); HTML_recommend_plus::emailForm( $url,$ttl,$template ); } but IE warned Notice: Undefined index: HTTP_REFERER in c:\mysite\components\com_recommend_plus\recommend_plus.php on line 69" (on my local installation - standalone LAMP on Win-XP). So now I use a JavaScript script which captures the current URL and posts the variables: Code: function displayLink(linkType, pageUrl, pageTitle, linkText, windowWidth, windowHeight) { if (linkType == 2) { document.write("<a href=\"javascript:openForm('"+linkType+"','"+pageTitle+"',top.location.href,'"+windowWidth+"','"+windowHeight+"');\" title=\"" + pageTitle + "\" >" + linkText + "</a>"); } else { document.write("<a href=\"javascript:openForm('"+linkType+"','"+pageTitle+"','"+pageUrl+"','"+windowWidth+"','"+windowHeight+"');\" title=\"" + pageTitle + "\" >" + linkText + "</a>"); } } function openForm(type,title,url,width,height) { window.open("index2.php?option=com_jm-recommend&task=form&act="+type+"&url="+escape(url)+"&ttl="+title+"","mywin","status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width="+width+",height="+height+",directories=no,location=no"); } Everything goes OK on my local installation, whichever browser I use (FF 1.5, Opera 9.0 and IE 6.0, all for Win-XP). However IE fails to work properly on my remote server (Apache+Linux): When using IE the module works only if the location is http://www.mysite.tld/ not for other URL's of the home page, i.e. http://www.mysite.tld/component/option, ... /Itemid,1/ and the like, nor with inner pages. In the URL of the pop-up window, IE 6.0 appends the URL stated in the window.open() command to the parent page's one. As a result, the referrer page is opened again in the new window. ![]() I have tried almost anything without results. I guess it's not a template-related issued as I have tested several of them on both servers. It is always the same story - both the component and the module work locally when used with either FF, IE or Opera. But remotely MSIE doesn't act as expected when it comes to the module. ![]() Apparently my local and remote server have nearly the same settings, so I must be overlooking something. The package has been tested by another webmaster with similar results on a live server (see here). I've searched the forums for an answer, but found none. What could I do to make MSIE work as if it was a normal browser? Any help would be appreciated. Thanks
|
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|