-
Basic Javascript Cookie Personalisation
Cheers, got it working now.
-
Basic Javascript Cookie Personalisation
Should have posted the URL Its something to do with firefox. It works in IE6. Javascript isnt disabled in FF though.
-
Basic Javascript Cookie Personalisation
Hello, I'm trying to use a form which allows a user to enter their name. This is then stored in a cookie and used to personalise the page by showing their name. I can't get the code to work though as when I click getCookie() the value isn't showing up. I'm just trying to get the cookie to show in an alert box for now then I'll try and get to print straight onto the page. Actually what would be the best way to do that? I dont think you can print stuff to form labels so it shows in a transparent box? Anyway heres the code I have so far and javascripts arent disabled on firefox: <script type="text/javascript"> function setcookie() { var the_cookie = escape(custLogin.value); document.cookie = the_cookie; alert("cookie set: " + the_cookie); } function getcookie() { var cook=document.cookie; alert("cookie got: "+cook); } </script> <div id = "login" class = "login"> <form action = "" method = ""> <h3><label> Customer Login</label></h3> <label class = "label" id = "label"> Name: </label><input name="custLogin" type = "text" id="custLogin" size = "16" maxlength = "30"/><br/> <input name = "Submit" type = "submit" value = "Submit" class = "submit" id = "submit" onclick="setcookie()"/> </form> </div> <button onclick= "getcookie()">Get cookie</button> Thanks!
-
XML Help
Ahh got it now. Cheers.
-
XML Help
Hello, I've just started learning xml however I'm slightly confused on something. With XML is it possible to have an xml document which holds some data then on a section of a xhtml web page the data from the xml document is displayed and styled? All the tutorials I'm finding seem to suggest that you only display the information in the xml document via the xml document and not through the external xhtml web page? Cheers.
-
Javascript form validation
Sorted it. Had a capital g on gear on the javascript. Opps...
-
Update database with PHP
Cheers. Sorted it out a short while ago. The text field on the form wasn't labeled "cycleID" so wasnt passing the index over.
-
Javascript form validation
Form code. The drop down menus are dynamic.
-
Javascript form validation
No, the first field of each drop down menu has a value of "N/A" so if five or more fields return a value of N/A the count triggers an error message. I've included some alerts to see what values are been passed back which are only brand and type so style, gearNo, frame and price must be were the problem is.
-
Javascript form validation
Just tried removing all the else's so it asks each field if a none "N/A" values entered and it still doesnt work.
-
Javascript form validation
Wouldnt mind learning that however I haven't much time left to get that section of the site working.
-
Javascript form validation
Hello, I'm having some trouble with form validation on a page. The script is mean't to make sure the user has selected at least two fields on the form. If they don't select at least two they get an error message telling them so. The script uses if/else if statements. The problem only the first two fields work if there selected. If its anything from style, gear, frame or price they arent accepted as having there values selected. Any help would be appriciated.
-
Update database with PHP
Getting this error on all these types of forms now. Dunno why, had it working in a demo version.
-
Update database with PHP
Just given it a shot and got the following error. The four would be the ID which should be passed. "Notice: Undefined index: cycleID in /var/www/vhosts/numyspace.co.uk/web_users/home/~unn_r008573/public_html/Cycle Tracks/assets/content/edit.php on line 50 Array ( [edit] => 4 [submit] => Edit ) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1" I'm not really sure whats wrong if its passing it the ID. Bellow is example code from the form
-
Update database with PHP
Tried it but I still get the error: "Notice: Undefined index: cycleID in /var/www/vhosts/numyspace.co.uk/web_users/home/~unn_r008573/public_html/Cycle Tracks/assets/content/edit.php on line 50" Line 50 = $cycleID = $_POST['cycleID']; Heres the page to select a product to edit. http://www.numyspace.co.uk/~unn_r008573/Cy...tent/cycles.php Thanks.