By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

GUID in ASP - defined variable does not remain constant

P: n/a
I am using the following code in asp to define a unique and
unpredictable record ID in Access.

<%
'GENERATE UNIQUE ID
Function genguid()
Dim Guid
guid = server.createobject("scriptlet.typelib").guid
guid=Left(guid,instr(guid,"}"))
genguid=guid
genguid= replace(guid, "}", "")
genguid= replace(genguid, "{", "")
genguid= replace(genguid, "-", "")
genguid= replace(genguid, "'", "")
Set guid=nothing
end function
%>
<% Dim strIDFinal

strIDFinal = genguid

strIDFinal = strIDFinal
%>
I want to use strIDFinal to define a hidden field and I also use
strIDFinal in the redirect url after record insertion.

MM_editRedirectUrl = "/greetings/mail_greeting_c.asp?messageID=" &
strIDFinal & ""
The problem is that GUID is generating two separate IDs for the hidden
field and the url

both use the same string variable: strIDFinal

How do I use strIDFinal twice on one page without it getting a unique
value each time? I'm attempting to insert the value into access as
well as mail it off to someone as a record identifier for an egreeting
system much like yahoo's egreetings.
Any help would be appreciated.

thanks
Jul 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Call the GenGUID once, store it in a variable (as you are already doing) at
the TOP of the page, and use it as many times you feel like.
--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"BigDadyWeaver" <ep******@lwr.org> wrote in message
news:a4**************************@posting.google.c om...
I am using the following code in asp to define a unique and
unpredictable record ID in Access.

<%
'GENERATE UNIQUE ID
Function genguid()
Dim Guid
guid = server.createobject("scriptlet.typelib").guid
guid=Left(guid,instr(guid,"}"))
genguid=guid
genguid= replace(guid, "}", "")
genguid= replace(genguid, "{", "")
genguid= replace(genguid, "-", "")
genguid= replace(genguid, "'", "")
Set guid=nothing
end function
%>
<% Dim strIDFinal

strIDFinal = genguid

strIDFinal = strIDFinal
%>
I want to use strIDFinal to define a hidden field and I also use
strIDFinal in the redirect url after record insertion.

MM_editRedirectUrl = "/greetings/mail_greeting_c.asp?messageID=" &
strIDFinal & ""
The problem is that GUID is generating two separate IDs for the hidden
field and the url

both use the same string variable: strIDFinal

How do I use strIDFinal twice on one page without it getting a unique
value each time? I'm attempting to insert the value into access as
well as mail it off to someone as a record identifier for an egreeting
system much like yahoo's egreetings.
Any help would be appreciated.

thanks

Jul 19 '05 #2

P: n/a
Why are you assigning strIDFinal to itself?

How are you determining that the values are different?

Are you generating a new id on the page being posted to or are you getting
the value from the hidden field? It would help if you showed your code.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"BigDadyWeaver" <ep******@lwr.org> wrote in message
news:a4**************************@posting.google.c om...
I am using the following code in asp to define a unique and
unpredictable record ID in Access.

<%
'GENERATE UNIQUE ID
Function genguid()
Dim Guid
guid = server.createobject("scriptlet.typelib").guid
guid=Left(guid,instr(guid,"}"))
genguid=guid
genguid= replace(guid, "}", "")
genguid= replace(genguid, "{", "")
genguid= replace(genguid, "-", "")
genguid= replace(genguid, "'", "")
Set guid=nothing
end function
%>
<% Dim strIDFinal

strIDFinal = genguid

strIDFinal = strIDFinal
%>
I want to use strIDFinal to define a hidden field and I also use
strIDFinal in the redirect url after record insertion.

MM_editRedirectUrl = "/greetings/mail_greeting_c.asp?messageID=" &
strIDFinal & ""
The problem is that GUID is generating two separate IDs for the hidden
field and the url

both use the same string variable: strIDFinal

How do I use strIDFinal twice on one page without it getting a unique
value each time? I'm attempting to insert the value into access as
well as mail it off to someone as a record identifier for an egreeting
system much like yahoo's egreetings.
Any help would be appreciated.

thanks

Jul 19 '05 #3

P: n/a

<<<<Why are you assigning strIDFinal to itself?>>>>

I was just trying to kill the genGUID. Have since altered. Still
updates ID every time strIDFinal is used.
<<<< How are you determining that the values are different? >>>>

I am writing strIDFinal to page:
<%= strIDFinal %>

<<<< Are you generating a new id on the page being posted to or are you
getting
the value from the hidden field? It would help if you showed your code.


I want to generate one ID. I want to insert it into the database as the
primary key for the record. I want to pass that same variable to the
next page in the url string. The problem is that the value that I write
to the page and the value that gets passed in the url are different.

Here is the entire code. It is lengthy. I will comment key areas with
'%%%%%%%%%%%%%%%%%%%%%%%%%%


<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/egreetings.asp" -->
<% dim strMessage
strmessage= Replace(Request("message"), vbCrLf, "<BR>") %>
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
'GENERATE UNIQUE ID
Function genguid()
Dim Guid
guid = server.createobject("scriptlet.typelib").guid
guid=Left(guid,instr(guid,"}"))
genguid=guid
genguid= replace(guid, "}", "") ' strip out } from generated ID
genguid= replace(genguid, "{", "") ' strip out { from generated ID
genguid= replace(genguid, "-", "") ' strip out - from generated ID
genguid= replace(genguid, "'", "") ' strip out ' from generated ID
Set guid=nothing
end function
%>
<% Dim strIDFinal

strIDFinal = genguid

'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
%>
<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) = "send") Then

MM_editConnection = MM_egreetings_STRING
MM_editTable = "messages"
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
MM_editRedirectUrl = "/greetings/mail_greeting_c.asp?messageID=" &
strIDFinal & ""
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
MM_fieldsStr =
"greetingID|value|fromemail|value|fromname|value|t oemail|value|toname|va
lue|message|value|layout|value|fontcolor|value|fon tsize|value|fontface|v
alue|MessageID|value"
MM_columnsStr =
"greetingID|none,none,NULL|fromemail|',none,''|fro mname|',none,''|toemai
l|',none,''|toname|',none,''|message|',none,''|lay out|',none,''|fontcolo
r|',none,''|fontsize|none,none,NULL|fontface|',non e,''|messageID|',none,
''"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")

' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" &
Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" &
Request.QueryString
End If
End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(Request("MM_insert")) <> "") Then

' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues &
") values (" & MM_dbValues & ")"

If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%>
<%
Dim greetings__MMColParam
greetings__MMColParam = "1"
If (Request.querystring("greetingID") <> "") Then
greetings__MMColParam = Request.querystring("greetingID")
End If
%>
<%
Dim greetings
Dim greetings_numRows

Set greetings = Server.CreateObject("ADODB.Recordset")
greetings.ActiveConnection = MM_egreetings_STRING
greetings.Source = "SELECT * FROM cards, categories WHERE
cards.greetingID = " + Replace(greetings__MMColParam, "'", "''") + " AND
cards.categoryID = categories.categoryID"
greetings.CursorType = 0
greetings.CursorLocation = 2
greetings.LockType = 1
greetings.Open()

greetings_numRows = 0
%>

<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="Microsoft FrontPage 4.0">
<TITLE>Preview Your e-Greeting at lwr.org</TITLE>

