RIRedinPA Posted March 17, 2010 Share Posted March 17, 2010 I built a help page for a site I developed and people using FF or Safari on Macs and PCs can view it but those using IE cannot get the left nav links to work... it's pretty simple, left hand nav has links, click one and I use AJAX to pull relevant info into a content div. So trying to debug this I add an alert to see what I was passing into the function that calls up the content and on every browser except IE7 it works as expected, click a link, whatever I am passing shows up in the alert - for instance the first value is called mr_initial, comes up fine, the last one in that series is called mr_end, same thing. On IE7, click on the mr_end link and I get an alert that shows the page being passed is mr_end but then when I click the okay button I get a second alert that shows mr_initial (the first link)... I think it is a css issue since the first link is not being formatted properly but still, why would the function be called twice with one click? Here's the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Production Workflow Chart version 2.0 | User Guide</title> <!--CSS Link--> <style> * { margin: 0px; border: 0px; padding: 0px; } html { background-color: #eee; } #header { position: top: left: 0px; top: 0px; width: 100%; height: 50px; padding: 5px; font:normal 600 1em "Trebuchet MS",Verdana,Arial,Helvetica,sans-serif; color: #fff; background-color: #efbd0d; border-bottom: 1px solid #c1640a; text-indent: 15px; } #header H1 { font:normal 600 1em "Trebuchet MS",Verdana,Arial,Helvetica,sans-serif; color: #fff; margin-top: 10px; } #leftnav { position: absolute; left: 0px; top: 61px; width: 150px; height: 100%; background-color: #c1640a; padding-left: 15px; } #leftnav ul { list-style-type: none; position: absolute; top: 10px; left: 0px; width: 165px; } #leftnav li { position: absolute; width: 161px; height: 25px; padding: 2px; background-color: #efbd0d; text-indent: 20px; } #leftnav br { margin-top: 11px; } #leftnav a { position: absolute; width: 161px; left: 0px; height: 25px; padding: 2px; background-color: #efbd0d; text-indent: 20px; text-decoration: none; color: #fff; font:normal 600 .8em "Trebuchet MS",Verdana,Arial,Helvetica,sans-serif; } #leftnav a:active, link { color: #fff; } #leftnav a:hover { color: #c1640a; } #leftnav a:visited { color: #fff; } #content { position: absolute; left: 200px; top: 100px; width: 700px; } #content a { text-decoration: none; color: #1973ab; } #content a:active, link { color: #1973ab; } #content a:hover { color: #94bad2; } #content a:visited { color: #1973ab; } #content H1 { margin-bottom: 10px; } #content H2 { margin-bottom: 5px; color: #c1640a; } #content img { margin-top: 10px; margin-bottom: 10px; border: 1px solid #333; } #content span { font:normal 600 .7em "Trebuchet MS",Verdana,Arial,Helvetica,sans-serif; color: #333; } #content br { margin-bottom: 15px; } #navbtn { width: 800px; text-align: center; } </style> <script src="js/motionpack.js"></script> <script language="javascript"> var xmlHttp = checkajax(); function getcontent(source) { alert(source); xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { //alert(xmlHttp.responseText); document.getElementById('content').innerHTML = xmlHttp.responseText; } } xmlHttp.open("GET", "guidelib/getcontent.php?source=" + source, true); xmlHttp.send(null); } function checkajax() { //ajax compatibility check var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } //alert(xmlHttp.responseText); } } return xmlHttp } </script> </head> <body> <div id="header"><H1>Merion Production Workflow Chart version 2.0 | User Guide</H1></div> <div id="leftnav"> <div><a href="javascript:void(0);" onmousedown="getcontent('intro');">Introduction</a></div><br> <div><a href="javascript:void(0);" onmousedown="toggleSlide('createchapters');">Create Record</a></div><br> <div><a href="javascript:void(0);" onmousedown="toggleSlide('editchapters');">Edit Record</a></div><br> <div><a href="javascript:void(0);" onmousedown="getcontent('problems');">Known Problems</a></div><br> <br><div id="createchapters" style="display: none; overflow: hidden; height: 200px;>" <a href="javascript:void(0);" onmousedown="getcontent('mr_initial');">Initial Screen</a><br> <a href="javascript:void(0);" onmousedown="getcontent('mr_start');">Getting Started</a><br> <a href="javascript:void(0);" onmousedown="getcontent('mr_fields');">Customizing Fields</a><br> <a href="javascript:void(0);" onmousedown="getcontent('mr_items');">Adding Items</a><br> <a href="javascript:void(0);" onmousedown="getcontent('mr_groups');">Adding Groups</a> <a href="javascript:void(0);" onmousedown="getcontent('mr_end');">Creating The Record</a> </div> <div id="editchapters" style="display: none; overflow: hidden; height: 200px;>" <a href="javascript:void(0);" onmousedown="getcontent('er_initial');">Initial Screen</a><br> <a href="javascript:void(0);" onmousedown="getcontent('er_update');">Updating Content</a><br> <a href="javascript:void(0);" onmousedown="getcontent('er_toolbar');">Toolbar</a><br> <a href="javascript:void(0);" onmousedown="getcontent('er_checkall');">Check All</a><br> <a href="javascript:void(0);" onmousedown="getcontent('er_additem');">Add Items</a><br> <a href="javascript:void(0);" onmousedown="getcontent('er_bundle');">New, Edit and Help</a><br> <a href="javascript:void(0);" onmousedown="getcontent('er_bug');">Bug Report</a><br> <a href="javascript:void(0);" onmousedown="getcontent('er_history');">History</a><br> <a href="javascript:void(0);" onmousedown="getcontent('er_delete');">Deleting An Item</a><br> <a href="javascript:void(0);" onmousedown="getcontent('er_groups');">Groups</a><br> </div> <br> </ul> </div> <div id="content"><H1>Introduction</H1>This user guide is intended to help walk you through the changes being made for the Publication Workflow Chart. The redesign will hopefully make the PWC more user friendly. Though the basic functionality and use of the PWC remains, its a means of streamlining communication between editorial and design and recording the progress on magazine production we revamped most of the processes in some manner. If at any time you have questions, suggestions or complaints regarding the redesign feel free to contact <a href="mailto:ssuranie@advanceweb.com">me</a> or call me at ext. 1449.</div> </body> </html> The PHP page being called up code is basically this... <?php $source = $_GET['source']; if ($source == "intro") { $contentcode = "<H1>Introduction</H1>This user guide is intended to help walk you through the changes being made for the Publication Workflow Chart. The redesign will hopefully make the PWC more user friendly. Though the basic functionality and use of the PWC remains, its a means of streamlining communication between editorial and design and recording the progress on magazine production we revamped most of the processes in some manner. If at any time you have questions, suggestions or complaints regarding the redesign feel free to contact <a href=\"mailto:ssuranie@advanceweb.com\">me</a> or call me at ext. 1449."; } else if ($source == "mr_initial") { $contentcode = "<H1>Create A Record</H1><H2>Initial Screen</H2>The main page of the PWC defaults to the Create Record form. If the page does not look like the one below then just click the 'Create Record' button at the top right of the page.<p><img src=\"images/pwc_screens/createrecord_init.png\" border=\"0\" width=\"800\"></a><br><span>Figure 1: The initial Production Workflow Screen</span>"; } else if ($source == "mr_start") { $contentcode = "<H1>Create A Record</H1><H2>Getting Started</H2>To begin select the magazine and issue date you are creating a record for.<img src=\"images/pwc_screens/createrecord_start.png\" border=\"0\" width=\"800\">"; //...additional code not shown... } echo $contentcode; ?> I've posted two files, one screen capture from Firefox, one from IE. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.