Connecting Tech Pros Worldwide Help | Site Map

document.write works in IE but not firefox?

Newbie
 
Join Date: Sep 2009
Posts: 1
#1: Sep 15 '09
This code works in my site in IE, but not in FireFox, and I'm stuck as to why! Any ideas? (The image paths are correct, I've tested these.)

Expand|Select|Wrap|Line Numbers
  1. <script language="javascript" type="text/javascript">
  2.  
  3. <!--
  4.  
  5. var strBGCol = "#ADCED7";
  6.  
  7. document.write("<table border='0' width='100%' cellpadding='0' cellspacing='0'>");
  8. document.write("<tr>");
  9.  
  10. //Load the default CU images into the table
  11. document.write("<td id='banner_lhscell' align='left' width='25px'>");
  12. document.write("<img id='banner_lhsimg' src='" + strImgDirPath + "lhsban1.jpg'>");
  13. document.write("</td>");
  14.  
  15. document.write("<td id='banner_ctrcell' align='center' bgcolor=" + strBGCol + ">");
  16. document.write("<a href='/_layouts/login.aspx?ReturnUrl=%2fPages%2fadmin.aspx' target='_blank'>");
  17. document.write("<img id='banner_ctrimg' src='" + strImgDirPath + "ctrban1.jpg' border='0'>");
  18. document.write("</a>");
  19. document.write("</td>");
  20.  
  21. document.write("<td id='banner_rhscell' align='right' width='25px'>");
  22. document.write("<img id='banner_rhsimg' src='" + strImgDirPath + "rhsban1.jpg'>");
  23. document.write("</td>");
  24.  
  25. document.write("</tr>");
  26. document.write("</table>");
  27.  
  28. -->
  29.  
  30. </script>
gits's Avatar
Moderator
 
Join Date: May 2007
Location: Munich, Germany
Posts: 4,126
#2: Sep 16 '09

re: document.write works in IE but not firefox?


could you please specify what is exactly not working? where does strImgDirPath come from?

kind regards
Reply