</HEAD>
<BODY BGCOLOR="ffffff" LINK="#660066" ALINK="#660066"
onLoad="MM_preloadImages('/images/navbar/lwrnavbar_r1_c2_f3.gif','/image
s/navbar/lwrnavbar_r1_c2_f2.gif','/images/navbar/lwrnavbar_r1_c2_f4.gif'
,'/images/navbar/lwrnavbar_r1_c4_f3.gif','/images/navbar/lwrnavbar_r1_c4
_f2.gif','/images/navbar/lwrnavbar_r1_c4_f4.gif','/images/navbar/lwrnavb
ar_r1_c6_f3.gif','/images/navbar/lwrnavbar_r1_c6_f2.gif','/images/navbar
/lwrnavbar_r1_c6_f4.gif','/images/navbar/lwrnavbar_r2_c1_f3.gif','/image
s/navbar/lwrnavbar_r2_c1_f2.gif','/images/navbar/lwrnavbar_r2_c1_f4.gif'
,'/images/navbar/lwrnavbar_r2_c3_f3.gif','/images/navbar/lwrnavbar_r2_c3
_f2.gif','/images/navbar/lwrnavbar_r2_c3_f4.gif','/images/navbar/lwrnavb
ar_r2_c5_f3.gif','/images/navbar/lwrnavbar_r2_c5_f2.gif','/images/navbar
/lwrnavbar_r2_c5_f4.gif','/images/navbar/lwrnavbar_r3_c2_f3.gif','/image
s/navbar/lwrnavbar_r3_c2_f2.gif','/images/navbar/lwrnavbar_r3_c2_f4.gif'
,'/images/navbar/lwrnavbar_r3_c4_f3.gif','/images/navbar/lwrnavbar_r3_c4
_f2.gif','/images/navbar/lwrnavbar_r3_c4_f4.gif','/images/homepage/homep
agenavbar_r4_c7_f3.gif','/images/homepage/homepagenavbar_r4_c7_f2.gif','
/images/homepage/fairtrade_o.gif','/Library/1')">
<div align="center">
<TABLE WIDTH="780" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD VALIGN="TOP"> <div align="center">
<OBJECT RUNAT="server" PROGID="ADODB.Connection" id="conn">
</OBJECT>
<!-- #BeginLibraryItem "/Library/NavBar.lbi" -->
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName]
= new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?
args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn :
img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src =
img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
<body
onLoad="MM_preloadImages('../images/navbar/lwrnavbar_r1_c2_f3.gif','../i
mages/navbar/lwrnavbar_r1_c2_f2.gif','../images/navbar/lwrnavbar_r1_c2_f
4.gif','../images/navbar/lwrnavbar_r1_c4_f3.gif','../images/navbar/lwrna
vbar_r1_c4_f2.gif','../images/navbar/lwrnavbar_r1_c4_f4.gif','../images/
navbar/lwrnavbar_r1_c6_f3.gif','../images/navbar/lwrnavbar_r1_c6_f2.gif'
,'../images/navbar/lwrnavbar_r1_c6_f4.gif','../images/navbar/lwrnavbar_r
2_c1_f3.gif','../images/navbar/lwrnavbar_r2_c1_f2.gif','../images/navbar
/lwrnavbar_r2_c1_f4.gif','../images/navbar/lwrnavbar_r2_c3_f3.gif','../i
mages/navbar/lwrnavbar_r2_c3_f2.gif','../images/navbar/lwrnavbar_r2_c3_f
4.gif','../images/navbar/lwrnavbar_r2_c5_f3.gif','../images/navbar/lwrna
vbar_r2_c5_f2.gif','../images/navbar/lwrnavbar_r2_c5_f4.gif','../images/
navbar/lwrnavbar_r3_c2_f3.gif','../images/navbar/lwrnavbar_r3_c2_f2.gif'
,'../images/navbar/lwrnavbar_r3_c2_f4.gif','../images/navbar/lwrnavbar_r
3_c4_f3.gif','../images/navbar/lwrnavbar_r3_c4_f2.gif','../images/navbar
/lwrnavbar_r3_c4_f4.gif','../images/homepage/homepagenavbar_r4_c7_f3.gif
','../images/homepage/homepagenavbar_r4_c7_f2.gif','/images/homepage/fai
rtrade_o.gif')">
<table border="0" cellpadding="0" cellspacing="0" width="648">
<!-- fwtable fwsrc="lwrnavbar.png" fwbase="lwrnavbar.gif"
fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="1" border="0"></td>
</tr>
<tr>
<td><img name="lwrnavbar_r1_c1"
src="/images/navbar/lwrnavbar_r1_c1.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/programs/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r1 _c2','/images/navbar/l
wrnavbar_r1_c2_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r1_c2','/images/navbar/lwrnavb
ar_r1_c2_f2.gif','/images/navbar/lwrnavbar_r1_c2_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r1_c2"
src="/images/navbar/lwrnavbar_r1_c2.gif" width="108" height="16"
border="0" alt="LWR Programs"></a></td>
<td><img name="lwrnavbar_r1_c3"
src="/images/navbar/lwrnavbar_r1_c3.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/about/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r1 _c4','/images/navbar/l
wrnavbar_r1_c4_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r1_c4','/images/navbar/lwrnavb
ar_r1_c4_f2.gif','/images/navbar/lwrnavbar_r1_c4_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r1_c4"
src="/images/navbar/lwrnavbar_r1_c4.gif" width="108" height="16"
border="0" alt="About LWR"></a></td>
<td><img name="lwrnavbar_r1_c5"
src="/images/navbar/lwrnavbar_r1_c5.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r1 _c6','/images/navbar/l
wrnavbar_r1_c6_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r1_c6','/images/navbar/lwrnavb
ar_r1_c6_f2.gif','/images/navbar/lwrnavbar_r1_c6_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r1_c6"
src="/images/navbar/lwrnavbar_r1_c6.gif" width="108" height="16"
border="0" alt="LWR Home"></a></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="16" border="0"></td>
</tr>
<tr>
<td><a href="/emergencies/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r2 _c1','/images/navbar/l
wrnavbar_r2_c1_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r2_c1','/images/navbar/lwrnavb
ar_r2_c1_f2.gif','/images/navbar/lwrnavbar_r2_c1_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r2_c1"
src="/images/navbar/lwrnavbar_r2_c1.gif" width="108" height="16"
border="0" alt=""></a></td>
<td><img name="lwrnavbar_r2_c2"
src="/images/navbar/lwrnavbar_r2_c2.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/giving/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r2 _c3','/images/navbar/l
wrnavbar_r2_c3_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r2_c3','/images/navbar/lwrnavb
ar_r2_c3_f2.gif','/images/navbar/lwrnavbar_r2_c3_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r2_c3"
src="/images/navbar/lwrnavbar_r2_c3.gif" width="108" height="16"
border="0" alt="Contribute to LWR"></a></td>
<td><img name="lwrnavbar_r2_c4"
src="/images/navbar/lwrnavbar_r2_c4.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/contact.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r2 _c5','/images/navbar/l
wrnavbar_r2_c5_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r2_c5','/images/navbar/lwrnavb
ar_r2_c5_f2.gif','/images/navbar/lwrnavbar_r2_c5_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r2_c5"
src="/images/navbar/lwrnavbar_r2_c5.gif" width="108" height="16"
border="0" alt="Contact LWR"></a></td>
<td rowspan="2" valign="top"><img name="lwrnavbar_r2_c6"
src="/images/navbar/lwrnavbar_r2_c6.gif" width="108" height="16"
border="0" alt=""><br>
</td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="16" border="0"></td>
</tr>
<tr>
<td><img name="lwrnavbar_r3_c1"
src="/images/navbar/lwrnavbar_r3_c1.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/news/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r3 _c2','/images/navbar/l
wrnavbar_r3_c2_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r3_c2','/images/navbar/lwrnavb
ar_r3_c2_f2.gif','/images/navbar/lwrnavbar_r3_c2_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r3_c2"
src="/images/navbar/lwrnavbar_r3_c2.gif" width="108" height="16"
border="0" alt="News from LWR"></a></td>
<td><img name="lwrnavbar_r3_c3"
src="/images/navbar/lwrnavbar_r3_c3.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/parish/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r3 _c4','/images/navbar/l
wrnavbar_r3_c4_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r3_c4','/images/navbar/lwrnavb
ar_r3_c4_f2.gif','/images/navbar/lwrnavbar_r3_c4_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r3_c4"
src="/images/navbar/lwrnavbar_r3_c4.gif" width="108" height="16"
border="0" alt=""></a></td>
<td><img name="lwrnavbar_r3_c5"
src="/images/navbar/lwrnavbar_r3_c5.gif" width="108" height="16"
border="0" alt=""></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="16" border="0"></td>
</tr>
</table>
<table width="648" height="101" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td width="216" rowspan="3"><a href="/index.html"><img
src="/images/lwrlogo.gif" border="0" align="top"></a></td>
<td width="109" height="16"><div align="left"><a
href="/advocacy/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','homepagenavb ar_r4_c7','/images/hom
epage/homepagenavbar_r4_c7_f3.gif',1)"
onMouseOver="MM_nbGroup('over','homepagenavbar_r4_ c7','/images/homepage/
homepagenavbar_r4_c7_f2.gif','/images/homepage/homepagenavbar_r4_c7_f3.g
if',1)" onMouseOut="MM_nbGroup('out');" ><img
src="/images/homepage/homepagenavbar_r4_c7.gif" alt="Advocacy"
name="homepagenavbar_r4_c7" width="108" height="16"
border="0"></a></div></td>
<td width="215"><div align="right"><img
src="/images/buttons/SerButBl.gif" width="47" height="15"
align="texttop"></div></td>
<td width="108" rowspan="2"><form name="form1" method="get"
action="http://search.atomz.com/search/">
<input size=11 name="sp-q">
<input name="imageField" type="image"
src="/images/buttons/GoButBlu.gif" align="right" width="32" height="15"
border="0">
<input type=hidden name="sp-a" value="sp10018984">
<input type=hidden name="sp-p" value="any">
<input type=hidden name="sp-f" value="iso-8859-1">
</form></td>
</tr>
<tr>
<td height="32">&nbsp;</td>
<td height="32" valign="top"><a href="/fairtrade/index.html"
target="_top"
onClick="MM_nbGroup('down','navbar1','fairtradenav ','/images/homepage/fa
irtrade_o.gif',1)"
onMouseOver="MM_nbGroup('over','fairtradenav','/images/homepage/fairtrad
e_o.gif','/Library/1',1)" onMouseOut="MM_nbGroup('out');" ><img
src="/images/homepage/fairtrade_nav.gif" alt="Fair Trade"
name="fairtradenav" width="108" height="16" border="0"></a></td>
</tr>
<tr>
<td height="46" colspan="3">&nbsp;</td>
</tr>
</table>
<!-- #EndLibraryItem --> </div>
<div align="center">
<p><strong><font color="#660066" size="2" face="Arial">This
e-mail will
be sent to:</font></strong><br>
<font size="2" face="Arial, Helvetica, sans-serif"><%=
Request.Form("toname") %> <font size="1">( <%= Request.Form("toemail")
%> )</font></font></p>
</div> <div align="center">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr align="center" valign="top">
<td width="250">
<form name="send" method="POST" action="<%=MM_editAction%>">
<p>
<input type="submit" name="Submit2" value="Send This
Greeting">
<input name="greetingID" type="hidden"
id="greetingID2" value="<%= Request.Form("greetingID") %>">
<input name="fromemail" type="hidden"
id="fromemail2" value="<%= Request.Form("fromemail") %>">
<input name="fromname" type="hidden" id="fromname2"
value="<%= Request.Form("fromname") %>">
<input name="toemail" type="hidden" id="toemail2"
value="<%= Request.Form("toemail") %>">
<input name="toname" type="hidden" id="toname2"
value="<%= Request.Form("toname") %>">
<input name="message" type="hidden" id="message2"
value="<%= strmessage %>">
<br>
<input name="layout" type="hidden" id="layout2"
value="<%= Request.Form("layout") %>">
<input name="fontcolor" type="hidden"
id="fontcolor2" value="<%= Request.Form("fontcolor") %>">
<input name="fontsize" type="hidden" id="fontsize2"
value="<%= Request.Form("fontsize") %>">
<input name="fontface" type="hidden" id="fontface2"
value="<%= Request.Form("fontface") %>">
<input type="hidden" name="MM_insert" value="send">
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
<input name="MessageID" type="hidden" id="MessageID"
value="<%= strIDFinal %>">
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
</p>
<p> </p>
</form>
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
<%= strIDFinal %>
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
</td>
<td><% dim strgreetingID
strgreetingID = request.form("greetingID")
%><form action="/greetings/compose_card.asp?greetingID=<%=
Request.Form("greetingID") %>" method="post" name="changes"
id="changes">
<input type="submit" name="Submit3" value="Make More
Changes">
<input name="greetingID" type="hidden" id="greetingID"
value="<%= Request.Form("greetingID") %>">
<input name="fromemail" type="hidden" id="fromemail"
value="<%= Request.Form("fromemail") %>">
<input name="fromname" type="hidden" id="fromname"
value="<%= Request.Form("fromname") %>">
<input name="toemail" type="hidden" id="toemail"
value="<%= Request.Form("toemail") %>">
<input name="toname" type="hidden" id="toname"
value="<%= Request.Form("toname") %>">
<input name="message" type="hidden" id="message"
value="<%= Request.Form("message") %>">
<br>
<input name="layout" type="hidden" id="layout"
value="<%= Request.Form("layout") %>">
<input name="fontcolor" type="hidden" id="fontcolor"
value="<%= Request.Form("fontcolor") %>">
<input name="fontsize" type="hidden" id="fontsize"
value="<%= Request.Form("fontsize") %>">
<input name="fontface" type="hidden" id="fontface"
value="<%= Request.Form("fontface") %>">

