开发者

website popup for "monthly special"

开发者 https://www.devze.com 2023-01-25 23:41 出处:网络
Idea: have a jquery popup show to every 5th visitor on the site. It would essentially be a 300px X 300px div, with a small form.

Idea: have a jquery popup show to every 5th visitor on the site.

It would essentially be a 300px X 300px div, with a small form.

name, email, phone, comments.

each field will be required to process.

once they submit, i want to post back a .jpg coupon for them to print out.

pretty simple.

some questions i have.

is there a way utilizing jquery to only show this div to every 5th visitor?

is there a way to keep users from just typing the URL of the image and just print开发者_如何学运维 out the coupon without filling out the form? (would i just use a relative path?)


This isn't possible with just jQuery, you would need some server side handling to

  1. Count users (so you get every 5th view / user)
  2. Generate a unique 'authorized' coupon (server side image handling with a unique url that expires changes).

jQuery would then be used for the popup, but ultimately the HTML side would be updated from the server side.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号