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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:18:11+00:00 2026-06-08T14:18:11+00:00

I have a hidden form that is interfaced with a more graphic/user-friendly interface, and

  • 0

I have a hidden form that is interfaced with a more graphic/user-friendly interface, and one of the hidden inputs is being “watched” with the following function:

 $('#mag-pg input')[0].watch('value', function(prop, oldval, newval){
    if(printRef instanceof Object){
        var curSz = $('#mag-sz input').val();
        toggleBtn($('#mag-sz button'), 'inactive');
        for(u in printRef[newval]){
            toggleBtn($('#mag-sz button[value='+u+"]"), 'active');
        }
        $('#mag-sz button[value='+curSz+']').click();
    }
    updateOrderInfo();
    console.log(newval);
    return newval;
});

The watch function is as follows:

if (!Object.prototype.watch) {
Object.defineProperty(Object.prototype, "watch", {
      enumerable: false
    , configurable: true
    , writable: false
    , value: function (prop, handler) {
        var
          oldval = this[prop]
        , newval = oldval
        , getter = function () {
            return newval;
        }
        , setter = function (val) {
            oldval = newval;
            return newval = handler.call(this, prop, oldval, val);
        }
        ;

        if (delete this[prop]) { // can't watch constants
            Object.defineProperty(this, prop, {
                  get: getter
                , set: setter
                , enumerable: true
                , configurable: true
            });
        }
    }
});

}

This works very well, up until I try to submit the hidden form. The problem is that Chrome does not submit the value of the hidden input that is being watched. This is very odd because checking the value of the input using the console returns the correct value. I have checked the HTTP request using fiddler and the value of the input is definitely not being sent to the server. It would thus appear that Chrome is not properly applying the new value to the input, even though the console would suggest otherwise. I am wondering if anyone has seen this before or if there something I am doing wrong with the watch.

I don’t want to remove the watch, because the point of it is to ensure synchronization. This application is complex and without the value being watched, it would be very easy for different parts of the app to not be updated when they should.

Every other browser correctly submits the input value to the server.

  • 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-08T14:18:13+00:00Added an answer on June 8, 2026 at 2:18 pm

    That watch implementation is kind of….incomplete. Maybe this will work better? https://gist.github.com/3196198

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

Sidebar

Related Questions

I have a couple Hidden form fields that are not being sent when I
I have a form containing 2 input fields, one being hidden and a button.
I have a hidden button on a form that I need to click in
So I have this hidden form and this 'I like this' button that I
I have a contact form that can be hidden using .slideToggle() but I want
I have a field in a CCK node form that is hidden, and has
I have a hidden input field in my form. I noticed that if that
I have a form with a hidden Came from Adwords field that will be
I have a hidden field on a form that is created in Razor using
So I have a form that I want the user to use to update

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.