</form>
</td>
</tr>
</table>
<p><strong><font color="#660066" size="2" face="Arial">
</font></strong></p>
<% dim strLayout ' DETERMINE WHICH LAYOUT TO PREVIEW
strLayout = REQUEST.FORM("layout")
%><%'response.write strLayout %>
<% if strLayout = "card_c.asp" then %>
<table width="700" border="1" cellspacing="3" cellpadding="3">
<tr>
<td bgcolor="#FFFFFF"><font size="2" face="Arial,
Helvetica, sans-serif">Title:
<%=(greetings.Fields.Item("cardtitle").Value)%><br >
Designed by</font>: <font size="2" face="Arial,
Helvetica,
sans-serif"><%=(greetings.Fields.Item("author").Value)% ></font><br>
<hr> <div align="center">
<p><br><font face="<%= Request.Form("fontface") %>" color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize")
%>"><strong>
To: <%= Request.Form("toname") %></p>
<p>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflas
h.cab#version=6,0,29,0" width="400" height="300">
<param name="movie"
value="<%=(greetings.Fields.Item("path").Value)%>< %=(greetings.Fields.It
em("filename").Value)%>">
<param name="quality" value="high">
<embed
src="<%=(greetings.Fields.Item("path").Value)%><%= (greetings.Fields.Item
("filename").Value)%>" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="400" height="300"></embed>
</object>
</p>
<table width="400" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td><div align="left"><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><%= strmessage %><br>
<br>
- <%= Request.Form("fromname") %></font></div></td>
</tr>
</table>
<p>&nbsp;</p>
</div></td>
</tr>
</table>

<p>
<% END if %>
</p>
<p>

<%'response.write strLayout %>
<% if strLayout = "card_l.asp" then %>
</p>
<table width="700" border="1" cellspacing="3" cellpadding="3">
<tr>
<td valign="top" bgcolor="#FFFFFF"><font size="2"
face="Arial, Helvetica, sans-serif">Title:
<%=(greetings.Fields.Item("title").Value)%><br>
Designed by</font>: <font size="2" face="Arial,
Helvetica,
sans-serif"><%=(greetings.Fields.Item("author").Value)% ></font><br>
<hr>
<div align="center">
<table width="700" border="0" cellspacing="3" cellpadding="3">
<tr valign="top">
<td width="400"><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><strong>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflas
h.cab#version=6,0,29,0" width="400" height="300">
<param name="movie"
value="<%=(greetings.Fields.Item("path").Value)%>< %=(greetings.Fields.It
em("filename").Value)%>">
<param name="quality" value="high">
<embed
src="<%=(greetings.Fields.Item("path").Value)%><%= (greetings.Fields.Item
("filename").Value)%>" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="400"
height="300"></embed></object>
</strong></font></td>
<td><font face="<%= Request.Form("fontface") %>"
color="<%= Request.Form("fontcolor") %>" size="<%=
Request.Form("fontsize") %>"><strong>To:
<%= Request.Form("toname")
%></strong></font><font color="<%= Request.Form("fontcolor") %>"
size="<%= Request.Form("fontsize") %>" face="<%=
Request.Form("fontface") %>"><strong><br>
<br>
<%= strmessage %><br>
<br>
- <%= Request.Form("fromname")
%></strong></font></td>
</tr>
</table>

</div></td>
</tr>
</table>
<p>
<% END if %>
</p>
<p>
<%'response.write strLayout %>
<% if strLayout = "card_r.asp" then %>
</p>
<table width="700" border="1" cellspacing="3" cellpadding="3">
<tr>
<td valign="top" bgcolor="#FFFFFF"><font size="2"
face="Arial, Helvetica, sans-serif">Title:
<%=(greetings.Fields.Item("title").Value)%><br>
Designed by</font>: <font size="2" face="Arial,
Helvetica,
sans-serif"><%=(greetings.Fields.Item("author").Value)% ></font><br>
<hr>
<div align="center">
<table width="700" border="0" cellspacing="3" cellpadding="3">
<tr valign="top">
<td width="263"><font face="<%=
Request.Form("fontface") %>" color="<%= Request.Form("fontcolor") %>"
size="<%= Request.Form("fontsize") %>"><strong>To:
<%= Request.Form("toname")
%></strong></font><strong><font color="<%= Request.Form("fontcolor") %>"
size="<%= Request.Form("fontsize") %>" face="<%=
Request.Form("fontface") %>"><br>
</font></strong><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><strong><br>
<%= strmessage %><br>
<br>
- <%= Request.Form("fromname")
%></strong></font></td>
<td width="400"><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><strong>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflas
h.cab#version=6,0,29,0" width="400" height="300">
<param name="movie"
value="<%=(greetings.Fields.Item("path").Value)%>< %=(greetings.Fields.It
em("filename").Value)%>">
<param name="quality" value="high">
<embed
src="<%=(greetings.Fields.Item("path").Value)%><%= (greetings.Fields.Item
("filename").Value)%>" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="400"
height="300"></embed></object>
</strong></font></td>
</tr>
</table>

</div></td>
</tr>
</table>
<% END if %>
<!-- #BeginLibraryItem "/Library/bottom.lbi" -->
<table width="648" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="48"><p align="center"><font size="1"
face="Verdana, Arial, Helvetica, sans-serif"><br>
<a href="/tellafriend.asp">Tell A Friend About
This Page &gt;&gt;</a> </font></p>
<p align="center"><font size="1" face="Verdana, Arial,
Helvetica, sans-serif">| <a href="/index.html">LWR Home</a> | <a
href="/advocacy/index.html">Advocacy</a> | <a
href="/fairtrade/index.html">Fair Trade</a> | <a
href="/emergencies/index.html">Emergencies</a> | <a
href="/news/index.html">News</a> | <a href="/parish/index.html">Be
Involved</a> | <a href="/programs/index.html">Programs</a> | <a
href="/giving/index.html">Contribute</a> |<br>
| <a href="/about/index.html">About Us</a> | <a
href="/contact.html">Contact</a> | <a href="/search.html">Search</a> |
<a href="/sitemap.html">Site Map</a> | <a href="/privacy.html">Privacy
Policy</a> | </font></p>
<p align="center"><font size="1" face="Verdana, Arial,
Helvetica, sans-serif"><strong>Lutheran World Relief</strong> | 700
Light Street | Baltimore, Maryland 21230 | 800-LWR-LWR-2 | <a
href="mailto:lw*@lwr.org">lw*@lwr.org</a></font></p>
<p align="center"><font size="1" face="Verdana, Arial,
Helvetica, sans-serif">Copyright &copy; 1997-2004 Lutheran World
Relief.<br>
This page was last modified on:
<!-- #BeginDate format:Am1 -->February 2, 2004<!-- #EndDate
-->
</font></p></td>
</tr>
</table>
<!-- #EndLibraryItem --></div></TD>
</TR>
</TABLE>
</div>
</BODY>
</HTML>
<%
greetings.Close()
Set greetings = Nothing
%>


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4

P: n/a

<<<<Why are you assigning strIDFinal to itself?>>>>

I was just trying to kill the genGUID. Have since altered. Still
updates ID every time strIDFinal is used.
<<<< How are you determining that the values are different? >>>>

I am writing strIDFinal to page:
<%= strIDFinal %>

<<<< Are you generating a new id on the page being posted to or are you
getting
the value from the hidden field? It would help if you showed your code.


I want to generate one ID. I want to insert it into the database as the
primary key for the record. I want to pass that same variable to the
next page in the url string. The problem is that the value that I write
to the page and the value that gets passed in the url are different.

Here is the entire code. It is lengthy. I will comment key areas with
'%%%%%%%%%%%%%%%%%%%%%%%%%%


<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/egreetings.asp" -->
<% dim strMessage
strmessage= Replace(Request("message"), vbCrLf, "<BR>") %>
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
'GENERATE UNIQUE ID
Function genguid()
Dim Guid
guid = server.createobject("scriptlet.typelib").guid
guid=Left(guid,instr(guid,"}"))
genguid=guid
genguid= replace(guid, "}", "") ' strip out } from generated ID
genguid= replace(genguid, "{", "") ' strip out { from generated ID
genguid= replace(genguid, "-", "") ' strip out - from generated ID
genguid= replace(genguid, "'", "") ' strip out ' from generated ID
Set guid=nothing
end function
%>
<% Dim strIDFinal

