<% 
' Copyright 2000 Phone.com, Inc.  All rights reserved.
'
'   Subject to the terms and conditions of the SDK License Agreement,
'   Phone.com, Inc. hereby grants you the right to use the UP.SDK
'   software and its related documentation.
'
'   The Phone.com name and logo and the family of terms carrying the "UP."
'   prefix are trademarks of Phone.com, Inc. All other brands and product
'   names may be trademarks of the respective companies with which they
'   are associated.
'
'
' postFaxInfo.asp
'
'   One of a pair of examples to illustrate posting a FAX using the COM
'   Object FAX library.
'
'   This example simply presents a WML deck to prompt the user to fill
'   in values for a FAX recipient.
'
' Declarations
Dim myDigest, d1, nl

' Constants
'
' A newline (linefeed) is appended to each line of WML to
' aid legibility of source dumped to the Sim Info Window.
'
nl      = Chr(10)

'   The input deck
'
d1 =      "<wml>" & nl
d1 = d1 & "  <card id=""card1"">" & nl
d1 = d1 & "    <p>" & nl
d1 = d1 & "      Recipient FAX number:" & nl
d1 = d1 & "      <input name=""RecipientFax"" format=""NNN-NNN-NNNN"" "
d1 = d1 &          "emptyok=""false""/>" & nl
d1 = d1 & "      Recipient Name:" & nl
d1 = d1 & "      <input name=""RecipientName"" format=""A*a*A*a"" "
d1 = d1 &          "maxlength=""40"" emptyok=""true""/>" & nl
d1 = d1 & "      Recipient Tel number:" & nl
d1 = d1 & "      <input name=""RecipientTel"" format=""NNN-NNN-NNNN"" "
d1 = d1 &          "emptyok=""true""/>" & nl
d1 = d1 & "      Sender Name:" & nl
d1 = d1 & "      <input name=""SenderName"" format=""A*a*A*a"" "
d1 = d1 &          "maxlength=""40"" emptyok=""true""/>" & nl
d1 = d1 & "      Sender Tel number:" & nl
d1 = d1 & "      <input name=""SenderTel"" format=""NNN-NNN-NNNN"" "
d1 = d1 &          "emptyok=""true""/>" & nl
d1 = d1 & "      Sender FAX number:" & nl
d1 = d1 & "      <input name=""SenderFax"" format=""NNN-NNN-NNNN"" "
d1 = d1 &          "emptyok=""true""/>" & nl
d1 = d1 & "    </p>" & nl
d1 = d1 & "    <do type=""accept"" label=""Send Fax?"">" & nl
d1 = d1 & "      <go method=""post"" href=""sendFax.asp"">" & nl
d1 = d1 & "        <postfield name=""RecipientFax"" "
d1 = d1 &            "value=""$(RecipientFax)""/>" & nl
d1 = d1 & "        <postfield name=""RecipientName"" "
d1 = d1 &            "value=""$(RecipientName)""/>" & nl
d1 = d1 & "        <postfield name=""RecipientTel"" "
d1 = d1 &            "value=""$(RecipientTel)""/>" & nl
d1 = d1 & "        <postfield name=""SenderName"" "
d1 = d1 &            "value=""$(SenderName)""/>" & nl
d1 = d1 & "        <postfield name=""SenderTel"" "
d1 = d1 &            "value=""$(SenderTel)""/>" & nl
d1 = d1 & "        <postfield name=""SenderFax"" "
d1 = d1 &            "value=""$(SenderFax)""/>" & nl
d1 = d1 & "      </go>" & nl
d1 = d1 & "    </do>" & nl
d1 = d1 & "  </card>" & nl
d1 = d1 & "</wml>" & nl

' Create a new COM Digest object.
'
set myDigest            = Server.CreateObject("PDCDigestUtils.CPDCDigest")

' Add the deck to the digest object.
'
myDigest.DigestAddDeck  "?", d1

' Suppress content type output within the digest to prevent a 
' server from encapsulating WML content within a second boundary.
'
myDigest.DigestSuppressContentType 1

' Serialize the digest into a single output buffer, digestString.
'
digestString    = myDigest.DigestSerialize(0)

' Specify a deck of type WML to the digest object.
'
myDigest.DeckType         = 1

' Specify content type through the server response,
' rather than within the digest.
'
Response.ContentType    = myDigest.DigestGetContentType

' Write the response buffer to the client.
'
Response.BinaryWrite(digestString)

%>


