Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
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 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 September 10th, 2008, 06:00 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default Hyperlink Targeturl to open within the curr frame

Hi, I need help please.
I have a page with a stylesheet that is read from an aspx form.

On the form I have an hyperlink object - which iIwant the Targeturl to open within the current frame where the hyperlink object is in.

I read that i need to set it in my target="frame name"

but i don't know what the current frame name is.

or any other idea on how i can open the hyperlink's Targeturl within the current frame.


Please Help...

Regards

 
Old September 10th, 2008, 06:36 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

The default IS to open in the current frame, so I don't see what the problem is. You don't mention what it currently IS doing, only what you want it to do.

See the following for a list of standard values: http://www.htmlcodetutorial.com/linking/_A_TARGET.html



/- Sam Judson : Wrox Technical Editor -/
 
Old September 10th, 2008, 06:43 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

It's always simpler to answer questions if you can show a sample of the XML input and the corresponding (HTML) output that you want to produce.

Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference
 
Old September 10th, 2008, 06:47 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Thanks for the assist...
The aspx page has an stylesheet with the hyperlink object:
the properties are Targeturl which works & the target, i tried _parent etc.

I have an navigation bar on selection the aspx page open below it, but when i click my hyperlink it opens on the entire current page with no navigation bar like it's a new page within the current window.

I want it to display where my objects was below the navigation bar.
Is there way I can create an frameset wthin the current context onclick of hyperlink.

Please help.

 
Old September 10th, 2008, 06:51 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

This isn't even an XSLT question is it?

/- Sam Judson : Wrox Technical Editor -/
 
Old September 10th, 2008, 07:02 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default

<xsl:template name="Hyperlink">
  <xsl:param name="Name" />
  <xsl:param name="Attributes" />
  <xsl:element name="asp:Hyperlink">
    <xsl:attribute name='id'><xsl:value-of select='$Name' /></xsl:attribute>
    <xsl:attribute name='runat'>server</xsl:attribute>
    <xsl:attribute name='navigateurl'>http://test</xsl:attribu
    <xsl:attribute name='target'></xsl:attribute>

 </xsl:element>
</xsl:template>

Is there a way of building frame so that I can set the object target

 
Old September 10th, 2008, 07:11 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

OK, its quite obvious now that when you say 'current frame' you actually mean 'not the current frame, but the one below this frame'.

The 'current frame' is the one which contains the navigation bar. This so called 'other frame' will be the one containing the stuff below the navigation bar.

Now, assuming these are actually two separate frames there will be some HTML somewhere that looks like this:

<frameset>
   <frame ....>
   <frame id="mainFrame" ...>
</frameset>

What you need to put in the "target" property of your attribute is whatever is in the "id" attribute of your frame. If the frame doesn't have an ID then you'll have to give it one, else there is no way to target it.

/- Sam Judson : Wrox Technical Editor -/
 
Old September 10th, 2008, 07:48 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default


<FRAMESET ROWS="50%">
    <FRAME id="mainFrame"></FRAME>
</FRAMESET>

I inserted this on top before my table started &

<xsl:attribute name='target'>mainFrame</xsl:attribute>
now i'm trying to add a src: but xslt does not like the "&" in the link
<FRAME src="http://srv08-zz119/myReportItem.aspx?g=6&id=106" id="mainFrame"></FRAME>

i don't know if this will work - have to get it going
what is the code for "&"?

 
Old September 10th, 2008, 07:56 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

&amp;

/- Sam Judson : Wrox Technical Editor -/
 
Old September 10th, 2008, 08:09 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default

unfortunatley it does not work - it still opens a new browser

i inserted this right on top before my body
<FRAME src="http://srv08-zz119/myReportItem.aspx?g=6&amp;id=106" id="mainFrame">

<xsl:attribute name='target'>mainFrame</xsl:attribute>

Please help - i don't know what to do....






Similar Threads
Thread Thread Starter Forum Replies Last Post
HyperLink in a gridview contro to open word docmen Otoniel ASP.NET Espanol 0 October 7th, 2008 01:11 AM
Open Crystal Report from hyperlink aspBegineer83 Crystal Reports 0 November 24th, 2007 02:15 PM
How to find the depth with respect to curr context dsekar_nat XSLT 1 March 28th, 2006 07:28 AM
Call right frame Page_Load event from left frame. ochanarachel Classic ASP Basics 0 January 28th, 2005 05:13 AM
Open framed html and target frame fs22 Javascript How-To 2 May 5th, 2004 04:25 PM





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