strIDFinal = genguid

'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
%>
<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) = "send") Then

MM_editConnection = MM_egreetings_STRING
MM_editTable = "messages"
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
MM_editRedirectUrl = "/greetings/mail_greeting_c.asp?messageID=" &
strIDFinal & ""
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
MM_fieldsStr =
"greetingID|value|fromemail|value|fromname|value|t oemail|value|toname|va
lue|message|value|layout|value|fontcolor|value|fon tsize|value|fontface|v
alue|MessageID|value"
MM_columnsStr =
"greetingID|none,none,NULL|fromemail|',none,''|fro mname|',none,''|toemai
l|',none,''|toname|',none,''|message|',none,''|lay out|',none,''|fontcolo
r|',none,''|fontsize|none,none,NULL|fontface|',non e,''|messageID|',none,
''"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")

' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" &
Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" &
Request.QueryString
End If
End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(Request("MM_insert")) <> "") Then

' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues &
") values (" & MM_dbValues & ")"

If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%>
<%
Dim greetings__MMColParam
greetings__MMColParam = "1"
If (Request.querystring("greetingID") <> "") Then
greetings__MMColParam = Request.querystring("greetingID")
End If
%>
<%
Dim greetings
Dim greetings_numRows

Set greetings = Server.CreateObject("ADODB.Recordset")
greetings.ActiveConnection = MM_egreetings_STRING
greetings.Source = "SELECT * FROM cards, categories WHERE
cards.greetingID = " + Replace(greetings__MMColParam, "'", "''") + " AND
cards.categoryID = categories.categoryID"
greetings.CursorType = 0
greetings.CursorLocation = 2
greetings.LockType = 1
greetings.Open()

greetings_numRows = 0
%>

<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="Microsoft FrontPage 4.0">
<TITLE>Preview Your e-Greeting at lwr.org</TITLE>

</HEAD>
<BODY BGCOLOR="ffffff" LINK="#660066" ALINK="#660066"
onLoad="MM_preloadImages('/images/navbar/lwrnavbar_r1_c2_f3.gif','/image
s/navbar/lwrnavbar_r1_c2_f2.gif','/images/navbar/lwrnavbar_r1_c2_f4.gif'
,'/images/navbar/lwrnavbar_r1_c4_f3.gif','/images/navbar/lwrnavbar_r1_c4
_f2.gif','/images/navbar/lwrnavbar_r1_c4_f4.gif','/images/navbar/lwrnavb
ar_r1_c6_f3.gif','/images/navbar/lwrnavbar_r1_c6_f2.gif','/images/navbar
/lwrnavbar_r1_c6_f4.gif','/images/navbar/lwrnavbar_r2_c1_f3.gif','/image
s/navbar/lwrnavbar_r2_c1_f2.gif','/images/navbar/lwrnavbar_r2_c1_f4.gif'
,'/images/navbar/lwrnavbar_r2_c3_f3.gif','/images/navbar/lwrnavbar_r2_c3
_f2.gif','/images/navbar/lwrnavbar_r2_c3_f4.gif','/images/navbar/lwrnavb
ar_r2_c5_f3.gif','/images/navbar/lwrnavbar_r2_c5_f2.gif','/images/navbar
/lwrnavbar_r2_c5_f4.gif','/images/navbar/lwrnavbar_r3_c2_f3.gif','/image
s/navbar/lwrnavbar_r3_c2_f2.gif','/images/navbar/lwrnavbar_r3_c2_f4.gif'
,'/images/navbar/lwrnavbar_r3_c4_f3.gif','/images/navbar/lwrnavbar_r3_c4
_f2.gif','/images/navbar/lwrnavbar_r3_c4_f4.gif','/images/homepage/homep
agenavbar_r4_c7_f3.gif','/images/homepage/homepagenavbar_r4_c7_f2.gif','
/images/homepage/fairtrade_o.gif','/Library/1')">
<div align="center">
<TABLE WIDTH="780" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD VALIGN="TOP"> <div align="center">
<OBJECT RUNAT="server" PROGID="ADODB.Connection" id="conn">
</OBJECT>
<!-- #BeginLibraryItem "/Library/NavBar.lbi" -->
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName]
= new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?
args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn :
img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src =
img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
<body
onLoad="MM_preloadImages('../images/navbar/lwrnavbar_r1_c2_f3.gif','../i
mages/navbar/lwrnavbar_r1_c2_f2.gif','../images/navbar/lwrnavbar_r1_c2_f
4.gif','../images/navbar/lwrnavbar_r1_c4_f3.gif','../images/navbar/lwrna
vbar_r1_c4_f2.gif','../images/navbar/lwrnavbar_r1_c4_f4.gif','../images/
navbar/lwrnavbar_r1_c6_f3.gif','../images/navbar/lwrnavbar_r1_c6_f2.gif'
,'../images/navbar/lwrnavbar_r1_c6_f4.gif','../images/navbar/lwrnavbar_r
2_c1_f3.gif','../images/navbar/lwrnavbar_r2_c1_f2.gif','../images/navbar
/lwrnavbar_r2_c1_f4.gif','../images/navbar/lwrnavbar_r2_c3_f3.gif','../i
mages/navbar/lwrnavbar_r2_c3_f2.gif','../images/navbar/lwrnavbar_r2_c3_f
4.gif','../images/navbar/lwrnavbar_r2_c5_f3.gif','../images/navbar/lwrna
vbar_r2_c5_f2.gif','../images/navbar/lwrnavbar_r2_c5_f4.gif','../images/
navbar/lwrnavbar_r3_c2_f3.gif','../images/navbar/lwrnavbar_r3_c2_f2.gif'
,'../images/navbar/lwrnavbar_r3_c2_f4.gif','../images/navbar/lwrnavbar_r
3_c4_f3.gif','../images/navbar/lwrnavbar_r3_c4_f2.gif','../images/navbar
/lwrnavbar_r3_c4_f4.gif','../images/homepage/homepagenavbar_r4_c7_f3.gif
','../images/homepage/homepagenavbar_r4_c7_f2.gif','/images/homepage/fai
rtrade_o.gif')">
<table border="0" cellpadding="0" cellspacing="0" width="648">
<!-- fwtable fwsrc="lwrnavbar.png" fwbase="lwrnavbar.gif"
fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="1" border="0"></td>
</tr>
<tr>
<td><img name="lwrnavbar_r1_c1"
src="/images/navbar/lwrnavbar_r1_c1.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/programs/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r1 _c2','/images/navbar/l
wrnavbar_r1_c2_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r1_c2','/images/navbar/lwrnavb
ar_r1_c2_f2.gif','/images/navbar/lwrnavbar_r1_c2_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r1_c2"
src="/images/navbar/lwrnavbar_r1_c2.gif" width="108" height="16"
border="0" alt="LWR Programs"></a></td>
<td><img name="lwrnavbar_r1_c3"
src="/images/navbar/lwrnavbar_r1_c3.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/about/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r1 _c4','/images/navbar/l
wrnavbar_r1_c4_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r1_c4','/images/navbar/lwrnavb
ar_r1_c4_f2.gif','/images/navbar/lwrnavbar_r1_c4_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r1_c4"
src="/images/navbar/lwrnavbar_r1_c4.gif" width="108" height="16"
border="0" alt="About LWR"></a></td>
<td><img name="lwrnavbar_r1_c5"
src="/images/navbar/lwrnavbar_r1_c5.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r1 _c6','/images/navbar/l
wrnavbar_r1_c6_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r1_c6','/images/navbar/lwrnavb
ar_r1_c6_f2.gif','/images/navbar/lwrnavbar_r1_c6_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r1_c6"
src="/images/navbar/lwrnavbar_r1_c6.gif" width="108" height="16"
border="0" alt="LWR Home"></a></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="16" border="0"></td>
</tr>
<tr>
<td><a href="/emergencies/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r2 _c1','/images/navbar/l
wrnavbar_r2_c1_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r2_c1','/images/navbar/lwrnavb
ar_r2_c1_f2.gif','/images/navbar/lwrnavbar_r2_c1_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r2_c1"
src="/images/navbar/lwrnavbar_r2_c1.gif" width="108" height="16"
border="0" alt=""></a></td>
<td><img name="lwrnavbar_r2_c2"
src="/images/navbar/lwrnavbar_r2_c2.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/giving/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r2 _c3','/images/navbar/l
wrnavbar_r2_c3_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r2_c3','/images/navbar/lwrnavb
ar_r2_c3_f2.gif','/images/navbar/lwrnavbar_r2_c3_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r2_c3"
src="/images/navbar/lwrnavbar_r2_c3.gif" width="108" height="16"
border="0" alt="Contribute to LWR"></a></td>
<td><img name="lwrnavbar_r2_c4"
src="/images/navbar/lwrnavbar_r2_c4.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/contact.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r2 _c5','/images/navbar/l
wrnavbar_r2_c5_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r2_c5','/images/navbar/lwrnavb
ar_r2_c5_f2.gif','/images/navbar/lwrnavbar_r2_c5_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r2_c5"
src="/images/navbar/lwrnavbar_r2_c5.gif" width="108" height="16"
border="0" alt="Contact LWR"></a></td>
<td rowspan="2" valign="top"><img name="lwrnavbar_r2_c6"
src="/images/navbar/lwrnavbar_r2_c6.gif" width="108" height="16"
border="0" alt=""><br>
</td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="16" border="0"></td>
</tr>
<tr>
<td><img name="lwrnavbar_r3_c1"
src="/images/navbar/lwrnavbar_r3_c1.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/news/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r3 _c2','/images/navbar/l
wrnavbar_r3_c2_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r3_c2','/images/navbar/lwrnavb
ar_r3_c2_f2.gif','/images/navbar/lwrnavbar_r3_c2_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r3_c2"
src="/images/navbar/lwrnavbar_r3_c2.gif" width="108" height="16"
border="0" alt="News from LWR"></a></td>
<td><img name="lwrnavbar_r3_c3"
src="/images/navbar/lwrnavbar_r3_c3.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/parish/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r3 _c4','/images/navbar/l
wrnavbar_r3_c4_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r3_c4','/images/navbar/lwrnavb
ar_r3_c4_f2.gif','/images/navbar/lwrnavbar_r3_c4_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r3_c4"
src="/images/navbar/lwrnavbar_r3_c4.gif" width="108" height="16"
border="0" alt=""></a></td>
<td><img name="lwrnavbar_r3_c5"
src="/images/navbar/lwrnavbar_r3_c5.gif" width="108" height="16"
border="0" alt=""></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="16" border="0"></td>
</tr>
</table>
<table width="648" height="101" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td width="216" rowspan="3"><a href="/index.html"><img
src="/images/lwrlogo.gif" border="0" align="top"></a></td>
<td width="109" height="16"><div align="left"><a
href="/advocacy/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','homepagenavb ar_r4_c7','/images/hom
epage/homepagenavbar_r4_c7_f3.gif',1)"
onMouseOver="MM_nbGroup('over','homepagenavbar_r4_ c7','/images/homepage/
homepagenavbar_r4_c7_f2.gif','/images/homepage/homepagenavbar_r4_c7_f3.g
if',1)" onMouseOut="MM_nbGroup('out');" ><img
src="/images/homepage/homepagenavbar_r4_c7.gif" alt="Advocacy"
name="homepagenavbar_r4_c7" width="108" height="16"
border="0"></a></div></td>
<td width="215"><div align="right"><img
src="/images/buttons/SerButBl.gif" width="47" height="15"
align="texttop"></div></td>
<td width="108" rowspan="2"><form name="form1" method="get"
action="http://search.atomz.com/search/">
<input size=11 name="sp-q">
<input name="imageField" type="image"
src="/images/buttons/GoButBlu.gif" align="right" width="32" height="15"
border="0">
<input type=hidden name="sp-a" value="sp10018984">
<input type=hidden name="sp-p" value="any">
<input type=hidden name="sp-f" value="iso-8859-1">
</form></td>
</tr>
<tr>
<td height="32">&nbsp;</td>
<td height="32" valign="top"><a href="/fairtrade/index.html"
target="_top"
onClick="MM_nbGroup('down','navbar1','fairtradenav ','/images/homepage/fa
irtrade_o.gif',1)"
onMouseOver="MM_nbGroup('over','fairtradenav','/images/homepage/fairtrad
e_o.gif','/Library/1',1)" onMouseOut="MM_nbGroup('out');" ><img
src="/images/homepage/fairtrade_nav.gif" alt="Fair Trade"
name="fairtradenav" width="108" height="16" border="0"></a></td>
</tr>
<tr>
<td height="46" colspan="3">&nbsp;</td>
</tr>
</table>
<!-- #EndLibraryItem --> </div>
<div align="center">
<p><strong><font color="#660066" size="2" face="Arial">This
e-mail will
be sent to:</font></strong><br>
<font size="2" face="Arial, Helvetica, sans-serif"><%=
Request.Form("toname") %> <font size="1">( <%= Request.Form("toemail")
%> )</font></font></p>
</div> <div align="center">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr align="center" valign="top">
<td width="250">
<form name="send" method="POST" action="<%=MM_editAction%>">
<p>
<input type="submit" name="Submit2" value="Send This
Greeting">
<input name="greetingID" type="hidden"
id="greetingID2" value="<%= Request.Form("greetingID") %>">
<input name="fromemail" type="hidden"
id="fromemail2" value="<%= Request.Form("fromemail") %>">
<input name="fromname" type="hidden" id="fromname2"
value="<%= Request.Form("fromname") %>">
<input name="toemail" type="hidden" id="toemail2"
value="<%= Request.Form("toemail") %>">
<input name="toname" type="hidden" id="toname2"
value="<%= Request.Form("toname") %>">
<input name="message" type="hidden" id="message2"
value="<%= strmessage %>">
<br>
<input name="layout" type="hidden" id="layout2"
value="<%= Request.Form("layout") %>">
<input name="fontcolor" type="hidden"
id="fontcolor2" value="<%= Request.Form("fontcolor") %>">
<input name="fontsize" type="hidden" id="fontsize2"
value="<%= Request.Form("fontsize") %>">
<input name="fontface" type="hidden" id="fontface2"
value="<%= Request.Form("fontface") %>">
<input type="hidden" name="MM_insert" value="send">
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
<input name="MessageID" type="hidden" id="MessageID"
value="<%= strIDFinal %>">
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
</p>
<p> </p>
</form>
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
<%= strIDFinal %>
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
</td>
<td><% dim strgreetingID
strgreetingID = request.form("greetingID")
%><form action="/greetings/compose_card.asp?greetingID=<%=
Request.Form("greetingID") %>" method="post" name="changes"
id="changes">
<input type="submit" name="Submit3" value="Make More
Changes">
<input name="greetingID" type="hidden" id="greetingID"
value="<%= Request.Form("greetingID") %>">
<input name="fromemail" type="hidden" id="fromemail"
value="<%= Request.Form("fromemail") %>">
<input name="fromname" type="hidden" id="fromname"
value="<%= Request.Form("fromname") %>">
<input name="toemail" type="hidden" id="toemail"
value="<%= Request.Form("toemail") %>">
<input name="toname" type="hidden" id="toname"
value="<%= Request.Form("toname") %>">
<input name="message" type="hidden" id="message"
value="<%= Request.Form("message") %>">
<br>
<input name="layout" type="hidden" id="layout"
value="<%= Request.Form("layout") %>">
<input name="fontcolor" type="hidden" id="fontcolor"
value="<%= Request.Form("fontcolor") %>">
<input name="fontsize" type="hidden" id="fontsize"
value="<%= Request.Form("fontsize") %>">
<input name="fontface" type="hidden" id="fontface"
value="<%= Request.Form("fontface") %>">

