Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9161835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:03:51+00:00 2026-06-17T14:03:51+00:00

$(function() { $(.error).hide(); $(#submit).click(function() { //form validate var name= $(input#fullname).val(); if (name == )

  • 0
$(function()
{
$(".error").hide();
$("#submit").click(function()
{
    //form validate
    var name= $("input#fullname").val();
        if (name == "")
        {
            $("label#name_error").show();
            $("input#fullname").focus();
            return false;
        }
    var email= $("input#email").val();
        if (email == "")
        {
            $("label#email_error").show();
            $("input#email").focus();
            return false;
        }
    var subject= $("input#subject").val();
        if (subject == "")
        {
            $("label#subject_error").show();
            $("input#subject").focus();
            return false;
        }
    var textarea= $("textarea#textarea").val();
        if (textarea == "")
        {
            $("label#textarea_error").show();
            $("textarea#textarea").focus();
            return false;
        }

    var dataString = 'fullname='+name+'&email='+email+'&subject='+subject+'&textarea='+textarea;
    //alert (dataString);return false;
    $.ajax({
        type: "POST",
        url: "form.php",
        data: dataString,
        success: function()
        {
            $("#form").html("<div id='message'></div>");
            $("#message").html("<h2 id='success'>Query Submitted!</h2>").append("<p>You will be contacted shortly...</p><p>Reload the page to submit another query.</p>").hide().fadeIn(1500)
        }
    })
    return false;
});
});

its just a small question

I have this website which has been working perfectly for the past 2-3 months … but today when I accidentally wandered into the resource section of chrome’s console window there was an error saying

“uncaught reference error: $ is not defined”

I haven’t found a satisfactory answer on the web anywhere … your thoughts?

here is the head section… i have not included any scripts anywhere else on the page

<head>

    <meta charset="utf-8">

    <link rel="stylesheet" href="cq.css" type="text/css">

    <script type="text/javascript" src="form.js"></script>

    <link rel="shortcut icon" href="images/favicon.ico" />

    <script src="jquery.js"></script>

    <script src="form.js"></script>

    <!--share-->

    <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>

    <script type="text/javascript">stLight.options({publisher: "ur-c6d56dfc-f929-5bbf-a456-178fc403ae45"});</script>

    <!--share ends here-->



</head>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:03:52+00:00Added an answer on June 17, 2026 at 2:03 pm

    You’re calling your script before referencing jQuery. Change your HTML to:

    <script src="jquery.js"></script>
    <script type="text/javascript" src="form.js"></script>
    

    You’re also importing the same JavaScript file (form.js) twice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ajaxSubmit.js: $(document).ready(function(){ $('#submit').click(function() { $('#waiting').show(500); $('#reg').hide(0); $('#message').hide(0); $.ajax({ type : 'POST', url : 'post.php',
Hopefully a simple issue: $(document).ready(function(){ $(#regform).validate({ errorPlacement: function (error, element) { $(element).parent().next().next().hide(); //works $(element).parent().next('div.test').hide();
I am trying to adapt the following code $(#artistSearch).submit(function (event) { event.preventDefault(); var form
im using jquery to submit a php form. during the submission, it will validate
[name=AddClientSubmit] ... is the submit button on a form. The $.POST sends the forms
I have the following code: JS <script type=text/javascript> $(function(){ $('#fgotpwfield').hide(); $('#login_submit').click(function() { $('#form_result').fadeOut('fast'); $('#myccrxlogin
The function below works as it should. It's to validate a form. In short,
jQuery delegate function is giving 'not a function' error for my plugin. So I
im getting a CFDictionaryAddValue(): immutable collection 0xd5aea0 given to mutating function error when i
In the code below: DbModels.prototype.updateById = function(_collection, id, field, value, callback) { this.getCollection(_collection, function(error,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.