Jump to content

reflex84

Members
  • Content Count

    98
  • Joined

  • Last visited

Posts posted by reflex84

  1. Should anything be done to the a href of the link that opens the lightbox?

    <a id="various1" href="#res">Enquire Now</a>

    The href above is #res which opens a hidden div (which is the form):

    <div style="display: none;">  <div id="res"><div id="contact">       <div id="message"></div>   <form method="post" action="ajax-contact-form-extended/ajax-contact-extend/contact.php" name="contactform" id="contactform">   <fieldset>   <legend>Please fill in the following form to contact us</legend>   <label for="name" accesskey="U"><span class="required">*</span> Your Name</label>   <input name="name" type="text" id="name" size="30" value="" />   <br />   <label for="email" accesskey="E"><span class="required">*</span> Email</label>   <input name="email" type="text" id="email" size="30" value="" />   <br />   <label for="phone" accesskey="P"><span class="required">*</span> Phone</label>   <input name="phone" type="text" id="phone" size="30" value="" />   <br />   <label for="subject" accesskey="S">Subject</label>   <select name="subject" id="subject">	 <option value="Support">Support</option>	 <option value="a Sale">Sales</option>	 <option value="a Bug fix">Report a bug</option>   </select>   <br />   <label for="comments" accesskey="C"><span class="required">*</span> Your comments</label>   <textarea name="comments" cols="40" rows="3" id="comments" style="width: 350px;"></textarea>   <p><span class="required">*</span> Are you human?</p>   <label for="verify" accesskey="V">   <img src="ajax-contact-form-extended/ajax-contact-extend/image.php" alt="Image verification" border="0"/></label>   <input name="verify" type="text" id="verify" size="6" value="" style="width: 50px;" /><br /><br />   <input type="submit" class="submit" id="submit" value="Submit" />   </fieldset>   </form></div>  </div></div>

    I tried saving the form in a text document and using ajax to open the lightbox and form - is this better:

    <a id="various22" href="form.txt">Enquire Now</a>

    I'm lost - I doubt I'll get this right, which I've been trying for weeks now!

  2. Hi, I am having issues with a form that I have got which pops up in a lightbox frame (fancybox).I've got a text link, that when it is clicked, a form pops up in lightbox frame ... I fill the form in, click submit and the "success" message appears as normal. I close the lightbox, but when I click on the text link to open the form again, I get the "success" message from the previous submission and not the form! I need it to upload the form... I've been struggling for hours trying to work this out but not getting anywhere! Click this link to see the form and to try it out yourself if you'd like.http://www.testing123.co.za/index.htm How do I sought this problem out? If you need any information, like javascript, let me know ... Appreciate your help! D.

    • Like 1
  3. Hi, I have questions with regards to dedicated servers and the package we currently have with Godaddy. Our dedicater server specs are as follows: OS: Microsoft Windows server 2003, Web edition, service pack 2Intel Pentium 4 CPU 3.00GHz1GB Ram150GB Hard driveI'm not sure what our bandwidth is, but I think its 500GB per month20GB FTP BackupMySQLHmailserverPHP 5 We are paying $115 /m for this dedicated server!Am I getting ripped off? I hear that Godaddy is only good for buying domain names and thats it!This dedicated server is like the computer people bought back in the late 90's!! I am really considering "upgrading" my dedicated server and what we don't like about the Godaddys dedicated server, is the fact that we DO NOT have tech support!!We do need tech support. Further questions:1) Is it necessary to have a faster computer and operating system?2) Who can offer me a dedicated server with full support (so if we have problems with the hmailserver or MySQL, we can contact the company to resolve the issue(s)?3) If I decide to go with a new dedicated server, can we simply transfer all the data from our current server to the new server? I would appreciate your responce / advice and suggestions, thanks!

    • Like 1
  4. Hi, I really need to add a captcha to this PHP process form?How do I go about doing this?

    <?php // Define some constantsdefine( "RECIPIENT_NAME", "John Smith" );define( "RECIPIENT_EMAIL", "john@example.com" );define( "EMAIL_SUBJECT", "Visitor Message" ); // Read the form values$success = false;$senderName = isset( $_POST['senderName'] ) ? preg_replace( "/[^\.\-\' a-zA-Z0-9]/", "", $_POST['senderName'] ) : "";$senderEmail = isset( $_POST['senderEmail'] ) ? preg_replace( "/[^\.\-\_\@a-zA-Z0-9]/", "", $_POST['senderEmail'] ) : "";$message = isset( $_POST['message'] ) ? preg_replace( "/(From:|To:|BCC:|CC:|Subject:|Content-Type:)/", "", $_POST['message'] ) : ""; // If all values exist, send the emailif ( $senderName && $senderEmail && $message ) {  $recipient = RECIPIENT_NAME . " <" . RECIPIENT_EMAIL . ">";  $headers = "From: " . $senderName . " <" . $senderEmail . ">";  $success = mail( $recipient, EMAIL_SUBJECT, $message, $headers );} // Return an appropriate response to the browserif ( isset($_GET["ajax"]) ) {  echo $success ? "success" : "error";} else {?><html>  <head>    <title>Thanks!</title>  </head>  <body>  <?php if ( $success ) echo "<p>Thanks for sending your message! We'll get back to you shortly.</p>" ?>  <?php if ( !$success ) echo "<p>There was a problem sending your message. Please try again.</p>" ?>  <p>Click your browser's Back button to return to the page.</p>  </body></html><?php}?>

    ?? Thanks in advance!

  5. There is also this javascript code thats in the header of the HTML page I'm trying to get the form to work on:

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script><script type="text/javascript">var messageDelay = 2000;  // How long to display status messages (in milliseconds)// Init the form once the document is ready$( init );// Initialize the formfunction init() {  // Hide the form initially.  // Make submitForm() the form's submit handler.  // Position the form so it sits in the centre of the browser window.  $('#contactForm').hide().submit( submitForm ).addClass( 'positioned' );  // When the "Send us an email" link is clicked:  // 1. Fade the content out  // 2. Display the form  // 3. Move focus to the first field  // 4. Prevent the link being followed  $('a[href="#contactForm"]').click( function() {    $('#content').fadeTo( 'slow', .2 );    $('#contactForm').fadeIn( 'slow', function() {	  $('#senderName').focus();    } )    return false;  } );   // When the "Cancel" button is clicked, close the form  $('#cancel').click( function() {    $('#contactForm').fadeOut();    $('#content').fadeTo( 'slow', 1 );  } );   // When the "Escape" key is pressed, close the form  $('#contactForm').keydown( function( event ) {    if ( event.which == 27 ) {	  $('#contactForm').fadeOut();	  $('#content').fadeTo( 'slow', 1 );    }  } );}// Submit the form via Ajaxfunction submitForm() {  var contactForm = $(this);  // Are all the fields filled in?  if ( !$('#senderName').val() || !$('#senderEmail').val() || !$('#message').val() || !$('#validate').val() ) {    // No; display a warning message and return to the form    $('#incompleteMessage').fadeIn().delay(messageDelay).fadeOut();    contactForm.fadeOut().delay(messageDelay).fadeIn();  } else {    // Yes; submit the form to the PHP script via Ajax    $('#sendingMessage').fadeIn();    contactForm.fadeOut();    $.ajax( {	  url: contactForm.attr( 'action' ) + "?ajax=true",	  type: contactForm.attr( 'method' ),	  data: contactForm.serialize(),	  success: submitFinished    } );  }  // Prevent the default form submission occurring  return false;}// Handle the Ajax responsefunction submitFinished( response ) {  response = $.trim( response );  $('#sendingMessage').fadeOut();  if ( response == "success" ) {    // Form submitted successfully:    // 1. Display the success message    // 2. Clear the form fields    // 3. Fade the content back in    $('#successMessage').fadeIn().delay(messageDelay).fadeOut();    $('#senderName').val( "" );    $('#senderEmail').val( "" );    $('#message').val( "" );$('#validate').val( "" );    $('#content').delay(messageDelay+500).fadeTo( 'slow', 1 );  } else {    // Form submission failed: Display the failure message,    // then redisplay the form    $('#failureMessage').fadeIn().delay(messageDelay).fadeOut();    $('#contactForm').delay(messageDelay+500).fadeIn();  }}</script>

    and this in the body:

    <div id="sendingMessage" class="statusMessage"><p>Sending your message. Please wait...</p></div><div id="successMessage" class="statusMessage"><p>Thanks for sending your message! We'll get back to you shortly.</p></div><div id="failureMessage" class="statusMessage"><p>There was a problem sending your message. Please try again.</p></div><div id="incompleteMessage" class="statusMessage"><p>Please complete all the fields in the form before sending.</p></div>

    Anything I need to edit here?

  6. Ok, just for heads up, I'm useless at PHP!! I assume you are talking about this code:

    if (($image->validate_code($_POST['validate']) ? "true" : "false") == "false") {}

    I know you are trying to help, but I am clueless to what to do?What code do I need to add? Thanks guys ...

  7. Hi, Thanks so much for actually responding on a step by step basis!! Ok, removed what you said above and tested the form, but now the the error message comes up whether I put in the correct captcha code or wrong captcha code. Did I do anything wrong, heres what my php form looks like now:

    <?php// Define some constantsdefine( "RECIPIENT_NAME", "Joe Soap" );define( "RECIPIENT_EMAIL", "JoeSoap@myemail.com" );define( "EMAIL_SUBJECT", "Visitor Message" );// Read the form values$success = false;$senderName = isset( $_POST['senderName'] ) ? preg_replace( "/[^\.\-\' a-zA-Z0-9]/", "", $_POST['senderName'] ) : "";$senderEmail = isset( $_POST['senderEmail'] ) ? preg_replace( "/[^\.\-\_\@a-zA-Z0-9]/", "", $_POST['senderEmail'] ) : "";$message = isset( $_POST['message'] ) ? preg_replace( "/(From:|To:|BCC:|CC:|Subject:|Content-Type:)/", "", $_POST['message'] ) : "";session_start();include("verification_image.class.php");$image = new verification_image();if (($image->validate_code($_POST['validate']) ? "true" : "false") == "false") { }// If all values exist, send the emailif ( $senderName && $senderEmail && $message ) {  $recipient = RECIPIENT_NAME . " <" . RECIPIENT_EMAIL . ">";  $headers = "From: " . $senderName . " <" . $senderEmail . ">";  $success = mail( $recipient, EMAIL_SUBJECT, $message, $headers );}// Return an appropriate response to the browser?><html>  <head>    <title>Thanks!</title>  </head>  <body>  <?php if ( $success ) echo "<p>Thanks for sending your message! We'll get back to you shortly.</p>" ?>  <?php if ( !$success ) echo "<p>There was a problem sending your message. Please try again.</p>" ?>  <p>Click your browser's Back button to return to the page.</p>  </body></html><?php?>

    ...

  8. Hi, I downloaded a lighbox php form from http://www.elated.co...orm-jquery-php/ which is exactly what I want BUT, I also want to add a captcha to the form! I don't have much knowledge about PHP and I've been trying to figure this out: When I test the form and fill in the Captcha, to my surprise, it goes through 100% with no faults but if I purposely type the incorrect code in the captcha and click send, the lightbox returns a message "sending your message, please wait" and that message doesn't go away. The message I want to see and what is supposed to come up is "There was a problem sending your message. Please try again". I feel I'm so close to getting this right, please could you let me know what is wrong with my php below:

    <?php// Define some constantsdefine( "RECIPIENT_NAME", "Joe Soap" );define( "RECIPIENT_EMAIL", "JoeSoap@myemail.com" );define( "EMAIL_SUBJECT", "Visitor Message" );// Read the form values$success = false;$senderName = isset( $_POST['senderName'] ) ? preg_replace( "/[^\.\-\' a-zA-Z0-9]/", "", $_POST['senderName'] ) : "";$senderEmail = isset( $_POST['senderEmail'] ) ? preg_replace( "/[^\.\-\_\@a-zA-Z0-9]/", "", $_POST['senderEmail'] ) : "";$message = isset( $_POST['message'] ) ? preg_replace( "/(From:|To:|BCC:|CC:|Subject:|Content-Type:)/", "", $_POST['message'] ) : "";session_start();include("verification_image.class.php");$image = new verification_image();if (($image->validate_code($_POST['validate']) ? "true" : "false") == "false") {  header('Location: http://www.testing123.co.za/fail.htm');  exit;}// If all values exist, send the emailif ( $senderName && $senderEmail && $message ) {  $recipient = RECIPIENT_NAME . " <" . RECIPIENT_EMAIL . ">";  $headers = "From: " . $senderName . " <" . $senderEmail . ">";  $success = mail( $recipient, EMAIL_SUBJECT, $message, $headers );}// Return an appropriate response to the browserif ( isset($_GET["ajax"]) ) {  echo $success ? "success" : "error";} else {?><html>  <head>	<title>Thanks!</title>  </head>  <body>  <?php if ( $success ) echo "<p>Thanks for sending your message! We'll get back to you shortly.</p>" ?>  <?php if ( !$success ) echo "<p>There was a problem sending your message. Please try again.</p>" ?>  <p>Click your browser's Back button to return to the page.</p>  </body></html><?php}?> 

    The code I added to try get the Captcha working is:

    session_start();include("verification_image.class.php");$image = new verification_image();if (($image->validate_code($_POST['validate']) ? "true" : "false") == "false") {  header('Location: http://www.testing123.co.za/fail.htm');  exit;}

    When you fill in the form and put the incorrect captcha code in, I want the error message: "There was a problem sending your message. Please try again" to return in the lightbox like its supposed to and NOT go to location address: http://www.testing123.co.za/fail.htm. So basically all I want is for that error message to show! Please me know, thanks in advance!!

  9. Hi, I am busy testing out a lightbox form that I'm working on and I've got all to work except the "success" or "thank you" page.Basically I want the user to fill in the online form and when the they are click 'submit', the "thank you" message or page resolves in the same lightbox that the form was in. Go to www.testing123.co.za/test.htm and click on that link you see saying "AJAX SuperBox".The lightbox is opening up an HTML page within in the test.htm page (basically acting like an iFrame?).When I click submit, the page resolves to the success.htm page (which it should) but not in the lightbox frame. I don't want visitors to leave the test.htm page. My headers at the bottom of my process php form shows as:

    ';                 $headers  = "From: $from\r\nBCC:{$bcc}\r\n";    $headers .= "Content-type: text/html\r\n";    $success = mail($to, $subject, $sBodyNew, $headers);                 header('Location: http://www.testing123.co.za/success.htm');   ?>

    I assume the Location url above needs code added to it so that it works within the lightbox? Or is there an easier way to do this? Thanks guys!

  10. Hi, Quick question ...I've got someone asking me to create a database on my servers MySQL and they are asking for login information, ie: host, database name, database username and database password.Is this information safe to give out? Not recommended? Can they ever in future access my MySQL and delete / manipulate databases that I have there already? Let me know, thanks. R.

  11. Ok just to extend to this question...I am liasing with a domain registrant company who says this:"We don’t offer dns record (A record, MX record, et.) pointing to IP addresses, as we don’t offer Hosting services anymore. The dns traffic would be generated on our server and no one would be billed for it, so it cannot be done. However, we can point the Primary and Secondary Nameservers to your Hosting company. The annual domain name renewals can then remain with us."You see if I Host the domain name ... Would I get Dns traffic if I point the domain name to another IP address?

  12. Hi,I have a client who I've designed a website for. I Host their website and domain name on our own server. We have set-up an MX Record for this domain name too. Now I am no expert at all with mail servers but how does the MX records work?! ...When someone goes to that website I've developed and fills in the online form ... does the email go to my server, then to the MX record server, then to the recipients email client???Why I am asking this is because this particular client of mine cannot receive their websites form submission on their email client. I have checked on my server to see if the email is there .. and it is!! It seems like its not leaving my server to either the recipients email client or its not leaving to the MX record server ??I've tested my clients form with other email addresses of mine and I always receive the form submission on those email accounts / email clients. Which leaves me to believe it has got something to do with that particular domain names MX records?My client and I exchange emails on a daily basis BUT they cannot receive their websites form submission!!!Is it a problem on my servers side? or is it a problem on the MX record server's side?I hope I'm making sense here!Thanks guys!

  13. Hi,I've had a few clients who I have designed a websites for, who are asking if they can make their website mobile compatible or Mobile Friendly.Now basically all these websites have been designed in Tables & Cells or in Divs / CSS with fixed width's (IE: no liquid layout). Now I know that you need to design your website using a liquid layout for it to be Mobile friendly etc... but is there a way, where I can create another site (the mobile version) where mobile phones can detect the mobile site that I have created? Is the procedure complicated? Is there any website I can go to that explains this?Is Adobe Dreamweaver 5.5 good for this?Any useful (elaborate) tutorials, please post, thanks!D.

  14. Hi,Okay, I'm not very good with Javascript, so I seriously need help here. I'm sick of these javascripts conflicting making other javascripts not work.I've got 3 javascripts on my website:1) Digital Clock2) Date Picker3) and a Toggle Hide Show content effect javascript.Without the toggle script, the digital clock and date picker work just fine!When I add the Toggle script ... both the digital clock and date picker doesn't work!I've read about No.conflict but I have no idea what they are talking about... maybe its something less complicated?Here is my Javascript codes:

    <link rel="stylesheet" href="datepicker/development-bundle/themes/base/jquery.ui.all.css">	<script src="datepicker/development-bundle/jquery-1.5.1.js"></script>	<script src="datepicker/development-bundle/ui/jquery.ui.core.js"></script>	<script src="datepicker/development-bundle/ui/jquery.ui.widget.js"></script>	<script src="datepicker/development-bundle/ui/jquery.ui.datepicker.js"></script>	<link rel="stylesheet" href="datepicker/development-bundle/demos/demos.css">	<script>	$(function() {		$( "#datepicker, #datepicker2, #datepicker3, #datepicker4, #datepicker5, #datepicker6, #datepicker7, #datepicker8, #datepicker9, #datepicker10, #datepicker11, #datepicker12" ).datepicker({			numberOfMonths: 3,			showButtonPanel: true		});	});	</script>	<script src="jquery.MyDigitclock.js"></script><script>$(function(){			$("#clock1").MyDigitClock();			$("#clock2").MyDigitClock({				fontSize:50,				fontFamily:"Arial",				fontColor: "#000",				fontWeight:"bold",				bAmPm:true,				background:'#fff',				bShowHeartBeat:true				});			$("#clock3").MyDigitClock({				fontSize:150,				fontColor:"grey",				background:"#fff",				fontWeight:"bold",				timeFormat: '{HH}<span id="ch1">:</span>{MM}'}			);		});function MM_openBrWindow(theURL,winName,features) { //v2.0  window.open(theURL,winName,features);}</script><script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script><script type="text/javascript">$(document).ready(function(){   	$(".toggle_container").hide();	$("h2.trigger").click(function(){		$(this).toggleClass("active").next().slideToggle("slow");	});});</script>

    Please, if you could me - I'd appreciate it! Thanks

  15. Thanks for the quick reply ...I looked at the error console and it out of this code:

    	<link rel="stylesheet" href="datepicker/development-bundle/themes/base/jquery.ui.all.css">	<script src="datepicker/development-bundle/jquery-1.5.1.js"></script>	<script src="datepicker/development-bundle/ui/jquery.ui.core.js"></script>	<script src="datepicker/development-bundle/ui/jquery.ui.widget.js"></script>	<script src="datepicker/development-bundle/ui/jquery.ui.datepicker.js"></script>	<link rel="stylesheet" href="datepicker/development-bundle/demos/demos.css">	<script>	$(function() {		$( "#datepicker, #datepicker2, #datepicker3, #datepicker4, #datepicker5, #datepicker6, #datepicker7, #datepicker8, #datepicker9, #datepicker10, #datepicker11, #datepicker12" ).datepicker({			numberOfMonths: 3,			showButtonPanel: true		});	});	</script><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>	<script src="jquery.MyDigitclock.js"></script><script>		$(function(){			$("#clock1").MyDigitClock();			$("#clock2").MyDigitClock({				fontSize:50, 				fontFamily:"Arial", 				fontColor: "#000", 				fontWeight:"bold", 				bAmPm:true,				background:'#fff',				bShowHeartBeat:true				});			$("#clock3").MyDigitClock({				fontSize:150, 				fontColor:"grey",				background:"#fff",				fontWeight:"bold",				timeFormat: '{HH}<span id="ch1">:</span>{MM}'}			);		});	</script>

    This is the code it highlights:

    			showButtonPanel: true

    Any ideas?Thanks ...

  16. Hi,I have developed a website but there are 2 javascript codes that are conflicting each other. Only 1 works depending on which javascript code is below the other.1 script is a datepicker and the other script is a digital clock.The Javascript code for the datepicker is:

    	<link rel="stylesheet" href="datepicker/development-bundle/themes/base/jquery.ui.all.css">	<script src="datepicker/development-bundle/jquery-1.5.1.js"></script>	<script src="datepicker/development-bundle/ui/jquery.ui.core.js"></script>	<script src="datepicker/development-bundle/ui/jquery.ui.widget.js"></script>	<script src="datepicker/development-bundle/ui/jquery.ui.datepicker.js"></script>	<link rel="stylesheet" href="datepicker/development-bundle/demos/demos.css">	<script>	$(function() {		$( "#datepicker, #datepicker2, #datepicker3, #datepicker4, #datepicker5, #datepicker6, #datepicker7, #datepicker8, #datepicker9, #datepicker10, #datepicker11, #datepicker12" ).datepicker({			numberOfMonths: 3,			showButtonPanel: true		});	});	</script>

    Just below the datepicker script is the digital clock script:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>	<script src="jquery.MyDigitclock.js"></script><script>		$(function(){			$("#clock1").MyDigitClock();			$("#clock2").MyDigitClock({				fontSize:50, 				fontFamily:"Arial", 				fontColor: "#000", 				fontWeight:"bold", 				bAmPm:true,				background:'#fff',				bShowHeartBeat:true				});			$("#clock3").MyDigitClock({				fontSize:150, 				fontColor:"grey",				background:"#fff",				fontWeight:"bold",				timeFormat: '{HH}<span id="ch1">:</span>{MM}'}			);		});	</script>

    How can I make it so that both scripts are working??I've done some research resolve the problem but I need elaborate answers, please (as I'm not very knowledgeable at javascript)Thanks guys!

×
×
  • Create New...