Thanks James. I think that's exactly what I was looking for. Simple when you know how... :)
I can throw away all those nasty character maps I'd tried using now. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of James Boman Sent: Monday, 7 March 2011 4:06 PM To: ozMOSS Subject: RE: Encode XSL field value Could you try something like this? <input type="button" value="Enquire Now" name="btnFormAction" onclick="var strTitle = encodeURIComponent('{@Title}'); window.location.href='../Apply/Apply.aspx?title=' + strTitle; return false;" /> From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Monday, 7 March 2011 3:00 PM To: ozMOSS Subject: Encode XSL field value Hi all, I've customised a list form with a form button that redirects to a new form where it pre-populates the Title field using the value supplied in the query string. Problem is users want to be able to use illegal characters in the title field! Can someone tell me how I can encode my Title field for this purpose? <input type="button" value="Enquire Now" name="btnFormAction" onclick="window.location.href='../Apply/Apply.aspx?title={@Title}'; return false;" /> I'm assuming I need to create another variable that holds the encoded value but not sure of the best method. <xsl:variable name="title2"> <xsl:value-of select="@Title" disable-output-escaping="yes"/> </xsl:variable> <xsl:copy-of select="$title2" /> Then use that in my query string: window.location.href='../Apply/Apply.aspx?title={$title2}' But I can't seem to get this working as expected. Maybe the order or placement in the template? : \ Kind regards, Paul Noone --------------------------------------------------- Online Developer/SharePoint Administrator Information Communication and Technology Catholic Education Office, Sydney p: (02) 9568 8461 f: (02) 9568 8483 e: paul.no...@ceosyd.catholic.edu.au<mailto:paul.no...@ceosyd.catholic.edu.au> w: http://www.ceosyd.catholic.edu.au/
_______________________________________________ ozmoss mailing list ozmoss@ozmoss.com http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss