Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Syntex help required

LEGEND ,
Feb 07, 2008 Feb 07, 2008

Copy link to clipboard

Copied

Can someone help with the syntex on this please?

I'm using CDONTS to send emails.
For the Body of the email im using the code below:
The bodystring is made up from the form fields.

ActionID: (RSLast.Fields.Item("ActionID").Value) & BodyString

When i use the code, i get this error
Microsoft VBScript compilation (0x800A0401)
Expected end of statement

If i remove the ActionID: text all works well.

I know im close but how to i write the correct syntex ?

Thanks
Andy




TOPICS
Server side applications

Views

334
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 07, 2008 Feb 07, 2008

Copy link to clipboard

Copied

OK - I have it working :-)
objCDO.Body = "ActionID: " & (RSLast.Fields.Item("ActionID").Value) &
BodyString

But now i need to have a link from the ActionID - So something like

objCDO.Body = "ActionID: " & <a
href="(RSLast.Fields.Item("ActionID").Value)"><%=(RSLast.Fields.Item("ActionID").Value)%></a>
& BodyString

But this doesn't work :-(

Help!


"Andy" <andy@work.com> wrote in message
news:fof815$hn8$2@forums.macromedia.com...
> Can someone help with the syntex on this please?
>
> I'm using CDONTS to send emails.
> For the Body of the email im using the code below:
> The bodystring is made up from the form fields.
>
> ActionID: (RSLast.Fields.Item("ActionID").Value) & BodyString
>
> When i use the code, i get this error
> Microsoft VBScript compilation (0x800A0401)
> Expected end of statement
>
> If i remove the ActionID: text all works well.
>
> I know im close but how to i write the correct syntex ?
>
> Thanks
> Andy
>
>
>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 07, 2008 Feb 07, 2008

Copy link to clipboard

Copied

Try something like this (all on one line):

objCDO.Body = "ActionID: <a href='" & (RSLast.Fields.Item("ActionID").Value)
& "'>" & (RSLast.Fields.Item("ActionID").Value) & "</a>" & BodyString


--
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com


"Andy" <andy@work.com> wrote in message
news:fofam0$kii$2@forums.macromedia.com...
> OK - I have it working :-)
> objCDO.Body = "ActionID: " & (RSLast.Fields.Item("ActionID").Value) &
> BodyString
>
> But now i need to have a link from the ActionID - So something like
>
> objCDO.Body = "ActionID: " & <a
> href="(RSLast.Fields.Item("ActionID").Value)"><%=(RSLast.Fields.Item("ActionID").Value)%></a>
> & BodyString
>
> But this doesn't work :-(
>
> Help!
>
>
> "Andy" <andy@work.com> wrote in message
> news:fof815$hn8$2@forums.macromedia.com...
>> Can someone help with the syntex on this please?
>>
>> I'm using CDONTS to send emails.
>> For the Body of the email im using the code below:
>> The bodystring is made up from the form fields.
>>
>> ActionID: (RSLast.Fields.Item("ActionID").Value) & BodyString
>>
>> When i use the code, i get this error
>> Microsoft VBScript compilation (0x800A0401)
>> Expected end of statement
>>
>> If i remove the ActionID: text all works well.
>>
>> I know im close but how to i write the correct syntex ?
>>
>> Thanks
>> Andy
>>
>>
>>
>>
>
>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 08, 2008 Feb 08, 2008

Copy link to clipboard

Copied

Hi Ken -
Thanks for taking the time to help out.
I'm afraid the code didn't quite work. The result i got in the email was

ActionID: <a href='232'>232</a>
Thanks

Andy


