24/7 Support - 800.608.6482

Miva Merchant Community Forums

Page 1 of 2 1 2 LastLast

Thread: Keeping textarea content formatted when sending form results to

  1. #1
    Guest

    Default Keeping textarea content formatted when sending form results to



    My online form's results are submitted to the email.
    Everything is fine, but the <textarea>
    If the user types in returns in it, they are not being "shown" in the email,
    i.e. it comes out as one long line, instead of duplicating the formatting
    the user used. What can be done to keep the formatting of the <textarea> in
    th email results?
    Thanks,

    Valeria


  2. #2
    Guest

    Default Keeping textarea content formatted when sending form



    It most likely has to do with the use of the MIVA
    STANDARDOUTPUTLEVEL. The standard output level needs to be set so
    that the white space (returns, tabs, etc.) is not being compressed.

    Something similar to this should work:

    <MIVA STANDARDOUTPUTLEVEL = "text, html">
    <MvSMTP ...>
    ...
    </MvSMTP>
    <MIVA STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">


    A similar technique is needed when displaying a text area:

    <MIVA STANDARDOUTPUTLEVEL = "text, html">
    <textarea name="text" rows="6" cols="50" wrap="virtual">
    <MvEVAL EXPR="{ g.text }">
    </textarea>
    <MIVA STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">


    lance turner


    At 2:13 PM -0600 5/20/02, Valeria Vizenberg wrote:
    >My online form's results are submitted to the email.
    >Everything is fine, but the <textarea>
    >If the user types in returns in it, they are not being "shown" in the email,
    >i.e. it comes out as one long line, instead of duplicating the formatting
    >the user used. What can be done to keep the formatting of the <textarea> in
    >th email results?
    >Thanks,
    >
    >Valeria


  3. #3
    Guest

    Default MvCall & Cookies



    I'm trying to use Miva Mia to interface with a site via MvCall and have
    reached a bit of a stumbling block.

    I first have to signin to the site with a userid and a password. The site
    I'm accessing then wants to send me a cookie, but can't, saying that my
    browser won't accept cookies. I'm using IE 6 and it is set to accept
    cookies.

    This happens with both GET and POST versions of the MvCall. Below are
    simplified versions of the GET and POST code I'm using.

    Is there any way in Miva that I can accept the cookie?

    Thanks

    Mike McBee
    Signature House

    ********* POST VERSION *********
    <mvassign name="a" value="123">
    .
    .
    .
    <mvassign name="j" value="abc">
    <mvcall
    action="http://abc.com/signin.dll"
    method="post"
    fields="a,...,j">
    <mveval expr="{callvalue}">
    </mvcall>


    ********* GET VERSION *********
    <mvcall
    action="http://abc.com/fff.dll?a=123...&j=abc"
    method="get">
    <mveval expr="{callvalue}">
    </mvcall>


  4. #4
    Guest

    Default MvCall & Cookies



    When using MvCall, it is the server, not the browser, who sends the http request
    and therefore you have to manipulate the http header so that it passes the
    cookie value when sending the request to the remote server. You can either copy
    the cookie from your browser's cookie folder or parse the MvCALL HTTP header to
    get a new one. Some details about HTTP header manipulation are available here:

    http://mivo.truxoft.com/art0032.htm

    Ivo
    http://mivo.truxoft.com


    -----Original Message-----
    From: Signature House

    I'm trying to use Miva Mia to interface with a site via MvCall and have
    reached a bit of a stumbling block.

    I first have to signin to the site with a userid and a password. The site
    I'm accessing then wants to send me a cookie, but can't, saying that my
    browser won't accept cookies. I'm using IE 6 and it is set to accept
    cookies.

    This happens with both GET and POST versions of the MvCall. Below are
    simplified versions of the GET and POST code I'm using.

    Is there any way in Miva that I can accept the cookie?

    Thanks

    Mike McBee
    Signature House

    ********* POST VERSION *********
    <mvassign name="a" value="123">
    .
    .
    .
    <mvassign name="j" value="abc">
    <mvcall
    action="http://abc.com/signin.dll"
    method="post"
    fields="a,...,j">
    <mveval expr="{callvalue}">
    </mvcall>


    ********* GET VERSION *********
    <mvcall
    action="http://abc.com/fff.dll?a=123...&j=abc"
    method="get">
    <mveval expr="{callvalue}">
    </mvcall>




  5. #5
    Guest

    Default Another odditiy with time functions in the compiler



    (somehow this one didn't make it to the list yesterday, so here it comes
    again...)

    Hi,

    I came across another small disfunction of dyn_time_t and dyn_tm_usec: When
    used compiled within an MvCALL tag, they don't return any values (at least
    not in Windows).

    <MvCALL ACTION = "http://somewherelse.com/something.htm" METHOD = "GET">
    <MvEVAL EXPR = "{ dyn_time_t }" >.<MvEVAL EXPR = "{ dyn_tm_usec }" > // This
    returns nothing

    do something useful...

    </MvCALL>

    Outside the MvCALL or uncompiled they work just fine.

    Markus
    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (<A HREF =/"http://www.grisoft.com)/">http://www.grisoft.com)</A>.
    Version: 6.0.362 / Virus Database: 199 - Release Date: 5/7/2002


  6. #6
    Guest

    Default Keeping textarea content formatted when sending form



    Thanks everybody for responding.

    info, you were right about the wrap propertyof <textarea>. I've looked it up
    in MSDN library, and it seems like "hard" is the appropriate one to use
    since "Text is displayed with wordwrapping and submitted with soft returns
    and line feeds." (a quote from msdn). The problem is ... it is not enough to
    make the thin work. I've tried all of the properties just in case, but still
    did not get the desired result.

    Margo and Lance seem to be pointing the same thing out - <MIVA
    STANDARDOUTPUTLEVEL = "text, html"> , but somehow it did not work for me.
    I already had the following in my .mv file:

    <MVSMTP MAILHOST="smtp.nimlok.net" TO="valeriav@nimlok.com" FROM="{Email}"
    SUBJECT="Services and Rental Information Request">
    MIME-Version: 1.0
    Content-Type: text/html; charset="iso-8859-1"

    <html> ... body of the message here ... </html>

    but then added the tag anyway.
    I don't know if I did anything else wrong, but it did not work. :-(((

    I hardly ever deal with MIVA, so I do not know much about it at all.

    May I post an entire file I use to send the e-mail? May you can spot an
    error?

    form_us.mv
    --------------------------------------------------------------------
    <HTML>
    <HEAD>
    <TITLE>Send Mail </TITLE>
    </HEAD>
    <BODY link="#336699" vlink="#336699" alink="#336699" bgcolor="white">
    <center>
    [img]<A HREF =[/img]">http://www.nimlok.net/ecommerce/forms/images/logo.gif"></A>
    </center>




    <font face="Arial, Helvetica, sans Serif">
    <MvIF EXPR = "{ NOT(g.realname) }">
    <center>
    <center>
    <font face="Arial, Helvetica, sansSerif" size="3">
    You did not fill all the required fields (<span
    class="ast">*</span>).


    return to form
    </font>
    </center>
    <MvELSE>
    <MvIF EXPR="{NOT Validate_Email(g.Email)}">
    <MvFUNCTION NAME="Validate_Email" PARAMETERS="email" STANDARDOUTPUTLEVEL="">
    <MvASSIGN NAME="l.valid" VALUE="">
    <MvASSIGN NAME="l.email" VALUE="{ltrim(rtrim(l.email))}">
    <MvIF EXPR="{len(l.email) GT 4 AND '@' IN l.email GT 1}">
    <MvASSIGN NAME="l.valid" VALUE="1">
    </MvIF>
    <MvFUNCRETURN VALUE="{l.valid}">
    </MvFUNCTION>
    <center>
    Please enter a valid email address


    return to form
    </center>
    <mvelse>
    <MIVA standardoutputlevel="html,text">
    <MVSMTP MAILHOST="smtp.nimlok.net" TO="valeriav@nimlok.com" FROM="{Email}"
    SUBJECT="Services and Rental Information Request">
    MIME-Version: 1.0
    Content-Type: text/html; charset="iso-8859-1"

    <html>
    <head>
    <title>Services and Rental Information Request Form - US</title>
    <style type="text/css"><!--
    body, table, td { font-family: Arial, Helvetica, Sans Serif; font-size:
    12px;}
    .ast {color: ff6666}-->
    </style>
    </head>

    <body bgcolor="white">

    <p style="text-align: center; font-family: arial,helvetica,sans-serif;
    font-size: 16px;">Services and Rental Information Request Form -
    US
    </p>

    <form name="frm">

    <table border="0" cellpadding="0" cellspacing="5">
    <tr>
    <td>Distributor Name: <mveval expr="{realname}"></td>

    <td>Distributor Code: <mveval expr="{DistribCode}"></td>
    </tr>

    <tr>
    <td>Distributor Contact: <mveval expr="{DistribContact}"></td>
    <td>Distributor Email: <mveval expr="{Email}"></td>
    </tr>

    <tr>
    <td>Rental design Number: <mveval expr="{RentalDesNumber}"></td>
    <td>Return Quotation by: <mveval expr="{ReturnQuotBy}"></td>
    </tr>

    <tr>
    <td colspan="2"><hr noshade width="100%"></td>
    </tr>

    <tr>
    <td colspan="2" class="header">Client</td>
    </tr>

    <tr>
    <td colspan="2"> <mveval expr="{ClAddress}"></td>
    </tr>
    </table>

    </center>
    </form>

    </body>
    </html>



    </MvSMTP>
    <center>
    Your request had been received.

    We will process it as soon as possible.

    </center>
    </MvIF>
    </MvIF>
    </BODY>
    </HTML>
    ----------------------------------------------------------------

    and the form itself can be found at:
    <A HREF ="http://www.nimlok.net/ecommerce/gsp/form_us.htm">http://www.nimlok.net/ecommerce/gsp/form_us.htm</A>
    i currently do not have all the fields set in the .mv file - just a couple
    for the test, but that includes the textarea of "Client Address".

    can anybody help?

    Thanks.










    > From: lance turner <me@latu.net>
    > Date: Tue, 21 May 2002 10:57:37 -0400
    > To: Valeria Vizenberg <valeriav@nimlok.com>, MivaScript List
    > <miva-users@miva.com>
    > Subject: Re: [meu] Keeping textarea content formatted when sending form
    > results to email
    >
    > It most likely has to do with the use of the MIVA
    > STANDARDOUTPUTLEVEL. The standard output level needs to be set so
    > that the white space (returns, tabs, etc.) is not being compressed.
    >
    > Something similar to this should work:
    >
    > <MIVA STANDARDOUTPUTLEVEL = "text, html">
    > <MvSMTP ...>
    > ...
    > </MvSMTP>
    > <MIVA STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">
    >
    >
    > A similar technique is needed when displaying a text area:
    >
    > <MIVA STANDARDOUTPUTLEVEL = "text, html">
    > <textarea name="text" rows="6" cols="50" wrap="virtual">
    > <MvEVAL EXPR="{ g.text }">
    > </textarea>
    > <MIVA STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">
    >
    >
    > lance turner
    >
    >
    > At 2:13 PM -0600 5/20/02, Valeria Vizenberg wrote:
    >> My online form's results are submitted to the email.
    >> Everything is fine, but the <textarea>
    >> If the user types in returns in it, they are not being "shown" in the email,
    >> i.e. it comes out as one long line, instead of duplicating the formatting
    >> the user used. What can be done to keep the formatting of the <textarea> in
    >> th email results?
    >> Thanks,
    >>
    >> Valeria
    >


  7. #7
    Guest

    Default New built-in functions tokenize & miva_array_collapse(array)



    I might be missing something really simple, but for some obscure reasons I
    can't get the new tokenize & miva_array_collapse(array) functions to work.
    Has anybody short real-life examples of how to use them?

    The instructions in the readme file are really not very clear.

    Thanks,

    Markus
    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (<A HREF =/"http://www.grisoft.com)/">http://www.grisoft.com)</A>.
    Version: 6.0.362 / Virus Database: 199 - Release Date: 5/7/2002


  8. #8
    Guest

    Default Keeping textarea content formatted when sending formresults to email



    There is a routine in Merchant which strips the hard breaks out of the
    textarea inputs for the email confirms.

    You might want to try using MmHTML by TruXofT (MvCool.com) or a
    similar/related product, to format the emails the way you need, without
    stripping the hard breaks (ask Ivo if his module does this before taking my
    word for it).

    Or if you are a hacker, you can find a reference to removing (glosub)
    asciichar(10) and get rid of it. Not sure if it will cause havoc in the
    confirms, but it's worth a try.

    If you need more help, let me know (onlist).
    State Merchant version and OUI/MMUI usage.


    Andrew Noce



    > -----Original Message-----
    > From: owner-miva-users@miva.com [mailto:owner-miva-users@miva.com]On
    > Behalf Of lance turner
    > Sent: Tuesday, May 21, 2002 10:58 AM
    > To: Valeria Vizenberg; MivaScript List
    > Subject: Re: [meu] Keeping textarea content formatted when sending
    > formresults to email
    >
    >
    > It most likely has to do with the use of the MIVA
    > STANDARDOUTPUTLEVEL. The standard output level needs to be set so
    > that the white space (returns, tabs, etc.) is not being compressed.
    >
    > Something similar to this should work:
    >
    > <MIVA STANDARDOUTPUTLEVEL = "text, html">
    > <MvSMTP ...>
    > ...
    > </MvSMTP>
    > <MIVA STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">
    >
    >
    > A similar technique is needed when displaying a text area:
    >
    > <MIVA STANDARDOUTPUTLEVEL = "text, html">
    > <textarea name="text" rows="6" cols="50" wrap="virtual">
    > <MvEVAL EXPR="{ g.text }">
    > </textarea>
    > <MIVA STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">
    >
    >
    > lance turner
    >
    >
    > At 2:13 PM -0600 5/20/02, Valeria Vizenberg wrote:
    > >My online form's results are submitted to the email.
    > >Everything is fine, but the <textarea>
    > >If the user types in returns in it, they are not being "shown"
    > in the email,
    > >i.e. it comes out as one long line, instead of duplicating the formatting
    > >the user used. What can be done to keep the formatting of the
    > <textarea> in
    > >th email results?
    > >Thanks,
    > >
    > >Valeria
    >

  9. #9
    Guest

    Default MvCall & Cookies



    Ivo,

    Thanks for the response. I got tangled up in something else and have just
    today been able to spend any significant time on your suggestions.

    I've read through your web site and the various RCF's and played around with
    some code, but I'm still stuck. I can't see any practical way in MIVA to
    interact with the site I'm trying to work with. Any suggestions before I
    give it up as a lost cause and try something else?

    What I'm trying to do:

    In order to interact with this site, I need to logon. I go to their logon
    page and enter id and password. The site responds with 4 Set Cookie
    requests.

    In MIVA, when I pass the logon material via a post MvCall, the site responds
    with a message that my browser is not accepting cookies (tho it's actually
    MIVA MIA that's not).

    Exminination of the callreturnheaders show no trace of the cookies, so I'm
    assuming that the site is sending these out after the initial set of
    headers(??). Since the callreturnheader system variables aren't updated
    during subsequent iterations of the MvCall loop, I don't see how I could get
    to them.

    Also, if I understand it right, I'm probably getting some Get Cookie
    requests that I'm not seeing.

    Am I missing something, misunderstanding the whole process, or is this
    something I can't handle in MIVA?

    Thanks

    Mike McBee
    Signature House
    systems@signaturehouse.net
    www.signaturehouse.net


    > -----Original Message-----
    > From: owner-miva-users@miva.com [mailto:owner-miva-users@miva.com]On
    > Behalf Of Ivo Truxa
    > Sent: Tuesday, May 21, 2002 11:32 AM
    > To: Signature House
    > Cc: Miva Userlist
    > Subject: RE: [meu] MvCall & Cookies
    >
    >
    > When using MvCall, it is the server, not the browser, who sends
    > the http request
    > and therefore you have to manipulate the http header so that it passes the
    > cookie value when sending the request to the remote server. You
    > can either copy
    > the cookie from your browser's cookie folder or parse the MvCALL
    > HTTP header to
    > get a new one. Some details about HTTP header manipulation are
    > available here:
    >
    > http://mivo.truxoft.com/art0032.htm
    >
    > Ivo
    > http://mivo.truxoft.com
    >
    >
    > -----Original Message-----
    > From: Signature House
    >
    > I'm trying to use Miva Mia to interface with a site via MvCall and have
    > reached a bit of a stumbling block.
    >
    > I first have to signin to the site with a userid and a password. The site
    > I'm accessing then wants to send me a cookie, but can't, saying that my
    > browser won't accept cookies. I'm using IE 6 and it is set to accept
    > cookies.
    >
    > This happens with both GET and POST versions of the MvCall. Below are
    > simplified versions of the GET and POST code I'm using.
    >
    > Is there any way in Miva that I can accept the cookie?
    >
    > Thanks
    >
    > Mike McBee
    > Signature House
    >
    > ********* POST VERSION *********
    > <mvassign name="a" value="123">
    > .
    > .
    > .
    > <mvassign name="j" value="abc">
    > <mvcall
    > action="http://abc.com/signin.dll"
    > method="post"
    > fields="a,...,j">
    > <mveval expr="{callvalue}">
    > </mvcall>
    >
    >
    > ********* GET VERSION *********
    > <mvcall
    > action="http://abc.com/fff.dll?a=123...&j=abc"
    > method="get">
    > <mveval expr="{callvalue}">
    > </mvcall>


  10. #10
    Guest

    Default MvCall & Cookies



    The simplest way to find out what you need to add to the HTTP headers in
    the MvCALL tag, is capturing the entire TCP/IP communication between
    your browser and the server and then simulating it with Miva.

    I use the MS Network Monitor (include for example in the SMS package for
    NT servers) for capturing and analyzing the HTTP data.

    Ivo
    http://mivo.truxoft.com


    -----Original Message-----
    From: Signature House

    Ivo,

    Thanks for the response. I got tangled up in something else and have
    just
    today been able to spend any significant time on your suggestions.

    I've read through your web site and the various RCF's and played around
    with
    some code, but I'm still stuck. I can't see any practical way in MIVA to
    interact with the site I'm trying to work with. Any suggestions before I
    give it up as a lost cause and try something else?

    What I'm trying to do:

    In order to interact with this site, I need to logon. I go to their
    logon
    page and enter id and password. The site responds with 4 Set Cookie
    requests.

    In MIVA, when I pass the logon material via a post MvCall, the site
    responds
    with a message that my browser is not accepting cookies (tho it's
    actually
    MIVA MIA that's not).

    Exminination of the callreturnheaders show no trace of the cookies, so
    I'm
    assuming that the site is sending these out after the initial set of
    headers(??). Since the callreturnheader system variables aren't updated
    during subsequent iterations of the MvCall loop, I don't see how I could
    get
    to them.

    Also, if I understand it right, I'm probably getting some Get Cookie
    requests that I'm not seeing.

    Am I missing something, misunderstanding the whole process, or is this
    something I can't handle in MIVA?

    Thanks

    Mike McBee
    Signature House
    systems@signaturehouse.net
    www.signaturehouse.net



Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •