This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xml and javascript
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: "stevenson" <stevenson at epr dot footman-walker dot com>
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 14 Feb 2002 08:54:37 +0000
- Subject: [xsl] Re: xml and javascript
- Organization: Jeni Tennison Consulting Ltd
- References: <OOEMLIMIIBLDEKIKOHJAOEJJCBAA.stevenson@epr.footman-walker.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Stevenson,
> i have this javascript:
>
> if( document.FilterForm.Search.value != "" )
> {
> iSearch = document.FilterForm.Search.value;
> sFilterString = sFilterString + "[" +
> "contains(Description, iSearch)" + "]"
> alert( iSearch )
> }
>
> what am trying to do is pass the value of iSearch in to my contains
> function but doesn't seem to pick it up. What could be the problem?
You're currently adding the string "[contains(Description, iSearch)]"
to your sFilterString rather than inserting the value of the iSearch
variable. You need:
sFilterString = sFilterString + "[" + "contains(Description, " +
iSearch + ")" + "]"
I hope that fixes it,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list