Jump to content

PhilipK

Members
  • Posts

    57
  • Joined

  • Last visited

    Never

Everything posted by PhilipK

  1. I mainly just edit existing PHP files I have written and go through a trail and error attempts to get things working how I want them to. Are there methods for testing this kind of thing that I should learn?
  2. Hey everyone, I'm having trouble with a simple mail script. I will start with the jQuery which sends a post. $("#email").click(function () { var usersemail = $("#user-email").val() ; $.post("mailform.php", { message: 'feedback', email: 'usersemail' } ); }); }); Next is the php file mailform.php <?php //The email of the sender $email = $_POST['email']; //The message of the sender $message = $_POST['message']; //The subject of the email $subject = "Fanshawe Student Success"; $extra = $email."\r\nReply-To: ".$email."\r\n"; mail($email,$subject,$message,$extra); ?> Not sure why this isn't working? Here is a live version of the App if you would rather test it. http://philipk.ca/Interactive-survey/index.html and here is the php page. http://philipk.ca/Interactive-survey/scripts/mailform.php
  3. Hello, I need to use Jquery or plain Javascript to reverse the order of a list of <span> tags. They all have the class "tweet_text" Any suggestions are greatly appreciated.
  4. The sibling which is shown also needs to be added to the variable 'Message'.
  5. Hello I'm creating a javascript based survey which shows different answers based on the person's answers. I have working script for showing the answer based on input. $(".yes").click(function () { $(this).parent().next("p").show("fast"); }); $(".no").click(function () { $(this).parent().next("p").next("p").show("fast"); }); I need to edit this so ... $(this).parent().next("p") is appended to the end of a new variable called Message. Any ideas on how to approach this?
  6. $(".yes").click(function () { $(this).parent().next("p").show("fast"); }); $(".no").click(function () { $(this).parent().next("p").next("p").show("fast"); });
  7. Hey everyone, I'm building a Jquery based survey. It is structered a so... <form> <input type="radio" name="answer" value="Yes" id="yes" /> Yes<br /> <input type="radio" name="answer" value="No" id="no" /> No </form> <p>If Yes answer </p> <p>If No answer </p> I need a piece of javascript that when you click on yes it does --> $('p').show('slow'); <-- but I need to only select the next p If they click no I need to select only the 2nd answer.
  8. Turned out the image had some how been deleted or something but Chrome had cashed it. Hence why it only worked in chrome.
  9. Image works within Chrome but non-existent in FireFox and Safari. Please no answers saying re-upload. I'm more interested in figuring out why this is happening then fixing it. Here is the link http://www.fanshawec.ca/sites/default/files/file_attachments/switcheasy-ticker-300x250.jpg
  10. My goal is to redirect anyone who views a picture directly to that picture within the slide show. So if someone goes directly to... http://daroom.info/pics/nesengine.jpg they goto http://daroom.info/index.php?id=nesengine.jpg
  11. I tried adding your snippet to my .htaccess file but it doesn't seem to work. http://daroom.info/pics/nesengine.jpg
  12. I should also note that /pics/ is my photo directory. So I still need to be able to access them when I embed them on my own website. I just want users to be redirected to the page which the picture is located when they try to view it directly.
  13. I figured out my problem was seperate form the .htaccess as for that line of code its something I have removed as I found it it wasn't working.
  14. I need to redirect people from going to an old directory to a new one. Here is how I need to change the url. pics/$var --> index.php?id=$var How should I go about this?
  15. First methods works great thanks!
  16. I have a random picture generator based off MySQL. I need a variable which is set to the pic_id of the last row in the database. How should I go about this?
  17. I have an .htaccess which redirects users when a file is not found. http://daroom.info/No-File-9dioahjfda It works but if the missing file is in a directory it bugs out. http://daroom.info/wordpress/Bad-File-fdkaljfdklaj Here is my current .htaccess file RewriteEngine On Options +Multiviews +FollowSymLinks ErrorDocument 404 /random.php Options +FollowSymlinks RewriteEngine on RewriteCond %{http_host} ^www\.daroom\.info [NC] RewriteRule ^(.*)$ http://daroom.info/$1 [R=301,NC] RewriteRule http://daroom.info/index.php?rand=$1 [L]
  18. @Omirion Huge Kudos. Plan today was to be working on this but thanks to you I'm done 9:30am. I owe you one.
  19. @Omirion Sorry I'm slightly confused as to where to insert the code you posted. Could you edit into my copy of the code. BTW do you have website or twitter or something you want to promote that I can give a shout out to?
  20. @Omirion Did you see if it validates on the version in which I removed the Ajax? http://philipk.ca/Emilio/contact.html The Validate function is part of the JQuery Plugin I'm using <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script>
  21. @Omirion Yes that is right. However I should note again that if I remove the Ajax code then validation works. I have a version of the site which shows the validation working at... Validation --> http://philipk.ca/Emilio/contact.html Thanks for helping me with this.
  22. I made your suggested updates and uploaded it to... http://philipk.ca/Emilio2/contact.html It is skipping over the first part of the code and sends the request even if no fields are filled out. I have also tried using... success: function(){
  23. Thanks Fugix, The php script will be built in such a way that it does not function if information has not been passed to the form. I think Javascript validation is best for user experience because users don't have to keep reloading pages in the case that they make lots of mistakes.
  24. I'm working on a contact forum which has jquery based validation using the following plugin http://bassistance.de/jquery-plugins/jquery-plugin-validation/ http://docs.jquery.com/Plugins/Validation I'm also using an Ajax function to send the information to a script and display a thank you message. I can get both features to work alone but after hours of tinkering am not able to get them to both work at the same time. Here is my javascript code in full. var submit_message = "<p>We will be in touch soon.</p><img id='checkmark' src='http://timeformore.info/discussion/media//2010/12/check-mark-200x200.png' />"; $(function() { $("#commentForm").click(function() { var cname = $("input#name").val(); var cemail = $("input#email").val(); var cphone = $("input#phone").val(); var cmessage = $("textarea#message").val(); var myaddress = $("input#myaddress").val(); var dataString = 'name='+ cname + '&email=' + cemail + '&phone=' + cphone + '&message=' + cmessage + '&myaddress=' + myaddress; //alert (dataString);return false; $("#commentForm").validate(); }); $("#submit").click(function() { $('#contact_form').hide('slow'); $('#message').html(submit_message) return false; $.ajax({ type: "POST", url: "mailform.php", data: dataString, }); }); }); I have made versions of each alone to show that they work. Validation --> http://philipk.ca/Emilio/contact.html Ajax --> http://philipk.ca/Emilio2/contact.html If anyone can help me with this I would hugely appreciate it!
  25. I want to make a rewrite which changes... http://daroom.info/$NUM -> http://daroom.info/index.php?rand=$NUM How should I go about this?
×
×
  • 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.