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 8004615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:58:07+00:00 2026-06-04T16:58:07+00:00

So the problem that i am having is that, well long story im building

  • 0

So the problem that i am having is that, well long story im building a form with validation etc, nothing special, but when the “submit” button is clicked, a few things are happening which i cant for the life of me, figure out why.

Originally, the html portion of this simple SUBMIT button is this:

   <input type="submit" id="submit" value="Submit"/>

on that buttons click, One of these things happen.

  1. the button becomes VERY small, and behind the scenes(firebug etc) the words inside of it disappear and on firebug check, the code then looks like this

    <input type="submit" id="submit" value>

it completely strips out the value portion of that form element property.

OR

2.the submit buttons “value” becomes one of my error messages.
so for example, youll see something like

<input type="submit" id="submit" value="oops, you forgot something"/> 

which is one of my error messages when a user forgets to fill out a field.

OR

  1. on firefox, even on fresh page load/reload, on that buttons right click, as sOON as i right click it to select “view source” or “inspect with Fbug”, the button becomes green…….The same green that the fields get when a parameter has been properly satisfied.

Ive stopped messing with this since these are very weird so im hoping someone can help me out figure this one out. So far, its a doozy. lol

Here is the js:

<script>



$('document').ready(function(e) {

//FORM VARS 
var firstName = $('#form-name');
var formEmail = $('#form-email');
var formSbj = $('#form-subj');
var formMssg = $('#form-mssg');
var mainF = $('#spForm');
var box = $("#box");
var addem = $('#addem');
var addemR = 8;
var formSubBtn = $('#submit');
var formFields = $('#spForm :input');


//FORM ERROR MESSAGES
var error_MK = 'oops, you forgot something';
var error_isntAnum = 'answer must be numerical please';
var error_numAddition = 'So whats 5 + 3 again???';
var finalCheck = false;
var pageErrorDiv = $('#gen_error');


//this one fires on click
function clearField(){
    if($(this).val() == this.defaultValue || $(this).val() == error_MK || $(this).val() == error_isntAnum || 
    $(this).val() == error_numAddition){
        this.value = '';
        //use this as a workaround for the disappearing "submit" text -->   formSubBtn.val('Submit');
    }
}
//this one fires on blur
function checkVals(){
    if($(this).val()==""){
        $(this).css("background-color","red");
        $(this).css("color","white");   
        $(this).val(error_MK);//error mssg

    } else {
        $(this).css("background-color","green");
        $(this).css("color","white");   
    }



}





//this one checks to see if the person can add lol...make sure its not a SPAM robot.
function checkAddem(){
    if(addem.val()== 'oops, you forgot something' || addem.val()=='AND THE TOTAL IS?'){
        addem.css('background-color','red');
        addem.css('color','white');
        addem.val(error_MK);    //error mssg
    } else if(isNaN(addem.val())){
        addem.css('background-color','red');
        addem.css('color','white');
        addem.val(error_isntAnum);//error mssg  
    } else if(addem.val() != addemR){
        addem.css('background-color','red');
        addem.css('color','white');
        addem.val(error_numAddition);//error mssg   
    }
}


formFields.click(clearField);
formFields.blur(checkVals);
addem.blur( checkAddem );


//FINAL CHECK b4 form submittal.
formSubBtn.bind('click', function(){

    //on click double check all fields
    if( firstName.val()=="" || firstName.val()=="ENTER YOUR NAME HERE" ||  firstName.val()== error_MK ||
    formEmail.val()=="" || formEmail.val()== error_MK || formEmail.val()=="ENTER YOUR EMAIL HERE" ||
    formSbj.val()=="" || formSbj.val()== error_MK || formSbj.val()=="SO WHAT DO YOU WANT TO CHAT ABOUT?" ||
    formMssg.val()=="" || formMssg.val()== error_MK || formMssg.val()=="ENTER YOUR MESSAGE HERE" ||
    addem.val() != addemR){
        pageErrorDiv.text("Information entered either no good or blah blah blah");
        return false;
    }else{

        return true;    
    }


});






});
</script>

Oh and Ps; so you can see whats happening, here is my test link.

http://somdowprod.net/4testing/spFormDev/spContForm

  • 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-04T16:58:08+00:00Added an answer on June 4, 2026 at 4:58 pm

    Well it sounds like your submit button is being validated, which makes sense because you’re selecting it as one of the inputs. Instead of

    var formFields = $('#spForm :input');
    

    Try this:

    var formFields = $('#spForm :input').not('#submit');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having problem that when i am trying to submit the form by
I'm having a strange problem, that I've been trying to solve for too long.
I'm having the weird problem that after having javascript inject some dom-elements the css-rules
I've been thinking/searching for an equivalent of the problem that I am having below,
HI Guys, Here I am having problem that How can I post an image
Taking a rails tutorial, and I've run into the following problem that I'm having
Dear Friends from Stackoverflow, Please help me with a problem that i'm having when
I'm having a problem that only seems to happen on my Lenovo Thinkpad Tablet
I am having a problem that just started happening in OS 3.1. I have
I'm having a problem that a statusbar get displayed over the content of the

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.