Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Xpath in URL??

Status
Not open for further replies.

mike314

Programmer
Jun 24, 2003
143
US
I am having trouble with this issue. I basically want to open a window in a
new browser, but the URL that I am using is an XPath location

<a href="#" onClick="window.open({$link});return false" class="linksmall">

the trouble is that, it is not accepting that URL, and only URL's in that Xpath format.

<xsl:variable name="link" select="/Files/Sites/NewStuff[@Rank=$rank]/More/URL"/>

Sample XML
<Files>
<Sites>
<NewStuff Rank="1">
<More>
<URL>directories/images/html/test.html</URL>
</More>
</NewStuff>
</Sites>
<Files>


is there a way to do this? have the location be XPath??
 
can you use:
<a href="{$link}" target="blank" class="linksmall">
instead?

Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
never mind solved my own problem, window.open was missing the single quotes. window.open('{}');

thanks anyway
 
Yeah, That will do it ;-)

Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top