[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

Pop-up coupon

How do you make a pop-up coupon without menu bar? I need them to be able to print the coupon.  Is there way to put a counter on the coupon - to stop photo copy coupons?
I am using DreamWeaver 2.
0
lmcharlton
Asked:
lmcharlton
1 Solution
 
ddarby14Commented:
Hi!

2 Options for you:

1) You want to open other popup windows

a)Put this in between the <head></head> tags of your main document from which you will launch the popup:

<script language="JavaScript" type="text/JavaScript">
<!--
function openPopup(URL,windowName,preferences) {
  window.open(URL,windowName,preferences);
}
//-->
</script>

b)Use this code to link text or an image somewhere in the body of your main document:

<a href="javascript:;" onclick="openPopup('coupon.htm','coupon','width=300,height=300,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no')">coupon</a>

c)adjust the width and height per your needs.  all of the rest of the options (toolbar, etc) can be left out - this is the same as NO, but i put these in to show you your options. You can use this same code for multiple links/popups by just changing the URL reference and preferences.


2) You only have 1 window to popup and want it quick and dirty:

a)Use this code to link text or an image somewhere in the body of your main document:

<a href="javascript:;" onclick="window.open('coupon.htm','coupon','width=300,height=300,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');">coupon</a>

b)options are same as above and if option=NO, it can just be removed.


PRINT:
Inside your popup window, you could put a link such as:
<a href="javascript: window.print();">print coupon</a>

or if you are only displaying a graphic, you could include a "press CTRL-P to print" instruction in the graphic.

COUNTER:
My only thoughts for now are do you have access to CGI on your web server? The only way I can think to have a counter is to write the current 'coupon number' to a file, then use CGI to call the coupon window at the same time, increasing the counter by 1 each time.  Let me know if you would like more thoughts on this...

I hope this helps.
0
 
Saqib KhanSenior DeveloperCommented:
I hope you got the Pop up solution Above.

For the Counter what exactly you want?
You want to increase the # each Time a user Click's your Coupon?

if yes then can you run ASP from your Server?
if yes then that is very simple and easy to do.

if you dont have ASP Support then we can Write javaScript Cookies to increament the Cookie value (1,2,3 and so on).
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now