Jump to content

toolman

Members
  • Posts

    210
  • Joined

  • Last visited

Everything posted by toolman

  1. Hi, I have the following script which sends an email, but it only displays the &message in the email. I would like to include the $from_name, $from_email and $telephone in the email as well. How would I do this? Thanks! if($_POST){ $to = '[email protected]'; $subject = 'Signup'; $from_name = $_POST['name']; $company = $_POST['company']; $from_email = $_POST['email']; $telephone = $_POST['telephone']; $message = $_POST['message']; $robotest = $_POST['robotest']; if($robotest) $error = "You are a gutless robot."; else{ if($from_name && $from_email && $message){ $header = "From: $from_name <$from_email>"; if(mail($to, $subject, $message, $header)) $success = "You are human and your message was sent!"; else $error = "You are human but there was a problem sending the e-mail."; }else $error = "All fields are required."; } if($error) echo '<div class="msg error">'.$error.'</div>'; elseif($success) header ("location: contactthanks.php"); }
  2. Hi there, I have the following code which I would like to use to track click events: <script type="text/javascript"> function trackOutboundLink(link, category, action) { try { dataLayer.push({'event':'interaction','eventCategory': category,'eventAction':action,'eventLabel': ''}); } catch(err){} setTimeout(function() { document.location.href = link.href; }, 100); } </script> <input type="submit" name="submit" value="Submit" class="submit-button" onClick="trackOutboundLink(this, 'Contact', 'Signup', 'New Signup');" /> However, when the form is submitted, it causes an error by going to a dynamically generated URL. I've been told this is because the setTimeout function is looking for a link, not a button. I have removed the setTimout and the form submits properly. Is there a way I can have the setTimeout function to use an input instead of a link? Or if I just remove the function, will the event still be tracked? Thanks!
  3. Thanks for the replies. I want to avoid browsers - so server side. I'm looking for a code that will just reload the most recent content. I added the following which doesn't wor: <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> <meta http-equiv="pragma" content="no-cache" /> <script type="text/javascript" src="view-source:http://www.website.com/beta/scripts/jquery.min.js The site is based on ASP and labels files as .shtml - I could find a way of insertin PHP, but its not ideal.
  4. Hi, For some reason, my website has an issue with loading old content until the user refreshes the page. I have read that versioning can help, e.g. adding http://www.website.com/?cache=001 I send out emails as a newsletter and was thinking of adding a parameter ?cache=001 to the links in the email to load the latest content. Would adding this just load the latest content on that specific page, or would any other pages on the site load any new content changes? Thanks!
  5. Hi, I have been given the following input and comment, but I am not sure what it means and how to create the datestamp / what is being asked to be created. <input type="hidden" name="s_creation_date" id="s_creation_date"/><!-- use DOM to update s_creation_date with the current datetime stamp--> Could you tell me what it means and how to create it? Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.