Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Ajax ISBN: 978-0-471-77778-6
This is the forum to discuss the Wrox book Professional Ajax by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780471777786
Important: For the new 2nd edition of this book, please post here instead: [url="http://p2p.wrox.com/forum.asp?FORUM_ID=307"]http://p2p.wrox.com/forum.asp?FORUM_ID=307[/url]
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax ISBN: 978-0-471-77778-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 14th, 2008, 09:51 AM
Registered User
 
Join Date: Aug 2008
Location: new york, NY, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to asadallahi Send a message via Yahoo to asadallahi
Default XSLT problem with IE 7

hi

I am using zXML library from NCZOnline

i write an XSl document like:
Code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="accountinfo/account">
<form id="form1" name="form1" method="post" action="">
        <div id="idDivMainContentMijnProfiel">
          <div id="idDivContentMijnProfiel">
                  <xsl:variable name="xslVarFirstName" select="@firstname" />
                <xsl:variable name="xslVarSurName" select="@surname" />
                <xsl:variable name="xslVarAddress" select="@address" />
                <xsl:variable name="xslVarPostCode" select="@postcode" />
                <xsl:variable name="xslVarCity" select="@city" />
                <xsl:variable name="xslVarEmail" select="@email" />

                  <p>
                    <label>fistname :</label>
                    <input name="txtVoornaam" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarFirstName}" />
                     <label>lastname:</label>
                    <input name="txtAchternaam" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarSurName}"   />
                </p>
                  <p>
                       <label>Address :</label>
                    <input name="txtAdres" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarAddress}"/>
                     <label>Postcode :</label>
                    <input name="txtPostcode" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarPostCode}"/>

                </p>                                
                  <p>
                       <label>city :</label>
                    <input name="txtPlaats" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarCity}"/>
                </p>
                  <p>
                       <label>Email :</label>
                    <input name="txtEmail" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarEmail}" />
                </p>                                
                  <p>

               </p>                
             </div>


    </div>

</form>
</xsl:template>
</xsl:stylesheet>
and this html document:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>seeker</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />



<script language="javascript" type="text/javascript" src="js/zxml.js"></script>
<script language="javascript" type="text/javascript" src="js/mootools.js"></script>

<script language="javascript" type="text/javascript">
var flag=false;
window.addEvent('domready', function() {
            var req = new Request({url:'ulr.php',
                onSuccess: function(txt) {
                },
                onFailure: function() {
                }
            });
///////////////////////////////////////////////
        var objXml = zXmlDom.createDocument();
        objXml.async=false;
        str='<result><accountinfo logintype="seeker"><account address="" cellphoneNr="" city="" dateOfBirth="1970-01-01" desiredbranche="3" email="avc@gmail.com" firstname="david" gender="male" highesteducation="3" idcode="1" phoneNr="" photodisplaypref="0" postcode="" prefix="" publicFlag="" status="A" surname="jackson" userType="C"/></accountinfo></result>';
        objXml.loadXML(str);

        var objXslDom=zXmlDom.createDocument();
        objXslDom.async=false;
        objXslDom.load('sampleXsl.xsl');
        var strOutPut=zXslt.transformToText(objXml, objXslDom);


        strAccountResponse=zXPath.selectSingleNode(objXml.documentElement,"accountinfo/account");
        strDateOfBirth=strAccountResponse.getAttribute('dateOfBirth');
        //alert(strDateOfBirth);
        $('idDivContent').innerHTML=strOutPut;    
        flag =true;
///////////////////////////////////////////////
});//end of domready
</script>
</head>

<body>


  <div id="idDivContent">
</div>

</body>
</html>
i works fine in FireFox 2, 3 , InternetExplorer 6

but does not work in IE 7

www.itgate.ir
 
Old August 15th, 2008, 03:20 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

What does "not work" mean? An error, unexpected output, no output? Can you post a sample that I can test, one that doesn't need any external dependencies other than zXml?

--

Joe (Microsoft MVP - XML)
 
Old August 15th, 2008, 09:26 AM
Registered User
 
Join Date: Aug 2008
Location: new york, NY, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to asadallahi Send a message via Yahoo to asadallahi
Default

hi these are Screen shots of the IE 6 and 7 opera and firefox

ie7 (error : no output ):
http://i524.photobucket.com/albums/c...0061/ie7-1.png

ie6 (works fine) :
http://i524.photobucket.com/albums/c...0061/ie6-1.png

opera (no output !!!):
http://i524.photobucket.com/albums/c...1/operan-1.png

firefox 3.0.1(works fine):
http://i524.photobucket.com/albums/c...61/firefox.png

www.itgate.ir
 
Old April 9th, 2009, 09:33 AM
Registered User
 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Edit XSLT file with notepad and remove
<head>
<title />
</head>


save and try again!! It works for me!!




Similar Threads
Thread Thread Starter Forum Replies Last Post
xslt problem mickhughes XSLT 3 March 28th, 2008 05:09 AM
XSLT problem her_today XSLT 1 October 23rd, 2006 11:09 AM
dynamic xslt -> xslt creation namespace problem jkmyoung XSLT 2 July 15th, 2006 12:42 AM
XSLT problem pendyalap XSLT 4 March 24th, 2006 04:08 PM
problem with xslt superwebba BOOK: Professional Ajax ISBN: 978-0-471-77778-6 5 March 10th, 2006 01:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.