"Ken Ford - *ACE*" <newsgroups1@fordwebs.com> wrote in message
news:fofb4j$l51$1@forums.macromedia.com...
> Try something like this (all on one line):
>
> objCDO.Body = "ActionID: <a href='" &
> (RSLast.Fields.Item("ActionID").Value) & "'>" &
> (RSLast.Fields.Item("ActionID").Value) & "</a>" & BodyString
>
>
> --
> Ken Ford
> Adobe Community Expert - Dreamweaver
> Fordwebs, LLC
> http://www.fordwebs.com
>
>
> "Andy" <andy@work.com> wrote in message
> news:fofam0$kii$2@forums.macromedia.com...
>> OK - I have it working :-)
>> objCDO.Body = "ActionID: " & (RSLast.Fields.Item("ActionID").Value) &
>> BodyString
>>
>> But now i need to have a link from the ActionID - So something like
>>
>> objCDO.Body = "ActionID: " & <a
>> href="(RSLast.Fields.Item("ActionID").Value)"><%=(RSLast.Fields.Item("ActionID").Value)%></a>
>> & BodyString
>>
>> But this doesn't work :-(
>>
>> Help!
>>
>>
>> "Andy" <andy@work.com> wrote in message
>> news:fof815$hn8$2@forums.macromedia.com...
>>> Can someone help with the syntex on this please?
>>>
>>> I'm using CDONTS to send emails.
>>> For the Body of the email im using the code below:
>>> The bodystring is made up from the form fields.
>>>
>>> ActionID: (RSLast.Fields.Item("ActionID").Value) & BodyString
>>>
>>> When i use the code, i get this error
>>> Microsoft VBScript compilation (0x800A0401)
>>> Expected end of statement
>>>
>>> If i remove the ActionID: text all works well.
>>>
>>> I know im close but how to i write the correct syntex ?
>>>
>>> Thanks
>>> Andy
>>>
>>>
>>>
>>>
>>
>>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 08, 2008 Feb 08, 2008

Copy link to clipboard

Copied

LATEST
Andy,

That is the ActionID?

Do you have a field in that table that actually contains the URL?

--
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com


"Andy" <andy@work.com> wrote in message
news:fohgqm$4d8$2@forums.macromedia.com...
> Hi Ken -
> Thanks for taking the time to help out.
> I'm afraid the code didn't quite work. The result i got in the email was
>
> ActionID: <a href='232'>232</a>
> Thanks
>
> Andy
>
>
> "Ken Ford - *ACE*" <newsgroups1@fordwebs.com> wrote in message
> news:fofb4j$l51$1@forums.macromedia.com...
>> Try something like this (all on one line):
>>
>> objCDO.Body = "ActionID: <a href='" &
>> (RSLast.Fields.Item("ActionID").Value) & "'>" &
>> (RSLast.Fields.Item("ActionID").Value) & "</a>" & BodyString
>>
>>
>> --
>> Ken Ford
>> Adobe Community Expert - Dreamweaver
>> Fordwebs, LLC
>> http://www.fordwebs.com
>>
>>
>> "Andy" <andy@work.com> wrote in message
>> news:fofam0$kii$2@forums.macromedia.com...
>>> OK - I have it working :-)
>>> objCDO.Body = "ActionID: " & (RSLast.Fields.Item("ActionID").Value) &
>>> BodyString
>>>
>>> But now i need to have a link from the ActionID - So something like
>>>
>>> objCDO.Body = "ActionID: " & <a
>>> href="(RSLast.Fields.Item("ActionID").Value)"><%=(RSLast.Fields.Item("ActionID").Value)%></a>
>>> & BodyString
>>>
>>> But this doesn't work :-(
>>>
>>> Help!
>>>
>>>
>>> "Andy" <andy@work.com> wrote in message
>>> news:fof815$hn8$2@forums.macromedia.com...
>>>> Can someone help with the syntex on this please?
>>>>
>>>> I'm using CDONTS to send emails.
>>>> For the Body of the email im using the code below:
>>>> The bodystring is made up from the form fields.
>>>>
>>>> ActionID: (RSLast.Fields.Item("ActionID").Value) & BodyString
>>>>
>>>> When i use the code, i get this error
>>>> Microsoft VBScript compilation (0x800A0401)
>>>> Expected end of statement
>>>>
>>>> If i remove the ActionID: text all works well.
>>>>
>>>> I know im close but how to i write the correct syntex ?
>>>>
>>>> Thanks
>>>> Andy
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>
>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines