can anyone pls help me figure out why my script won't fire pls pls pls? |
can anyone pls help me figure out why my script won't fire pls pls pls? |
redbullion |
Oct 9 2014, 04:19 PM
Post
#1
|
Group: Members Posts: 1 Joined: 9-October 14 Member No.: 21,649 |
redbullion.co.uk/L124
there should be an alert that fires ?!?!? the source code and script are viewable (right click, "View Page Source") tks!!! Here it is pasted in: <!doctype html> <html> <head> <title>L124 Form Validation project</title> <meta charset="utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content=width=device-width, initial-scale=1" /> <script type="text/javascript" src="http://www.jquery.com/jquery.min.js" src="jquery.min.js"> </script> <style> #wrapper { width: 600px; margin: 0 auto; font-family: helvetica; font-size:1.2em; } input { width:300px; height:30px; padding:5px; border-radius:5px; font-size:1.2em; border: 1px solid grey; margin-bottom:10px; } label { width:200px; float:left; padding-top:7px; } #submitButton { height:50px; margin-left:200px; width:100px; } </style> </head> <body> <div id="wrapper"> <form id="validationForm"> <label for="email">Email</label> <input name="email" /> <label for="phone">Telephone</label> <input name="phone" /> <label for="pass">Password</label> <input name="pass" type="password" /> <label for="pass">Confirm Password</label> <input name="pass" type="password" /> <input id="submitButton" type="submit" value="Submit" /> </form> </div> <script> $("#validationForm").submit(function(event){ alert('test'); }); </script> </body> </html> This post has been edited by redbullion: Oct 9 2014, 04:23 PM |
pandy |
Oct 9 2014, 04:28 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
|
Christian J |
Oct 9 2014, 04:56 PM
Post
#3
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
<script type="text/javascript" src="http://www.jquery.com/jquery.min.js" src="jquery.min.js"> </script> There can only be one SRC attribute in the SCRIPT element. If you want a local fallback in case the CDN goes down, you might use something like: CODE <script src="http://www.jquery.com/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="jquery.min.js"><\/script>');</script> Personally I would use the local copy only. This post has been edited by Christian J: Oct 9 2014, 06:04 PM |
Christian J |
Oct 9 2014, 04:57 PM
Post
#4
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
|
pandy |
Oct 9 2014, 05:27 PM
Post
#5
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
Aw... double shame.
|
Lo-Fi Version | Time is now: 29th March 2024 - 03:05 AM |