Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 How to 'preview'?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

SubKamran
Junior Member

101 Posts

Posted - 30 August 2002 :  15:11:49  Show Profile  Visit SubKamran's Homepage  Send SubKamran an AOL message  Send SubKamran a Yahoo! Message
I saw this code and I tried to use it, but it doesn't work...


<script language="javascript">
function OpenPreview()
{
	var curCookie = "strMessagePreview=" + escape(document.MassMail.email.value);
	document.cookie = curCookie;
	popupWin = window.open('../popup/preview.asp', 'preview_page', 'scrollbars=yes,width=650,height=450')	
}
//-->
</script>


Then, I just added 'onclick="OpenPreview()"' to my preview button...then it opens THIS page but it doesn't display my message!


<%@ Language=VBScript %>
<html>
	<head>
		<title>Preview</title>
		<link rel="stylesheet" href="../css/default.css" />
	</head>
<body>
<!-- #include virtual="includes/functions.asp" -->
<%
'*********************
'** Setup Page Vars **
'*********************
	Dim message
		strMessagePreview = Request.Cookies("strMessagePreview")
		Response.Cookies("strMessagePreview") = ""

'****************
'** Disp Table **
'****************
%>
<table width="100%" cellpadding="3" cellspacing="1" class="OBTable">
	<tr>
		<td class="CommentTitle" align="center"><span class="BlueLabel">Preview</span></td>
	</tr>
	<tr>
		<td class="alt1">
		<%= Trim(Decode(strMessagePreview)) %>
		</td>
	</tr>
</table>
</body>
</html>


What's up?

Kamran A
Minneapolis, MN
Web Developer
http://intrepid.newsbyteens.com/

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 30 August 2002 :  17:04:42  Show Profile
What does Decode(strMessagePreview) do?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

SubKamran
Junior Member

101 Posts

Posted - 31 August 2002 :  16:48:14  Show Profile  Visit SubKamran's Homepage  Send SubKamran an AOL message  Send SubKamran a Yahoo! Message
It just let's me view HTML...

So instead of <b>bold</b> it's bold

Kamran A
Minneapolis, MN
Web Developer
http://intrepid.newsbyteens.com/
Go to Top of Page

SubKamran
Junior Member

101 Posts

Posted - 05 September 2002 :  10:38:01  Show Profile  Visit SubKamran's Homepage  Send SubKamran an AOL message  Send SubKamran a Yahoo! Message
HOW DOES SNITZ DO IT?!

just wondering, cuz I have a 'Mass Emailer' and I need to be able to preview my email before I send it!

How does Snitz take care of it?

Kamran A
Minneapolis, MN
Web Developer
http://intrepid.newsbyteens.com/
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 05 September 2002 :  10:45:39  Show Profile
snizt stores the message as a cookie, then pop-up winodws reads the message from the cookie, I think.

I don't like the way snitz does preview. You can alternatively preview your message using request.form. vBulletin does it this way.
Go to Top of Page

SubKamran
Junior Member

101 Posts

Posted - 05 September 2002 :  10:48:26  Show Profile  Visit SubKamran's Homepage  Send SubKamran an AOL message  Send SubKamran a Yahoo! Message
yes, but how can I submit a form if I have two buttons that do it?

Know what i mean?

Kamran A
Minneapolis, MN
Web Developer
http://intrepid.newsbyteens.com/

Edited by - SubKamran on 05 September 2002 10:48:57
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 05 September 2002 :  10:56:40  Show Profile
sorry I couldn't get it. if you mean how to preview, that's not hard, and better provides you with "real" preview.

You can add a new input to your form like

<input name="action" value="Preview" /> <input name="action" value="Submit" />

then you use

select case Request.Form("action")

case ........

..

hope that helps.

Edited by - blackinwhite on 05 September 2002 10:57:13
Go to Top of Page

SubKamran
Junior Member

101 Posts

Posted - 05 September 2002 :  10:58:09  Show Profile  Visit SubKamran's Homepage  Send SubKamran an AOL message  Send SubKamran a Yahoo! Message
o ic...but, how does thee form submit itself?

Kamran A
Minneapolis, MN
Web Developer
http://intrepid.newsbyteens.com/
Go to Top of Page

SubKamran
Junior Member

101 Posts

Posted - 05 September 2002 :  11:02:27  Show Profile  Visit SubKamran's Homepage  Send SubKamran an AOL message  Send SubKamran a Yahoo! Message
Problem, it shows two textboxes with the values...

It needs, type="*"

See, how can I submit a form with two buttons?

Kamran A
Minneapolis, MN
Web Developer
http://intrepid.newsbyteens.com/
Go to Top of Page

SubKamran
Junior Member

101 Posts

Posted - 05 September 2002 :  11:03:41  Show Profile  Visit SubKamran's Homepage  Send SubKamran an AOL message  Send SubKamran a Yahoo! Message
I have an idea. Have a checkbox with a value of '1' and name it 'preview'

If the person checked it, preview the message, if not, send it

Kamran A
Minneapolis, MN
Web Developer
http://intrepid.newsbyteens.com/
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 05 September 2002 :  11:03:43  Show Profile
<input type="button" name="action" value="Preview" /> <input type="button" name="action" value="Submit" /> are two buttons.

they also had the values, one Preview, other Submit.

normally, the stuff your submit file has, can be put under

case submit

when you press submit, code under the case submit will be processed. Otherwise, preview will be processed.

in the

case preview

you can do something like.

pTitle =
p Message =

etc

Response.Write p Title
Response.Write "<div class=""message"">" & pMessage & "</div>"

etc.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07