- This topic is empty.
-
AuthorPosts
-
March 23, 2010 at 10:54 am #28499jenyczMember
Hey Guys –
I’ve worked with jquery and all that jazz many times and have some PHP experience. Anyways, I’m using Chris’s screencast #62 and associated files (jquery.jqtransform.js, jquery.validate.js, jquery.form.js, websitechange.js) and everything was going smoothly in creating my custom for.
I’ve run into one problem – I can’t get the URL of page and Additional URL’s sections to delete and have the script still work!
Code below, if you prefer the test url is http://www.kooziebelt.com/test/index.php
Code:
That’s the actual form where the fields are – notice the changeonmutliple in the middle, that’s fine there – I’ll be changing the name but it can stay.
Code:// Building a whitelist array with keys which will send through the form, no others would be accepted later on
$whitelist = array(‘token’,’req-name’,’req-email’,’req-phone’, ‘typeOfChange’,’message-subject’,’URL-main’,’addURLS’, ‘curText’, ‘newText’, ‘save-stuff’, ‘mult’);That’s where it’s brought into the array – I’ve tried just deleting ‘URL-main’ and ‘addURLS’ but then the script doesn’t work right…
Code:// Lets check the URL whether it’s a real URL or not. if not, stop the scriptif(!filter_var($_POST[‘URL-main’],FILTER_VALIDATE_URL)) {
writeLog(‘URL Validation’);
die(‘Hack-Attempt detected. Please insert a valid URL’);
}I think this is where it validates the URL, not sure if I need to delete that or not…
Code:// PREPARE THE BODY OF THE MESSAGE$message = ‘
‘;
$message .= ‘‘;
$message .= ‘‘;
$message .= “Name: ” . strip_tags($_POST[‘req-name’]) . “ “;
$message .= “Email: ” . strip_tags($_POST[‘req-email’]) . “ “;
$message .= “Phone ” . strip_tags($_POST[‘req-phone’]) . “ “;
$message .= “Preferred Contact: ” . strip_tags($_POST[‘typeOfChange’]) . “ “;
$message .= “message-subject: ” . strip_tags($_POST[‘message-subject’]) . “ “;
$message .= “URL To Change (main): ” . $_POST[‘URL-main’] . “ “;
$addURLS = $_POST[‘addURLS’];
if (($addURLS) != ”) {
$message .= “URL To Change (additional): ” . strip_tags($addURLS) . “ “;
}
$curText = htmlentities($_POST[‘curText’]);
if (($curText) != ”) {
$message .= “CURRENT Content: ” . $curText . “ “;
}
$message .= “NEW Content: ” . htmlentities($_POST[‘newText’]) . “ “;
$message .= ““;
$message .= ““;And finally, that’s where the body of the email is formed – I can see where the URL-main and addURLS are and have tried removing them, but again the script fails (meaning the form submits but I never get the email)
I’ll be screwing around with it and hopefully get it going but if you have run into this problem before and know what I need to do I would really appreciate the help!
March 23, 2010 at 11:19 am #72858jenyczMemberI got it, disregard previous! By the way, the tiny bit of code I had to delete wasn’t in anything I posted… Always something much simpler than you think!
March 28, 2011 at 12:16 pm #53402mwarrenMemberhey, I’m having problems with my jqtransform setup, were you able to get the plugin to work with jquery 1.5?
March 28, 2011 at 12:44 pm #53404DougMemberWhat was it? I seem to be having the same problem….form submits, but no e-mail arrives…
March 28, 2011 at 12:48 pm #53405mwarrenMemberfor me, the styling only loads in IE, but not firefox 4 or chrome. All my file paths are correct, but firebug shows that no styling is taking placing
March 28, 2011 at 1:01 pm #53407DougMemberAnd solved, these files require php5
March 28, 2011 at 1:02 pm #53408DougMemberseems to be working fine for me in FF 3.6.16
March 28, 2011 at 1:03 pm #53409DougMembermake sure you load the plug in’s after you load jquery and feel free to share your URL
March 28, 2011 at 1:04 pm #53410mwarrenMemberlink: http://www.splatterhat.com/contact
I can only see the form styling in IE, but at work we use IE7 :(
Just downloded IETester, and it seems that now my ajax is failing on most of my navs in IE8…grrr what gives?
March 28, 2011 at 1:22 pm #53411DougMemberhmmm, not sure. It renders fine in FF, sent a test through, and the redirect to the /index.php page doesn’t seem to be working. I get a 404 error. Maybe upload the files and start fresh? Other folks who were commenting on the post seemed to also have some rendering issues? Now….if only I could hide the name and email fields yet still capture cookie info! :)
March 28, 2011 at 1:32 pm #53488mwarrenMemberwhat version of firefox? for me firefox 4 isn’t rendering it at all
March 28, 2011 at 1:34 pm #53391DougMemberseems to be working fine for me in FF 3.6.16 – may want to start a new thread on rendering css in the website change request form – because this thread is marked as “solved”
March 28, 2011 at 1:36 pm #53392mwarrenMemberi have a thread about this problem, no one has responded yet :(
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.