Print Page | Close Window

Duware Gallery

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=17418
Printed Date: 29 March 2026 at 10:14am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Duware Gallery
Posted By: angkorboy
Subject: Duware Gallery
Date Posted: 01 December 2005 at 7:11am

Hello

I am trying to enable user to send pic from duware gallery on my site.
but it has problem with invalid string when i acess sendpicture.asp . can anyone help?
 
 
<a href="JavaScript:openWindow('sendpicture.asp?url=http://www.mysite.com/gallery/picz.asp?iPic=<%=R equest.QueryString("iPic")%>')">E-mail <%=(rsPic.Fields.Item("PIC_NAME").Value)%>'s Picture to a friend</a></font></b></p>
 
 
sendpicture.asp code:

<%

Dim strSender
Dim strRecipientsName
Dim strRecipients
Dim strSubject
Dim strMessage

strRecipientsName = Request.Form("Name")
strRecipients = Request.Form("Email")
strSubject = "From: " & Request.Form("YName") & " Picture"
strMessage = "Hello " & Request.Form("Name") & vbCrLf & vbCrLf
strMessage = strMessage & Request.Form("Msg") & vbCrLf & vbCrLf
strMessage = strMessage & "You received this from : " & Request.Form("YName") & " " & Request.Form("YEmail")
strSender = Request.Form("YEmail")
%>
<%

  Set objNewMail = Server.CreateObject ("CDONTS.NewMail")
        objNewMail.cc = "
mailto:your_email@yourdomain.com - your_email@yourdomain.com "
  objNewMail.BodyFormat = 1
  objNewMail.MailFormat = 0
  on error resume next '## Ignore Errors
  objNewMail.Send strSender, strRecipients, strSubject, strMessage
  If Err <> 0 Then
  Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
  End if
  on error resume next '## Ignore Errors
Set objNewMail = Nothing
%>

<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.0
  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[n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf(
mailto:@ - '@' );
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
<p align="center"><b><font face="2" size="4">Send
Picture&nbsp; to a Friend</font></b></p>

<form action="sendpicture.asp?" method=post id=Form1 name=Form1>
<input type=hidden name="Page" value="<% =Request.QueryString %>">
 
<table border="0" width="100%%" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#e4e4e4">
    <div align="center">
      <center>
    <table border="0" width="100%" cellspacing="1" cellpadding="1">
      <TR>
        <TD bgColor=#e4e4e4 align="right" nowrap><b><font face="arial" size="2">Your
          Friend's Name:</font></b></td>
        <TD bgColor=#e4e4e4><input type=text name="Name" size=25></td>
      </tr>
      <TR>
        <TD bgColor=#e4e4e4 align="right" nowrap><b><font face="arial" size="2">Your
          Friend's Email:</font></b></td>
        <TD bgColor=#e4e4e4><input type=text name="Email" size=25></td>
      </tr>                ;
      <tr>
  
        <td bgColor=#e4e4e4 align="right" nowrap><b><font face="arial" size=2>Your Name:</font></b></td>
        <td bgColor=#e4e4e4><input name=YName type=<% if YName <> "" then Response.Write("hidden") else Response.Write("text") end if%> value="<% = YName %>" size=25><font face="arial" size=2> <% if YName <> "" then Response.Write(YName) end if %></font></td>
      </tr>
      <tr>
        <td bgColor=#e4e4e4 align="right" nowrap><b><font face="arial" size=2>Your Email:</font></b></td>
        <td bgColor=#e4e4e4><input name=YEmail type=<% if YEmail <> "" then Response.Write("hidden") else Response.Write("text") end if %> value="<% = YEmail %>" size=25><font face="arial" size=2> <% if YEmail <> "" then Response.Write(YEmail) end if %></font></td>
      </tr>

      <tr>
        <td bgColor=#e4e4e4 colspan=2 nowrap>
          <p align="center"><b><font face="arial" size=2>Message:</font></b></p>
        </td>
      </tr>
      <tr>
        <td bgColor=#e4e4e4 colspan=2 align=center><textarea name="Msg" cols="40" rows=11 readonly>Hi,<% =vbCrLf %>A friend has sent you a picture from
www.ex-design




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net