Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 02-07-2012, 04:52 AM
sstoney200's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 12-03-10
Location: Essex, UK
Posts: 276
iTrader: 0 / 0%
Display captcha using sumbit popup

I use formtools to process my contact form and it all works hunky dory on page: http://www.for-rent-nerja.com/contact.php (it also has javascript to check for empty fields etc)



Problem I have now is I need to squash the enquiry form considerably to fit on every page like so: http://www.for-rent-nerja.com/apartm.../fr1150za.html


which means I no longer have the required space for the captcha.

I was wondering if anyone knows of a solution that will enable me to open the verification in a popup window once the submit has been clicked?
__________________
for-rent-nerja.com Rent Apartments in Nerja, Spain!
Website Designers Essex Website Designers and Company Branding in Essex and London, UK!
 
Reply With Quote
  #2 (permalink)  
Old 02-07-2012, 12:32 PM
Member
 
Join Date: 01-29-12
Location: Mexico
Posts: 40
iTrader: 0 / 0%
You need javascrip code, try this. You need jquery library
Code:
//Shows a ,modal windows $(document).ready(function() { //select all the a tag with name equal to modal $('a[name=modal]').click(function(e) { //Cancel the link behavior e.preventDefault(); //Get the screen height and width var maskHeight = $(document).height(); var maskWidth = $(window).width(); //Set heigth and width to mask to fill up the whole screen $('#mask').css({'width':maskWidth,'height':maskHeight}); //transition effect $('#mask').fadeIn(1000); $('#mask').fadeTo("slow",0.8); //Get the window height and width var winH = $(window).height(); var winW = $(window).width(); //Set the popup window to center $(id).css('top', winH/2-$(id).height()/2); $(id).css('left', winW/2-$(id).width()/2); //transition effect $(id).fadeIn(2000); }); //if close button is clicked $('.window .close').click(function (e) { //Cancel the link behavior e.preventDefault(); $('#mask').hide(); $('.window').hide(); }); //if mask is clicked $('#mask').click(function () { $(this).hide(); $('.window').hide(); }); });
Your captcha code would be inside a <div class="window">. This code shows a pop up window.
 
Reply With Quote
  #3 (permalink)  
Old 02-08-2012, 12:50 PM
sstoney200's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 12-03-10
Location: Essex, UK
Posts: 276
iTrader: 0 / 0%
Quote:
Originally Posted by nikomaster View Post
You need javascrip code, try this. You need jquery library
Code:
//Shows a ,modal windows $(document).ready(function() { //select all the a tag with name equal to modal $('a[name=modal]').click(function(e) { //Cancel the link behavior e.preventDefault(); //Get the screen height and width var maskHeight = $(document).height(); var maskWidth = $(window).width(); //Set heigth and width to mask to fill up the whole screen $('#mask').css({'width':maskWidth,'height':maskHeight}); //transition effect $('#mask').fadeIn(1000); $('#mask').fadeTo("slow",0.8); //Get the window height and width var winH = $(window).height(); var winW = $(window).width(); //Set the popup window to center $(id).css('top', winH/2-$(id).height()/2); $(id).css('left', winW/2-$(id).width()/2); //transition effect $(id).fadeIn(2000); }); //if close button is clicked $('.window .close').click(function (e) { //Cancel the link behavior e.preventDefault(); $('#mask').hide(); $('.window').hide(); }); //if mask is clicked $('#mask').click(function () { $(this).hide(); $('.window').hide(); }); });
Your captcha code would be inside a <div class="window">. This code shows a pop up window.
Hey mate, thanks for your reply, really appreciate it!

So I have this in my head:

Code:
<script type="text/javascript"> //Shows a ,modal windows $(document).ready(function() { //select all the a tag with name equal to modal $('a[name=modal]').click(function(e) { //Cancel the link behavior e.preventDefault(); //Get the screen height and width var maskHeight = $(document).height(); var maskWidth = $(window).width(); //Set heigth and width to mask to fill up the whole screen $('#mask').css({'width':maskWidth,'height':maskHeight}); //transition effect $('#mask').fadeIn(1000); $('#mask').fadeTo("slow",0.8); //Get the window height and width var winH = $(window).height(); var winW = $(window).width(); //Set the popup window to center $(id).css('top', winH/2-$(id).height()/2); $(id).css('left', winW/2-$(id).width()/2); //transition effect $(id).fadeIn(2000); }); //if close button is clicked $('.window .close').click(function (e) { //Cancel the link behavior e.preventDefault(); $('#mask').hide(); $('.window').hide(); }); //if mask is clicked $('#mask').click(function () { $(this).hide(); $('.window').hide(); }); }); </script>
are you then saying it should be as simple as inserting this within my form in the body:

Code:
<div class="window"><?php ft_api_display_captcha(); ?></div>
?

I'm testing it out on page http://www.for-rent-nerja.com/contact5.php but that doesn't seem to be either hiding the captcha nor displaying it in a popup on submit. Am I overlooking something?
__________________
for-rent-nerja.com Rent Apartments in Nerja, Spain!
Website Designers Essex Website Designers and Company Branding in Essex and London, UK!

Last edited by sstoney200; 02-08-2012 at 12:54 PM.
 
Reply With Quote
  #4 (permalink)  
Old 02-09-2012, 10:36 AM
RiptideTempora's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 11-30-11
Location: Orlando, FL
Posts: 235
iTrader: 0 / 0%
EDIT: Nevermind. Misread.
__________________
This Link Will Self-Destruct
Keenotes - A place for sharp minds
 
Reply With Quote
  #5 (permalink)  
Old 04-08-2012, 06:31 AM
sstoney200's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 12-03-10
Location: Essex, UK
Posts: 276
iTrader: 0 / 0%
Oh maaan!

Over the last 3 days (whilst I've been away over Easter) I've had about 100 spam enquiries sent from my page http://www.for-rent-nerja.com/property.php

As discussed earlier in this post, the enquiry form (bottom right) is too small for captcha display so I left it without and for past few months had vary few problems with spam. The bots were obviously finding my main contact page at http://www.for-rent-nerja.com/contact.php and since this page does have a captcha were heading elsewhere. Now they've found my property page and have been bombarding me with shiite! Does anyone have any alternate methods I would be able to use to eliminate this spam? Or as discussed earlier, a method for displaying the captcha found on the main contact page as a popup upon clicking of the enquiry submit?

Really would appreciate some help! PESKY SPAMMERS!
__________________
for-rent-nerja.com Rent Apartments in Nerja, Spain!
Website Designers Essex Website Designers and Company Branding in Essex and London, UK!

Last edited by HTMLBasicTutor; 04-08-2012 at 08:45 AM.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Free: Article Site, Sumbit or Take What You, No Charge sclick Content 3 01-07-2011 05:14 PM
[Relaunch] Sumbit to Directory Catalogue - Premium Directory of Directories noobpreneur Directory Announcements & Promotions 0 06-07-2009 01:28 AM
Sumbit : www.Directory4.net boloso Directory Announcements & Promotions 18 05-11-2008 10:07 AM
Sumbit your site NOW! Rezo Directory Announcements & Promotions 2 05-06-2006 03:07 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 04:21 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2014 Escalate Media




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.