LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 12 Sep 2006 17:06:42 -0600
Reply-To:     Alan Churchill <SASL001@SAVIAN.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Alan Churchill <SASL001@SAVIAN.NET>
Subject:      Re: SAS/Intrnet - Javascript not playing nicely
Comments: To: "Barz, Ken" <Ken.Barz@INTRADO.COM>
In-Reply-To:  <4854B9275A03E34FA5DFB1138CCA0E286B4AFB@incomx02.lgmt.trdo>
Content-Type: text/plain; charset="iso-8859-1"

Ken,

I'm still not completely following the issue here and it is tough to recreate. Nonetheless, have you tried tripling up the single quotes or looking at the source to see what is being returned?

Here's the tripling I'm talking about:

put '<td><select name="permit" onChange="return sg_onchange(' "&session" ',''' supergroup ''','"&userid" ',0)">';

Alan

Alan Churchill Savian "Bridging SAS and Microsoft Technologies" www.savian.net

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Barz, Ken Sent: Tuesday, September 12, 2006 3:59 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: SAS/Intrnet - Javascript not playing nicely

Well, it is going stand-alone from the web page to the javascript based on the onchange event, other than needing the macro variables and the one text variable out of the data step. However, the onchange already uses double quotes (e.g. onchange="return sg_onchange(...)" ) So if I try submitting with double quotes around my parameter (or without them around the function call) it seems to lose itself.

I'll check out the SASEncase and whether the sysadmins will allow it on the production server (since they're a bit touchy about things like that.)

Thanks

-----Original Message----- From: Alan Churchill [mailto:SASL001@savian.net] Sent: Tuesday, September 12, 2006 3:41 PM To: Barz, Ken; SAS-L@LISTSERV.UGA.EDU Subject: RE: SAS/Intrnet - Javascript not playing nicely

Ken,

Do you have it working standalone without going through SAS?

I would use the tool on my site called SASEncase. That will handle the quoting for you (and make your life easier). If it works standalone, then double quoting things should be fine.

Alan

Alan Churchill Savian "Bridging SAS and Microsoft Technologies" www.savian.net

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Barz, Ken Sent: Tuesday, September 12, 2006 3:20 PM To: SAS-L@LISTSERV.UGA.EDU Subject: SAS/Intrnet - Javascript not playing nicely

G'day all,

I'm trying to figure out how to get SAS/Intrnet and Javascript to play nice together. Below I have the start of my data step that generates part of my webpage and calls a javascript function. The problem here is that the variable supergroup is text and when I change my select box, invoking the sg_onchange function, javascript expects it to be in single quotes. (I've tried doing it in single and double quotes next to the commas, both by themselves and using all the javascript escape sequences, but javascript always complains about invalid characters. I've also tried %nrstr to put in the single quotes but it doesn't like that either. Does anyone know of a way to get this to work correctly?

Thanks,

Ken

data _null_;

set supergroups;

file _webout;

if access = 'Y' then do;

put '<tr>';

put '<td><select name="permit"

onChange="return sg_onchange(' "&session" ',' supergroup ',' "&userid" ',0)">';

put '<option value="N' supergroup '">No </option>';

put '<option value="Y' supergroup '" selected>Yes</option>';

put '</select>';

&userid evaluates as numeric. &session is text, but I add on the single quotes in a previous call symput. So it's just supergroup that I need to have evaluate dynamically.

Ken Barz

Software Engineer

Intrado Metrics

Intrado Inc.

1601 Dry Creek Drive

Longmont, CO 80503

direct: 720.494.5868

pager: 303-581-7667

fax: 720.494.6600

email: ken.barz@intrado.com

Intrado.(r)

www.intrado.com <file:///C:\Documents%20and%20Settings\kbarz\Application%20Data\Microsof t\Signatures\www.intrado.com>

ATTENTION:

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify Intrado Inc. immediately at 720.494.5800 and destroy all copies of this message and any attachments.


Back to: Top of message | Previous page | Main SAS-L page