</form>
</td>
</tr>
</table>
<p><strong><font color="#660066" size="2" face="Arial">
</font></strong></p>
<% dim strLayout ' DETERMINE WHICH LAYOUT TO PREVIEW
strLayout = REQUEST.FORM("layout")
%><%'response.write strLayout %>
<% if strLayout = "card_c.asp" then %>
<table width="700" border="1" cellspacing="3" cellpadding="3">
<tr>
<td bgcolor="#FFFFFF"><font size="2" face="Arial,
Helvetica, sans-serif">Title:
<%=(greetings.Fields.Item("cardtitle").Value)%><br >
Designed by</font>: <font size="2" face="Arial,
Helvetica,
sans-serif"><%=(greetings.Fields.Item("author").Value)% ></font><br>
<hr> <div align="center">
<p><br><font face="<%= Request.Form("fontface") %>" color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize")
%>"><strong>
To: <%= Request.Form("toname") %></p>
<p>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflas
h.cab#version=6,0,29,0" width="400" height="300">
<param name="movie"
value="<%=(greetings.Fields.Item("path").Value)%>< %=(greetings.Fields.It
em("filename").Value)%>">
<param name="quality" value="high">
<embed
src="<%=(greetings.Fields.Item("path").Value)%><%= (greetings.Fields.Item
("filename").Value)%>" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="400" height="300"></embed>
</object>
</p>
<table width="400" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td><div align="left"><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><%= strmessage %><br>
<br>
- <%= Request.Form("fromname") %></font></div></td>
</tr>
</table>
<p>&nbsp;</p>
</div></td>
</tr>
</table>

<p>
<% END if %>
</p>
<p>

<%'response.write strLayout %>
<% if strLayout = "card_l.asp" then %>
</p>
<table width="700" border="1" cellspacing="3" cellpadding="3">
<tr>
<td valign="top" bgcolor="#FFFFFF"><font size="2"
face="Arial, Helvetica, sans-serif">Title:
<%=(greetings.Fields.Item("title").Value)%><br>
Designed by</font>: <font size="2" face="Arial,
Helvetica,
sans-serif"><%=(greetings.Fields.Item("author").Value)% ></font><br>
<hr>
<div align="center">
<table width="700" border="0" cellspacing="3" cellpadding="3">
<tr valign="top">
<td width="400"><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><strong>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflas
h.cab#version=6,0,29,0" width="400" height="300">
<param name="movie"
value="<%=(greetings.Fields.Item("path").Value)%>< %=(greetings.Fields.It
em("filename").Value)%>">
<param name="quality" value="high">
<embed
src="<%=(greetings.Fields.Item("path").Value)%><%= (greetings.Fields.Item
("filename").Value)%>" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="400"
height="300"></embed></object>
</strong></font></td>
<td><font face="<%= Request.Form("fontface") %>"
color="<%= Request.Form("fontcolor") %>" size="<%=
Request.Form("fontsize") %>"><strong>To:
<%= Request.Form("toname")
%></strong></font><font color="<%= Request.Form("fontcolor") %>"
size="<%= Request.Form("fontsize") %>" face="<%=
Request.Form("fontface") %>"><strong><br>
<br>
<%= strmessage %><br>
<br>
- <%= Request.Form("fromname")
%></strong></font></td>
</tr>
</table>

