This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Question regarding XSL and Javascript


> I am trying to get a dynamic Javascript URL generated by XSL, but the
> code keeps getting stuck with the parser. I went through the FAQs and
> archives and read the messages about AVT and using
> disable-output-escaping. Problem is that none of these techniques work
> with the link. A sample of the code is shown below -
>
>         <a
> href="javascript:window.parent.openWorkWindow('customerWorkWindow17',
> 'Household Details by Member',
> 'http://localhost/testpage/servlet/RequestHandler?ActionID=Fin
dHousehold%26CustomerID=123001%26DISFunction=Retrieve%26DISHtml=/presentatio
ns/html/MemberDetail.HTM')">

I would suggest not trying to generate a complex JavaScript statement like
this inside an href attribute. Instead, generate a call on a function,
specifying as little as possible in the arguments - only those things that
strictly vary from one call to the next. Then put the call to openWorkWindow
inside a JavaScript function that you include in a <script> section in the
output HTML document.

I'm not saying that you can't get it to work the way you are doing it, I'm
just saying that I've found it's easier to do it the way I suggest.

Mike Kay


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]