[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML and JavaScript1.2 [window.open(url,target,opti

Subject: Re: XML and JavaScript1.2 [window.open(url,target,options)] :(
From: "Roger Sutro" <rsutro@xxxxxxx>
Date: Tue, 30 Jan 2001 12:25:31 -0500
onclick url target
Hi:

Here is a work-around I put together for a recent project;
this is inline within a stylesheet

<input type="button" value="Add Project"

onClick="window.open('http://better.ebt.com/enhancements_serve/scripts/datab
ase/modify_table_fields.htm','new_project_window','width=400,height=450,scro
llbars=yes,resizable=yes');">
</input>

Here's that section. It's called into another stylesheet with an include:

----------------------------------------------------------------------------
-----


<xsl:stylesheet version="1.0" xmlns:fba="http://www.ebt.com/2000/Forms/"
fba:stylesheet-id="projects" fba:stylesheet-name="Basic Stylegroups"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="projects">
<tr><td align="left">
<font color="6666FF"><b>Projects: </b></font>
<br /><a onClick="javascript:location.reload()">
<img  src="http://better.ebt.com/betterments_serve/images/reloadpage.gif"
alt="reload page" /></a><br />
<input type="button" value="Add Project"

onClick="window.open('http://better.ebt.com/betterments_serve/scripts/databa
se/modify_table_fields.htm','new_project_window','width=400,height=450,scrol
lbars=yes,resizable=yes');">
</input>

</td></tr>
</xsl:template>
</xsl:stylesheet>

----------------------------------------------------------------------------
-----

Thanks,
Roger Sutro, eBT

----- Original Message -----
From: "Gunars Rodins" <uwix@xxxxxxx>
To: "xsl" <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, January 30, 2001 11:48 AM
Subject:  XML and JavaScript1.2 [window.open(url,target,options)] :(


> Hello, i am newbie in XSL thema.
> Please reply private to this mail, i dont wanna to spam your list with
> such elementar things.
>
> I have following problem. I have rendered XML data and want to show
> those data.
> Thouse data countains information for URLs (ID of record), and i wanna
> to open new browser window without any visual controls like navibar,
> statusbars.
> This is avaible only starting JavaScript 1.2, but it seems that XML (on
> IE5.5) always try to use JavaScript 1.0, which dont have additional
> parametrs to function to window.open().
> What i need is:
>
> window.open("show.php?act=SHOW&amp;showonly=1&amp;pid=<xsl:value-of
> select="id"/>", "simpleshow",
>
"toolbar=0,location=0,scrollbars=1,directories=0,status=0,menubar=0,resizabl
e=1,width="+550+",height="+550+",left="+(screen.width-550)/2+",top="+(screen
.height-550)/2)
>
> *) i have tried that write in function and call them in right moment:
> ------------------------------------
>     <xsl:script language="JavaScript1.2">
>  function myFunction(eee) {
>
> window.open("sk_pers_top.php?act=SHOW&amp;showonly=1&amp;pid="+eee,
> "pers_izz_alt_win",
>
"toolbar=0,location=0,scrollbars=1,directories=0,status=0,menubar=0,resizabl
e=1,width="+550+",height="+550+",left="+(screen.width-550)/2+",top="+(screen
.height-550)/2)
>
>  }
>     </xsl:script>
>
> <<<<<SKIPPED>>>>
>
>    <a class="ref">
>     <xsl:attribute name="onclick">
>          myFunction(<xsl:value-of select="id"/>)
>   </xsl:attribute>
>             <xsl:value-of select="vards"/>
>        </a>
> -------------------------------------------------------
> It doesnt work, just clicking on href the says:
> "Error: Type mismatch: 'MyFunction'.
> and i cant locate the problem.
>
> *) Then i have tried simply integrate window.open in attribute inline.
> -----------------------------------------
>    <a class="ref">
>     <xsl:attribute name="onClick">
>
> window.open("show.php?act=SHOW&amp;showonly=1&amp;pid=<xsl:value-of
> select="id"/>", "simpleshow",
>
"toolbar=0,location=0,scrollbars=1,directories=0,status=0,menubar=0,resizabl
e=1,width="+550+",height="+550+",left="+(screen.width-550)/2+",top="+(screen
.height-550)/2)
>
>   </xsl:attribute>
>              <xsl:value-of select="name"/>
>           </a>
>
>
> -------------------------------------------------
> Error: Cannot use parentheses when calling a Sub
> It seems like, that it will use only JavaScript1.0.
>
> Please help. I have tried out everything i know. I think for you - gurus
>
> , that is no problem.
>
> With best wishes and hope, Uwix.
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.