</div></td>
</tr>
</table>
<p>
<% END if %>
</p>
<p>
<%'response.write strLayout %>
<% if strLayout = "card_r.asp" then %>
</p>
<table width="700" border="1" cellspacing="3" cellpadding="3">
<tr>
<td valign="top" bgcolor="#FFFFFF"><font size="2"
face="Arial, Helvetica, sans-serif">Title:
<%=(greetings.Fields.Item("title").Value)%><br>
Designed by</font>: <font size="2" face="Arial,
Helvetica,
sans-serif"><%=(greetings.Fields.Item("author").Value)% ></font><br>
<hr>
<div align="center">
<table width="700" border="0" cellspacing="3" cellpadding="3">
<tr valign="top">
<td width="263"><font face="<%=
Request.Form("fontface") %>" color="<%= Request.Form("fontcolor") %>"
size="<%= Request.Form("fontsize") %>"><strong>To:
<%= Request.Form("toname")
%></strong></font><strong><font color="<%= Request.Form("fontcolor") %>"
size="<%= Request.Form("fontsize") %>" face="<%=
Request.Form("fontface") %>"><br>
</font></strong><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><strong><br>
<%= strmessage %><br>
<br>
- <%= Request.Form("fromname")
%></strong></font></td>
<td width="400"><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><strong>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflas
h.cab#version=6,0,29,0" width="400" height="300">
<param name="movie"
value="<%=(greetings.Fields.Item("path").Value)%>< %=(greetings.Fields.It
em("filename").Value)%>">
<param name="quality" value="high">
<embed
src="<%=(greetings.Fields.Item("path").Value)%><%= (greetings.Fields.Item
("filename").Value)%>" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="400"
height="300"></embed></object>
</strong></font></td>
</tr>
</table>

</div></td>
</tr>
</table>
<% END if %>
<!-- #BeginLibraryItem "/Library/bottom.lbi" -->
<table width="648" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="48"><p align="center"><font size="1"
face="Verdana, Arial, Helvetica, sans-serif"><br>
<a href="/tellafriend.asp">Tell A Friend About
This Page &gt;&gt;</a> </font></p>
<p align="center"><font size="1" face="Verdana, Arial,
Helvetica, sans-serif">| <a href="/index.html">LWR Home</a> | <a
href="/advocacy/index.html">Advocacy</a> | <a
href="/fairtrade/index.html">Fair Trade</a> | <a
href="/emergencies/index.html">Emergencies</a> | <a
href="/news/index.html">News</a> | <a href="/parish/index.html">Be
Involved</a> | <a href="/programs/index.html">Programs</a> | <a
href="/giving/index.html">Contribute</a> |<br>
| <a href="/about/index.html">About Us</a> | <a
href="/contact.html">Contact</a> | <a href="/search.html">Search</a> |
<a href="/sitemap.html">Site Map</a> | <a href="/privacy.html">Privacy
Policy</a> | </font></p>
<p align="center"><font size="1" face="Verdana, Arial,
Helvetica, sans-serif"><strong>Lutheran World Relief</strong> | 700
Light Street | Baltimore, Maryland 21230 | 800-LWR-LWR-2 | <a
href="mailto:lw*@lwr.org">lw*@lwr.org</a></font></p>
<p align="center"><font size="1" face="Verdana, Arial,
Helvetica, sans-serif">Copyright &copy; 1997-2004 Lutheran World
Relief.<br>
This page was last modified on:
<!-- #BeginDate format:Am1 -->February 2, 2004<!-- #EndDate
-->
</font></p></td>
</tr>
</table>
<!-- #EndLibraryItem --></div></TD>
</TR>
</TABLE>
</div>
</BODY>
</HTML>
<%
greetings.Close()
Set greetings = Nothing
%>


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #5

P: n/a
I put your code into a page and chopped enough out that it would run.

I get the same id in all locations. I don't know what is going on but you
might try adding parens to the genguid call so that the runtime knows you
want to assign the function value to the variable and not the function
itself (never seen this with VBScript but in JScript you can assign a
function to a variable).

strIDFinal = genguid()

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"BigDaddyWeaver" <an*******@devdex.com> wrote in message
news:u%****************@tk2msftngp13.phx.gbl...

<<<<Why are you assigning strIDFinal to itself?>>>>

I was just trying to kill the genGUID. Have since altered. Still
updates ID every time strIDFinal is used.
<<<< How are you determining that the values are different? >>>>

I am writing strIDFinal to page:
<%= strIDFinal %>

<<<< Are you generating a new id on the page being posted to or are you
getting
the value from the hidden field? It would help if you showed your code.
>


I want to generate one ID. I want to insert it into the database as the
primary key for the record. I want to pass that same variable to the
next page in the url string. The problem is that the value that I write
to the page and the value that gets passed in the url are different.

Here is the entire code. It is lengthy. I will comment key areas with
'%%%%%%%%%%%%%%%%%%%%%%%%%%


<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/egreetings.asp" -->
<% dim strMessage
strmessage= Replace(Request("message"), vbCrLf, "<BR>") %>
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
'GENERATE UNIQUE ID
Function genguid()
Dim Guid
guid = server.createobject("scriptlet.typelib").guid
guid=Left(guid,instr(guid,"}"))
genguid=guid
genguid= replace(guid, "}", "") ' strip out } from generated ID
genguid= replace(genguid, "{", "") ' strip out { from generated ID
genguid= replace(genguid, "-", "") ' strip out - from generated ID
genguid= replace(genguid, "'", "") ' strip out ' from generated ID
Set guid=nothing
end function
%>
<% Dim strIDFinal

strIDFinal = genguid

'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
%>
<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) = "send") Then

MM_editConnection = MM_egreetings_STRING
MM_editTable = "messages"
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
MM_editRedirectUrl = "/greetings/mail_greeting_c.asp?messageID=" &
strIDFinal & ""
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%
MM_fieldsStr =
"greetingID|value|fromemail|value|fromname|value|t oemail|value|toname|va
lue|message|value|layout|value|fontcolor|value|fon tsize|value|fontface|v
alue|MessageID|value"
MM_columnsStr =
"greetingID|none,none,NULL|fromemail|',none,''|fro mname|',none,''|toemai
l|',none,''|toname|',none,''|message|',none,''|lay out|',none,''|fontcolo
r|',none,''|fontsize|none,none,NULL|fontface|',non e,''|messageID|',none,
''"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")

' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" &
Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" &
Request.QueryString
End If
End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(Request("MM_insert")) <> "") Then

' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues &
") values (" & MM_dbValues & ")"

If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%>
<%
Dim greetings__MMColParam
greetings__MMColParam = "1"
If (Request.querystring("greetingID") <> "") Then
greetings__MMColParam = Request.querystring("greetingID")
End If
%>
<%
Dim greetings
Dim greetings_numRows

Set greetings = Server.CreateObject("ADODB.Recordset")
greetings.ActiveConnection = MM_egreetings_STRING
greetings.Source = "SELECT * FROM cards, categories WHERE
cards.greetingID = " + Replace(greetings__MMColParam, "'", "''") + " AND
cards.categoryID = categories.categoryID"
greetings.CursorType = 0
greetings.CursorLocation = 2
greetings.LockType = 1
greetings.Open()

greetings_numRows = 0
%>

<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="Microsoft FrontPage 4.0">
<TITLE>Preview Your e-Greeting at lwr.org</TITLE>

