Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 21st, 2008, 10:55 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default Reload page Tooltip not work - Reload xslt file?

Hi, I need help please!
My tooltip works fine but the moment one reload the page which is set on some objects then the tooltip does not work!

How can i bypas this or make it reload the xslt file?

                <xsl:if test="Tooltip != ''">
          <a>
            <xsl:attribute name='href'>#</xsl:attribute>
            <xsl:attribute name='rel'>ttip_<xsl:value-of select='@name' /></xsl:attribute>
            <xsl:attribute name='onClick'>this.blur();return false;</xsl:attribute>
            <img src="images/help.jpg" align="texttop" border="0" style='border : none; cursor:default; outline-style:none;'></img>
          </a>
          <div id="{concat('ttip_',@name)}" class="balloonstyle" style="width: 230px; border : none;">
            <xsl:value-of select="Tooltip" />
          </div>
                </xsl:if>
        <xsl:if test="@dynamic='true'">
          <xsl:element name="asp:imageButton">
            <xsl:attribute name='id'>reload_<xsl:value-of select='@name' /></xsl:attribute>
            <xsl:attribute name='runat'>server</xsl:attribute>
            <xsl:attribute name='imageurl'>images/CFG/blank.gif</xsl:attribute>
          </xsl:element>
        </xsl:if>


Please what am i doing wrong?
Regards

Reply With Quote
  #2 (permalink)  
Old January 21st, 2008, 11:04 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,133
Thanks: 1
Thanked 189 Times in 188 Posts
Default

This is not a XSLT problem. If the HTML (or aspx in this case) that the XSLT is generating is not doing what you want you are not generating the correct ASPX.

We cannot help you if we don't understand what your output should look like. The problem is you are generating ASPX, which is then being used to generate your HTML page. You need to be able to view the ASPX file that is generated and then work out why its not working.

If you know what your ASPX should look like then tell us, and we can tell you why the XSLT isn't producing that. If you don't know what your ASPX should look like then you have a bigger problem, nothing to do with XSLT, and better to focus your energies elsewhere.


/- Sam Judson : Wrox Technical Editor -/
Reply With Quote
  #3 (permalink)  
Old January 22nd, 2008, 03:46 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi, - i think i'm kind of screwed as i think when it first loads the xslt loads the aspx file then it fine - i can refresh the page it's okay but i loose my inserted values. Once the page is loaded & click on an autopost event then it executes a javascript funtion that kind of only load the objects & not the entire page then the tooltip is out!

i know it's a lot but i have to get this going!

The xslt file loads this aspx file that - on autopost call a jscript function


[u]ASPX File</u>

<%@ Register TagPrefix="uc1" TagName="MainMenu" Src="MainMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Header.ascx" %>
<%@ Page language="c#" AspCompat="true" Codebehind="myProcessItem.aspx.cs" AutoEventWireup="false" Inherits="FlowCentric.Net.Navigator.myProcessItem" smartNavigation="True" enableViewStateMac="False" debug="False" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
    <HEAD>
        <title>myProcessItem</title>
        <META http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <LINK href="skins/<% =Session["skin"] %>/styles.css" type="text/css" rel="stylesheet">
        <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
        <meta content="C#" name="CODE_LANGUAGE">
        <meta content="JavaScript" name="vs_defaultClientScript">
        <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    </HEAD>
    <body>
        <form id="Form1" method="post" encType="multipart/form-data" runat="server">
            <uc1:header id="Header1" runat="server"></uc1:header><uc1:mainmenu id="MainMenu1" runat="server"></uc1:mainmenu>
            <table class="tbDetail" width="100%">
                <tr>
                    <td class="wrnHead"><asp:label id="lblMessage" runat="server"></asp:label></td>
                </tr>
                <tr>
                    <td class="row1"><asp:label id="lblName" runat="server"></asp:label></td>
                </tr>
            </table>
            <asp:placeholder id="plc" runat="server" EnableViewState="False"></asp:placeholder>
            <table class="tbDetail" width="100%">
                <tr>
                    <td class="wrnHead"><asp:label id="lblMessage2" runat="server"></asp:label></td>
                </tr>
            </table>
</form></body></HTML>



[u]View the source it calls the foll funtion:</u>

