Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-05-2013, 09:17 PM   PM User | #1
qwertyjjj
New Coder

 
Join Date: Dec 2007
Posts: 59
Thanks: 1
Thanked 0 Times in 0 Posts
qwertyjjj is an unknown quantity at this point
javascript errors load

S, I just updated a theme on my WP site. I used to have some menus at the the top of the page with drop downs.

Any ideas what I have to fix: error 1=load is not a function
Code:
$(window).load(function(){
// Main Menu
main_menu();
// Greyscale Hover
if(!$.browser.msie) base_greyscale_hover();
});
error2=TypeError: $(...) is null on the validate form
Code:
function base_form() {
// Form AJAX and Validate
$('.validate-form, #commentform').each(function(){
$(this).validate({
errorPlacement: function(error, element) {
error.appendTo( element.siblings('.form-error-box') );
element.siblings('.form-error-box').hide().fadeIn();
}
});
});
$('.ajax-form').ajaxForm({
dataType: 'json',
beforeSubmit: function(arr, $form, options){
$('.form-response', $form).html('sending data …').fadeIn();
},
success: function(data, statusText, xhr, $form){
$('.form-response', $form).html(data.response_text);
$form[0].reset();
}
});
qwertyjjj is offline   Reply With Quote
Old 02-05-2013, 11:05 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,604
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Please show us the HTML on which the scripts are used. Especially the first one sounds like jQuery hasn’t been included properly. Also, $.browser has looong been deprecated and should not be used. Instead of browser detection you should do feature detection, e. g. using $.support.
__________________
Don’t click this link!
VIPStephan is online now   Reply With Quote
Old 02-06-2013, 08:36 AM   PM User | #3
qwertyjjj
New Coder

 
Join Date: Dec 2007
Posts: 59
Thanks: 1
Thanked 0 Times in 0 Posts
qwertyjjj is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
Please show us the HTML on which the scripts are used. Especially the first one sounds like jQuery hasn’t been included properly. Also, $.browser has looong been deprecated and should not be used. Instead of browser detection you should do feature detection, e. g. using $.support.
attached
Attached Files
File Type: zip index.zip (8.6 KB, 10 views)
qwertyjjj is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:53 AM.


Advertisement
Log in to turn off these ads.