Subject: Re: [xsl] XML and JavaScript1.2 [window.open(url,target,options)] :( From: "Roger Sutro" <rsutro@xxxxxxx> Date: Tue, 30 Jan 2001 12:25:31 -0500 |
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: [xsl] 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&showonly=1&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&showonly=1&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&showonly=1&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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XML and JavaScript1.2 [wi, Roger Sutro | Thread | [xsl] Any XSL using calls to JavaSc, frank Stein |
Re: [xsl] XML and JavaScript1.2 [wi, Roger Sutro | Date | Re: [xsl] Parameters with Xalan 1.2, David Carlisle |
Month |