</HEAD>
<BODY BGCOLOR="ffffff" LINK="#660066" ALINK="#660066"
onLoad="MM_preloadImages('/images/navbar/lwrnavbar_r1_c2_f3.gif','/image
s/navbar/lwrnavbar_r1_c2_f2.gif','/images/navbar/lwrnavbar_r1_c2_f4.gif'
,'/images/navbar/lwrnavbar_r1_c4_f3.gif','/images/navbar/lwrnavbar_r1_c4
_f2.gif','/images/navbar/lwrnavbar_r1_c4_f4.gif','/images/navbar/lwrnavb
ar_r1_c6_f3.gif','/images/navbar/lwrnavbar_r1_c6_f2.gif','/images/navbar
/lwrnavbar_r1_c6_f4.gif','/images/navbar/lwrnavbar_r2_c1_f3.gif','/image
s/navbar/lwrnavbar_r2_c1_f2.gif','/images/navbar/lwrnavbar_r2_c1_f4.gif'
,'/images/navbar/lwrnavbar_r2_c3_f3.gif','/images/navbar/lwrnavbar_r2_c3
_f2.gif','/images/navbar/lwrnavbar_r2_c3_f4.gif','/images/navbar/lwrnavb
ar_r2_c5_f3.gif','/images/navbar/lwrnavbar_r2_c5_f2.gif','/images/navbar
/lwrnavbar_r2_c5_f4.gif','/images/navbar/lwrnavbar_r3_c2_f3.gif','/image
s/navbar/lwrnavbar_r3_c2_f2.gif','/images/navbar/lwrnavbar_r3_c2_f4.gif'
,'/images/navbar/lwrnavbar_r3_c4_f3.gif','/images/navbar/lwrnavbar_r3_c4
_f2.gif','/images/navbar/lwrnavbar_r3_c4_f4.gif','/images/homepage/homep
agenavbar_r4_c7_f3.gif','/images/homepage/homepagenavbar_r4_c7_f2.gif','
/images/homepage/fairtrade_o.gif','/Library/1')">
<div align="center">
<TABLE WIDTH="780" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD VALIGN="TOP"> <div align="center">
<OBJECT RUNAT="server" PROGID="ADODB.Connection" id="conn">
</OBJECT>
<!-- #BeginLibraryItem "/Library/NavBar.lbi" -->
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName]
= new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?
args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn :
img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src =
img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
<body
onLoad="MM_preloadImages('../images/navbar/lwrnavbar_r1_c2_f3.gif','../i
mages/navbar/lwrnavbar_r1_c2_f2.gif','../images/navbar/lwrnavbar_r1_c2_f
4.gif','../images/navbar/lwrnavbar_r1_c4_f3.gif','../images/navbar/lwrna
vbar_r1_c4_f2.gif','../images/navbar/lwrnavbar_r1_c4_f4.gif','../images/
navbar/lwrnavbar_r1_c6_f3.gif','../images/navbar/lwrnavbar_r1_c6_f2.gif'
,'../images/navbar/lwrnavbar_r1_c6_f4.gif','../images/navbar/lwrnavbar_r
2_c1_f3.gif','../images/navbar/lwrnavbar_r2_c1_f2.gif','../images/navbar
/lwrnavbar_r2_c1_f4.gif','../images/navbar/lwrnavbar_r2_c3_f3.gif','../i
mages/navbar/lwrnavbar_r2_c3_f2.gif','../images/navbar/lwrnavbar_r2_c3_f
4.gif','../images/navbar/lwrnavbar_r2_c5_f3.gif','../images/navbar/lwrna
vbar_r2_c5_f2.gif','../images/navbar/lwrnavbar_r2_c5_f4.gif','../images/
navbar/lwrnavbar_r3_c2_f3.gif','../images/navbar/lwrnavbar_r3_c2_f2.gif'
,'../images/navbar/lwrnavbar_r3_c2_f4.gif','../images/navbar/lwrnavbar_r
3_c4_f3.gif','../images/navbar/lwrnavbar_r3_c4_f2.gif','../images/navbar
/lwrnavbar_r3_c4_f4.gif','../images/homepage/homepagenavbar_r4_c7_f3.gif
','../images/homepage/homepagenavbar_r4_c7_f2.gif','/images/homepage/fai
rtrade_o.gif')">
<table border="0" cellpadding="0" cellspacing="0" width="648">
<!-- fwtable fwsrc="lwrnavbar.png" fwbase="lwrnavbar.gif"
fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="108" height="1" border="0"></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="1" border="0"></td>
</tr>
<tr>
<td><img name="lwrnavbar_r1_c1"
src="/images/navbar/lwrnavbar_r1_c1.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/programs/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r1 _c2','/images/navbar/l
wrnavbar_r1_c2_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r1_c2','/images/navbar/lwrnavb
ar_r1_c2_f2.gif','/images/navbar/lwrnavbar_r1_c2_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r1_c2"
src="/images/navbar/lwrnavbar_r1_c2.gif" width="108" height="16"
border="0" alt="LWR Programs"></a></td>
<td><img name="lwrnavbar_r1_c3"
src="/images/navbar/lwrnavbar_r1_c3.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/about/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r1 _c4','/images/navbar/l
wrnavbar_r1_c4_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r1_c4','/images/navbar/lwrnavb
ar_r1_c4_f2.gif','/images/navbar/lwrnavbar_r1_c4_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r1_c4"
src="/images/navbar/lwrnavbar_r1_c4.gif" width="108" height="16"
border="0" alt="About LWR"></a></td>
<td><img name="lwrnavbar_r1_c5"
src="/images/navbar/lwrnavbar_r1_c5.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r1 _c6','/images/navbar/l
wrnavbar_r1_c6_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r1_c6','/images/navbar/lwrnavb
ar_r1_c6_f2.gif','/images/navbar/lwrnavbar_r1_c6_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r1_c6"
src="/images/navbar/lwrnavbar_r1_c6.gif" width="108" height="16"
border="0" alt="LWR Home"></a></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="16" border="0"></td>
</tr>
<tr>
<td><a href="/emergencies/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r2 _c1','/images/navbar/l
wrnavbar_r2_c1_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r2_c1','/images/navbar/lwrnavb
ar_r2_c1_f2.gif','/images/navbar/lwrnavbar_r2_c1_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r2_c1"
src="/images/navbar/lwrnavbar_r2_c1.gif" width="108" height="16"
border="0" alt=""></a></td>
<td><img name="lwrnavbar_r2_c2"
src="/images/navbar/lwrnavbar_r2_c2.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/giving/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r2 _c3','/images/navbar/l
wrnavbar_r2_c3_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r2_c3','/images/navbar/lwrnavb
ar_r2_c3_f2.gif','/images/navbar/lwrnavbar_r2_c3_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r2_c3"
src="/images/navbar/lwrnavbar_r2_c3.gif" width="108" height="16"
border="0" alt="Contribute to LWR"></a></td>
<td><img name="lwrnavbar_r2_c4"
src="/images/navbar/lwrnavbar_r2_c4.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/contact.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r2 _c5','/images/navbar/l
wrnavbar_r2_c5_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r2_c5','/images/navbar/lwrnavb
ar_r2_c5_f2.gif','/images/navbar/lwrnavbar_r2_c5_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r2_c5"
src="/images/navbar/lwrnavbar_r2_c5.gif" width="108" height="16"
border="0" alt="Contact LWR"></a></td>
<td rowspan="2" valign="top"><img name="lwrnavbar_r2_c6"
src="/images/navbar/lwrnavbar_r2_c6.gif" width="108" height="16"
border="0" alt=""><br>
</td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="16" border="0"></td>
</tr>
<tr>
<td><img name="lwrnavbar_r3_c1"
src="/images/navbar/lwrnavbar_r3_c1.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/news/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r3 _c2','/images/navbar/l
wrnavbar_r3_c2_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r3_c2','/images/navbar/lwrnavb
ar_r3_c2_f2.gif','/images/navbar/lwrnavbar_r3_c2_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r3_c2"
src="/images/navbar/lwrnavbar_r3_c2.gif" width="108" height="16"
border="0" alt="News from LWR"></a></td>
<td><img name="lwrnavbar_r3_c3"
src="/images/navbar/lwrnavbar_r3_c3.gif" width="108" height="16"
border="0" alt=""></td>
<td><a href="/parish/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','lwrnavbar_r3 _c4','/images/navbar/l
wrnavbar_r3_c4_f3.gif',1)"
onMouseOver="MM_nbGroup('over','lwrnavbar_r3_c4','/images/navbar/lwrnavb
ar_r3_c4_f2.gif','/images/navbar/lwrnavbar_r3_c4_f4.gif',1)"
onMouseOut="MM_nbGroup('out');"><img name="lwrnavbar_r3_c4"
src="/images/navbar/lwrnavbar_r3_c4.gif" width="108" height="16"
border="0" alt=""></a></td>
<td><img name="lwrnavbar_r3_c5"
src="/images/navbar/lwrnavbar_r3_c5.gif" width="108" height="16"
border="0" alt=""></td>
<td><img src="/images/navbar/spacer.gif" alt=""
name="undefined_2" width="1" height="16" border="0"></td>
</tr>
</table>
<table width="648" height="101" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td width="216" rowspan="3"><a href="/index.html"><img
src="/images/lwrlogo.gif" border="0" align="top"></a></td>
<td width="109" height="16"><div align="left"><a
href="/advocacy/index.html" target="_top"
onClick="MM_nbGroup('down','navbar1','homepagenavb ar_r4_c7','/images/hom
epage/homepagenavbar_r4_c7_f3.gif',1)"
onMouseOver="MM_nbGroup('over','homepagenavbar_r4_ c7','/images/homepage/
homepagenavbar_r4_c7_f2.gif','/images/homepage/homepagenavbar_r4_c7_f3.g
if',1)" onMouseOut="MM_nbGroup('out');" ><img
src="/images/homepage/homepagenavbar_r4_c7.gif" alt="Advocacy"
name="homepagenavbar_r4_c7" width="108" height="16"
border="0"></a></div></td>
<td width="215"><div align="right"><img
src="/images/buttons/SerButBl.gif" width="47" height="15"
align="texttop"></div></td>
<td width="108" rowspan="2"><form name="form1" method="get"
action="http://search.atomz.com/search/">
<input size=11 name="sp-q">
<input name="imageField" type="image"
src="/images/buttons/GoButBlu.gif" align="right" width="32" height="15"
border="0">
<input type=hidden name="sp-a" value="sp10018984">
<input type=hidden name="sp-p" value="any">
<input type=hidden name="sp-f" value="iso-8859-1">
</form></td>
</tr>
<tr>
<td height="32">&nbsp;</td>
<td height="32" valign="top"><a href="/fairtrade/index.html"
target="_top"
onClick="MM_nbGroup('down','navbar1','fairtradenav ','/images/homepage/fa
irtrade_o.gif',1)"
onMouseOver="MM_nbGroup('over','fairtradenav','/images/homepage/fairtrad
e_o.gif','/Library/1',1)" onMouseOut="MM_nbGroup('out');" ><img
src="/images/homepage/fairtrade_nav.gif" alt="Fair Trade"
name="fairtradenav" width="108" height="16" border="0"></a></td>
</tr>
<tr>
<td height="46" colspan="3">&nbsp;</td>
</tr>
</table>
<!-- #EndLibraryItem --> </div>
<div align="center">
<p><strong><font color="#660066" size="2" face="Arial">This
e-mail will
be sent to:</font></strong><br>
<font size="2" face="Arial, Helvetica, sans-serif"><%=
Request.Form("toname") %> <font size="1">( <%= Request.Form("toemail")
%> )</font></font></p>
</div> <div align="center">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr align="center" valign="top">
<td width="250">
<form name="send" method="POST" action="<%=MM_editAction%>">
<p>
<input type="submit" name="Submit2" value="Send This
Greeting">
<input name="greetingID" type="hidden"
id="greetingID2" value="<%= Request.Form("greetingID") %>">
<input name="fromemail" type="hidden"
id="fromemail2" value="<%= Request.Form("fromemail") %>">
<input name="fromname" type="hidden" id="fromname2"
value="<%= Request.Form("fromname") %>">
<input name="toemail" type="hidden" id="toemail2"
value="<%= Request.Form("toemail") %>">
<input name="toname" type="hidden" id="toname2"
value="<%= Request.Form("toname") %>">
<input name="message" type="hidden" id="message2"
value="<%= strmessage %>">
<br>
<input name="layout" type="hidden" id="layout2"
value="<%= Request.Form("layout") %>">
<input name="fontcolor" type="hidden"
id="fontcolor2" value="<%= Request.Form("fontcolor") %>">
<input name="fontsize" type="hidden" id="fontsize2"
value="<%= Request.Form("fontsize") %>">
<input name="fontface" type="hidden" id="fontface2"
value="<%= Request.Form("fontface") %>">
<input type="hidden" name="MM_insert" value="send">
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
<input name="MessageID" type="hidden" id="MessageID"
value="<%= strIDFinal %>">
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
</p>
<p> </p>
</form>
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
<%= strIDFinal %>
<% '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %>
</td>
<td><% dim strgreetingID
strgreetingID = request.form("greetingID")
%><form action="/greetings/compose_card.asp?greetingID=<%=
Request.Form("greetingID") %>" method="post" name="changes"
id="changes">
<input type="submit" name="Submit3" value="Make More
Changes">
<input name="greetingID" type="hidden" id="greetingID"
value="<%= Request.Form("greetingID") %>">
<input name="fromemail" type="hidden" id="fromemail"
value="<%= Request.Form("fromemail") %>">
<input name="fromname" type="hidden" id="fromname"
value="<%= Request.Form("fromname") %>">
<input name="toemail" type="hidden" id="toemail"
value="<%= Request.Form("toemail") %>">
<input name="toname" type="hidden" id="toname"
value="<%= Request.Form("toname") %>">
<input name="message" type="hidden" id="message"
value="<%= Request.Form("message") %>">
<br>
<input name="layout" type="hidden" id="layout"
value="<%= Request.Form("layout") %>">
<input name="fontcolor" type="hidden" id="fontcolor"
value="<%= Request.Form("fontcolor") %>">
<input name="fontsize" type="hidden" id="fontsize"
value="<%= Request.Form("fontsize") %>">
<input name="fontface" type="hidden" id="fontface"
value="<%= Request.Form("fontface") %>">

