www.webdeveloper.com
Results 1 to 2 of 2

Thread: XLS code for HTML popup - Firefox vs. IE

  1. #1
    Join Date
    Jan 2010
    Posts
    1

    XLS code for HTML popup - Firefox vs. IE

    Hi,

    New to this; apologies if this is posted incorrectly or missing important info. Also, sorry if the code is scrambled.

    I'm using ESRI ArcGIS to create a web map with html popups; the popups are based on XSL templates provided by ESRI.

    When I export my data to .kmz and view in Google Maps, the popup frames look perfect in firefox, but are missing the top and left outside borders in IE.

    Fixes?

    THANKS VERY MUCH

    Here's the template:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
    	<xsl:template match="/">
    		<html>
    		<body leftmargin="0" topmargin="0" bottommargin="0" rightmargin="0">
    		  <font face="Arial">
    			<xsl:variable name="nameCol" select="FieldsDoc/Fields/Field/FieldName"/>
    			<table border="1" width="300" cellpadding="5" cellspacing="0">
    				<tr bgcolor="#9CBCE2">
    					<xsl:if test="$nameCol">
    						<th width="50%" align="left">Field Name</th>
    					</xsl:if>
    					<th width="50%" align="left">Field Value</th>
    				</tr>
    				<xsl:for-each select="FieldsDoc/Fields/Field">
    				<tr>
    					<xsl:if test="(position() +1) mod 2"><xsl:attribute name="bgcolor">#D4E4F3</xsl:attribute></xsl:if>
    					<xsl:if test="$nameCol">
    					<td><xsl:value-of select="FieldName"/></td>
    					</xsl:if>
    					<td>
    						<xsl:choose>
    							<xsl:when test="FieldValue[starts-with(., 'www.')]">
    								<a target="_blank"><xsl:attribute name="href">http://<xsl:value-of select="FieldValue"/>
    								</xsl:attribute><xsl:value-of select="FieldValue"/>
    								</a>
    							</xsl:when>
    							<xsl:when test="FieldValue[starts-with(., 'http:')]">
    								<a target="_blank"><xsl:attribute name="href"><xsl:value-of select="FieldValue"/>
    								</xsl:attribute><xsl:value-of select="FieldValue"/>
    								</a>  
    							</xsl:when>
    							<xsl:when test="FieldValue[starts-with(., 'https:')]">
    								<a target="_blank"><xsl:attribute name="href"><xsl:value-of select="FieldValue"/>
    								</xsl:attribute><xsl:value-of select="FieldValue"/>
    								</a>  
    							</xsl:when>
    							<xsl:when test="FieldValue[starts-with(., '\\')]">
    								<a target="_blank"><xsl:attribute name="href"><xsl:value-of select="FieldValue"/>
    								</xsl:attribute><xsl:value-of select="FieldValue"/>
    								</a>  
    							</xsl:when>
    							<xsl:when test="FieldValue[starts-with(., '&lt;img ')]">
    								<xsl:value-of select="FieldValue" disable-output-escaping="yes" />
    							</xsl:when>
    							<xsl:otherwise>
    								<xsl:value-of select="FieldValue"/>
    							</xsl:otherwise>
    						</xsl:choose>
    					</td>
    				</tr>
    				</xsl:for-each>
    			</table>
    			</font>
    		</body>
    		</html>
    	</xsl:template>
    </xsl:stylesheet>

  2. #2
    Join Date
    Jul 2005
    Location
    USA
    Posts
    912
    Could it be that IE is reading it's proprietary attributes in the <body> tag?

    Code:
     leftmargin="0" topmargin="0" bottommargin="0" rightmargin="0"
    Firefox does not honor those as well it shouldn't as they aren't valid markup. But IE will.

    Try:

    Code:
     <body style="margin:0;padding:10px">
    Bitter web veteran

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles