Howard,


I believe that you need to change:
requiredMessage = "message=\"" & arDataLine[6];


to:
requiredMessage = "message=\"" + arDataLine[6] + "\"";


you use + to merge strings in _javascript_. (I also added the closing ").


Steve

-----Original Message-----
From: Owens, Howard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 08, 2003 5:34 PM
To: CF-Talk
Subject: RE: Writing Scripts for HomeSite+

Ray,  Can you help me with another issue ...

I get an error if I do this:

if (arDataLine[5] == "yes") {
requiredMessage = "message=\"" & arDataLine[6];
}
else { requiredMessage = ""; }

But if I do this, it's fine:

if (arDataLine[5] == "yes") {
requiredMessage = arDataLine[6];
}
else { requiredMessage = ""; }

Or this is fine:

if (arDataLine[5] == "yes") {
requiredMessage = "message=\"";
}
else { requiredMessage = "test"; }

What I'm trying to do is insert this constructed string into a nother series
of string, via

doc.InsertText(requiredMessage, true) &

Any ideas?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Owens
Internet Operations Coordinator
Ventura County Star / E.W. Scripps Co.
www.venturacountystar.com
[EMAIL PROTECTED]
AIM: GoCatGo1956
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> -----Original Message-----
> From: Raymond Camden [SMTP:[EMAIL PROTECTED]
> Sent: Tuesday, October 07, 2003 6:21 AM
> To: CF-Talk
> Subject: RE: Writing Scripts for HomeSite+
>
> You need to actually write to the document. Consider this example:
>
> function Main() {
> var str;
> var app;
> var doc;
>
> str = "Jedi Master Whopper Supreme";
> app = Application;
> doc = app.ActiveDocument;
> doc.InsertText(str, true);
> }
>
> The last two lines in particular are what you are missing.
>
>
>   _____  
>
>
  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to