<script language="javascript" type="text/javascript">
<!--
    function __doPostBack(eventTarget, eventArgument) {
        var theform;
        if (window.navigator.appName.toLowerCase().indexOf("m icrosoft") > -1) {
            theform = document.Form1;
        }
        else {
            theform = document.forms["Form1"];
        }
        theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
        theform.__EVENTARGUMENT.value = eventArgument;
        theform.submit();
    }
// -->
</script>
<script type="text/javascript" src="/ig_common/20043/scripts/ig_csom.js" ></script>
<script type="text/javascript" src="/ig_common/20043/scripts/ig_webmenu.js" ></script>
<script language="JScript" type="text/JScript" src="/aspnet_client/system_web/1_1_4322/SmartNav.js"></script>



Reply With Quote
  #4 (permalink)  
Old January 22nd, 2008, 06:13 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,133
Thanks: 1
Thanked 189 Times in 188 Posts
Default

I'm sorry. I don't see a tooltip in that page anywhere. Also it looks like a standard aspx page, which submits the form via javascript to initiate the postback - thats how aspx pages work.

/- Sam Judson : Wrox Technical Editor -/
Reply With Quote
  #5 (permalink)  
Old January 22nd, 2008, 07:11 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi, the tooltip is in the xslt file which i think is called via 'tbDetail' in the aspx.

Is there a way to maybe incorporate the tooltip in the aspx page, so that the javascript can also load it again after Postback?

<xsl:if test="Tooltip != ''">
<a>
<xsl:attribute name='href'>#</xsl:attribute>
<xsl:attribute name='rel'>ttip_<xsl:value-of select='@name' /></xsl:attribute>
<img src="images/help.jpg" align="texttop" border="0"></img>
</a>

<div id="{concat('ttip_',@name)}" class="balloonstyle">
<xsl:value-of select="Tooltip" />
</div>
</xsl:if>

Thank You

Reply With Quote
  #6 (permalink)  
Old January 22nd, 2008, 07:46 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,133
Thanks: 1
Thanked 189 Times in 188 Posts
Default

tbDetail is a HTML table element - it has no ability to 'load' anything. Can you show us the (i assume) C# code or something that is actually running the XSLT transformation and where it is outputting this too?

/- Sam Judson : Wrox Technical Editor -/
Reply With Quote
  #7 (permalink)  
Old January 22nd, 2008, 08:40 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I'm not to sure what to look for?
I tried looking for *.cs files in the root! (myProcessItem.aspx.cs)
what do i look for?


Reply With Quote
  #8 (permalink)  
Old January 22nd, 2008, 08:55 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,133
Thanks: 1
Thanked 189 Times in 188 Posts
Default

You don't know? Who wrote this web site?

I think this problem is perhaps to complicated to understand over the web - you need someone to sit with you and examine your code. I suggest you go to whoever wrote this code originally, or a co-worker, or hire a consultant or something.

/- Sam Judson : Wrox Technical Editor -/
Reply With Quote
  #9 (permalink)  
Old January 22nd, 2008, 09:02 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I'm coding in Flowcentric which uses vbscript as development, the page is loaded via xslt file. I only recently started playing with the file when users wanted a proper tooltip solution.
So i thought i had it going untill an autopost back that kicked the tooltip out! I have contacted the people who wrote the site but unfortunately this will take time & no reply!

Regards

Reply With Quote
  #10 (permalink)  
Old January 22nd, 2008, 09:28 AM
mhkay's Avatar
Wrox Author
Points: 18,280, Level: 58
Points: 18,280, Level: 58 Points: 18,280, Level: 58 Points: 18,280, Level: 58
Activity: 33%
Activity: 33% Activity: 33% Activity: 33%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,934
Thanks: 0
Thanked 282 Times in 277 Posts
Default

As Sam says, it's very hard to give advice when you seem to be using a mixture of components on the client and server without clear (clear to us, anyway) architectural separations between them; and your questions seem to be more about the overall application architecture than about the XSLT coding.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reload page only once. rupen Javascript How-To 4 September 13th, 2007 07:34 AM
I want page to not reload omersharp ASP.NET 2.0 Professional 0 December 13th, 2006 07:06 PM
Reload ASP page once only pablohoney Classic ASP Basics 2 August 10th, 2005 11:19 PM
Reload Home Page qazi_nomi HTML Code Clinic 1 August 8th, 2004 01:22 PM
Reload a page mivan2001 Javascript How-To 1 July 23rd, 2003 04:25 AM



All times are GMT -4. The time now is 01:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.