</form>
</td>
</tr>
</table>
<p><strong><font color="#660066" size="2" face="Arial">
</font></strong></p>
<% dim strLayout ' DETERMINE WHICH LAYOUT TO PREVIEW
strLayout = REQUEST.FORM("layout")
%><%'response.write strLayout %>
<% if strLayout = "card_c.asp" then %>
<table width="700" border="1" cellspacing="3" cellpadding="3">
<tr>
<td bgcolor="#FFFFFF"><font size="2" face="Arial,
Helvetica, sans-serif">Title:
<%=(greetings.Fields.Item("cardtitle").Value)%><br >
Designed by</font>: <font size="2" face="Arial,
Helvetica,
sans-serif"><%=(greetings.Fields.Item("author").Value)% ></font><br>
<hr> <div align="center">
<p><br><font face="<%= Request.Form("fontface") %>" color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize")
%>"><strong>
To: <%= Request.Form("toname") %></p>
<p>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflas
h.cab#version=6,0,29,0" width="400" height="300">
<param name="movie"
value="<%=(greetings.Fields.Item("path").Value)%>< %=(greetings.Fields.It
em("filename").Value)%>">
<param name="quality" value="high">
<embed
src="<%=(greetings.Fields.Item("path").Value)%><%= (greetings.Fields.Item
("filename").Value)%>" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="400" height="300"></embed>
</object>
</p>
<table width="400" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td><div align="left"><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><%= strmessage %><br>
<br>
- <%= Request.Form("fromname") %></font></div></td>
</tr>
</table>
<p>&nbsp;</p>
</div></td>
</tr>
</table>

<p>
<% END if %>
</p>
<p>

<%'response.write strLayout %>
<% if strLayout = "card_l.asp" then %>
</p>
<table width="700" border="1" cellspacing="3" cellpadding="3">
<tr>
<td valign="top" bgcolor="#FFFFFF"><font size="2"
face="Arial, Helvetica, sans-serif">Title:
<%=(greetings.Fields.Item("title").Value)%><br>
Designed by</font>: <font size="2" face="Arial,
Helvetica,
sans-serif"><%=(greetings.Fields.Item("author").Value)% ></font><br>
<hr>
<div align="center">
<table width="700" border="0" cellspacing="3" cellpadding="3">
<tr valign="top">
<td width="400"><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><strong>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflas
h.cab#version=6,0,29,0" width="400" height="300">
<param name="movie"
value="<%=(greetings.Fields.Item("path").Value)%>< %=(greetings.Fields.It
em("filename").Value)%>">
<param name="quality" value="high">
<embed
src="<%=(greetings.Fields.Item("path").Value)%><%= (greetings.Fields.Item
("filename").Value)%>" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="400"
height="300"></embed></object>
</strong></font></td>
<td><font face="<%= Request.Form("fontface") %>"
color="<%= Request.Form("fontcolor") %>" size="<%=
Request.Form("fontsize") %>"><strong>To:
<%= Request.Form("toname")
%></strong></font><font color="<%= Request.Form("fontcolor") %>"
size="<%= Request.Form("fontsize") %>" face="<%=
Request.Form("fontface") %>"><strong><br>
<br>
<%= strmessage %><br>
<br>
- <%= Request.Form("fromname")
%></strong></font></td>
</tr>
</table>

</div></td>
</tr>
</table>
<p>
<% END if %>
</p>
<p>
<%'response.write strLayout %>
<% if strLayout = "card_r.asp" then %>
</p>
<table width="700" border="1" cellspacing="3" cellpadding="3">
<tr>
<td valign="top" bgcolor="#FFFFFF"><font size="2"
face="Arial, Helvetica, sans-serif">Title:
<%=(greetings.Fields.Item("title").Value)%><br>
Designed by</font>: <font size="2" face="Arial,
Helvetica,
sans-serif"><%=(greetings.Fields.Item("author").Value)% ></font><br>
<hr>
<div align="center">
<table width="700" border="0" cellspacing="3" cellpadding="3">
<tr valign="top">
<td width="263"><font face="<%=
Request.Form("fontface") %>" color="<%= Request.Form("fontcolor") %>"
size="<%= Request.Form("fontsize") %>"><strong>To:
<%= Request.Form("toname")
%></strong></font><strong><font color="<%= Request.Form("fontcolor") %>"
size="<%= Request.Form("fontsize") %>" face="<%=
Request.Form("fontface") %>"><br>
</font></strong><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><strong><br>
<%= strmessage %><br>
<br>
- <%= Request.Form("fromname")
%></strong></font></td>
<td width="400"><font color="<%=
Request.Form("fontcolor") %>" size="<%= Request.Form("fontsize") %>"
face="<%= Request.Form("fontface") %>"><strong>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflas
h.cab#version=6,0,29,0" width="400" height="300">
<param name="movie"
value="<%=(greetings.Fields.Item("path").Value)%>< %=(greetings.Fields.It
em("filename").Value)%>">
<param name="quality" value="high">
<embed
src="<%=(greetings.Fields.Item("path").Value)%><%= (greetings.Fields.Item
("filename").Value)%>" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="400"
height="300"></embed></object>
</strong></font></td>
</tr>
</table>

</div></td>
</tr>
</table>
<% END if %>
<!-- #BeginLibraryItem "/Library/bottom.lbi" -->
<table width="648" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="48"><p align="center"><font size="1"
face="Verdana, Arial, Helvetica, sans-serif"><br>
<a href="/tellafriend.asp">Tell A Friend About
This Page &gt;&gt;</a> </font></p>
<p align="center"><font size="1" face="Verdana, Arial,
Helvetica, sans-serif">| <a href="/index.html">LWR Home</a> | <a
href="/advocacy/index.html">Advocacy</a> | <a
href="/fairtrade/index.html">Fair Trade</a> | <a
href="/emergencies/index.html">Emergencies</a> | <a
href="/news/index.html">News</a> | <a href="/parish/index.html">Be
Involved</a> | <a href="/programs/index.html">Programs</a> | <a
href="/giving/index.html">Contribute</a> |<br>
| <a href="/about/index.html">About Us</a> | <a
href="/contact.html">Contact</a> | <a href="/search.html">Search</a> |
<a href="/sitemap.html">Site Map</a> | <a href="/privacy.html">Privacy
Policy</a> | </font></p>
<p align="center"><font size="1" face="Verdana, Arial,
Helvetica, sans-serif"><strong>Lutheran World Relief</strong> | 700
Light Street | Baltimore, Maryland 21230 | 800-LWR-LWR-2 | <a
href="mailto:lw*@lwr.org">lw*@lwr.org</a></font></p>
<p align="center"><font size="1" face="Verdana, Arial,
Helvetica, sans-serif">Copyright &copy; 1997-2004 Lutheran World
Relief.<br>
This page was last modified on:
<!-- #BeginDate format:Am1 -->February 2, 2004<!-- #EndDate
-->
</font></p></td>
</tr>
</table>
<!-- #EndLibraryItem --></div></TD>
</TR>
</TABLE>
</div>
</BODY>
</HTML>
<%
greetings.Close()
Set greetings = Nothing
%>


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #6

P: n/a

BigDaddyWeaverThanks for the help. This is what ended up working for me
from your help and the help of another author.

<%
Dim xGUID
xGUID = ""
Call genguid(xGUID)

' Now it is in a local variable (xGUID) and can be used many times
Response.Write(xGUID) ' to test output
%>
<%
'GENERATE UNIQUE ID

Function genguid(xGUID)
Dim Guid
guid = server.createobject("scriptlet.typelib").guid
guid=Left(guid,instr(guid,"}"))
xGUID=guid
Set guid=nothing

xGUID= replace(xGUID, "}", "")
xGUID= replace(xGUID, "{", "")
xGUID= replace(xGUID, "-", "")
xGUID= replace(xGUID, "'", "")
End function
%>
I defined my form variable as:
MessageID = <%= (xGUID) %>

My redirect url was:
MM_editRedirectUrl = "/greetings/mail_greeting_c.asp?messageID=" &
CStr(Request.form("MessageID")) & ""
The problem was in the redirect URL.
If I tried:

MM_editRedirectUrl = "/greetings/mail_greeting_c.asp?messageID=" &
(xGUID) & ""

My ID in the URL turned out to be different than my form variable.

Thanks for the help!!!!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.