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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:48:15+00:00 2026-05-18T21:48:15+00:00

LIVE CODE: http://jsfiddle.net/nnMYN/ I have to automatically copy the postal address to the home

  • 0

LIVE CODE: http://jsfiddle.net/nnMYN/

I have to “automatically copy the postal address to the home address field if a user checks the “Same as above” checkbox. In addition to this, we’ll disable the home address field when the checkbox is checked.” (from here) What am I doing wrong?

<html>
    <head>
    </head>
    <body>
        <form>
            <fieldset>

                <legend>Billing Information</legend>

                <p>
                    <label>
                        Postal Address:<br>
                        <textarea name="postaladdress" id="postaladdress"></textarea>
                    </label>
                </p>

                <p>
                    Home Address:<br>
                    <label>
                        <input type="checkbox" name="homepostalcheck" id="homepostalcheck">
                        Same as above
                    </label>
                    <br>
                    <textarea name="homeaddress" id="homeaddress"></textarea>
                </p>

            </fieldset>
        </form>
        <script type="text/javascript">
            var loc = document.getElementById('homepostalcheck');
            var home = document.getElementById('homeaddress');
            loc.onclick = !loc.checked ? function() {home.disabled = true; home.value = post.value; alert(post.value);} : function() {home.disabled = false; home.select();};
        </script>
    </body>
</html>
  • 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-05-18T21:48:15+00:00Added an answer on May 18, 2026 at 9:48 pm

    Just add

    var post = document.getElementById('postaladdress');
    

    You keep trying to access the parameter value of the post object, but there is no such post object because you haven’t defined it. If you add the above line after your definition of home, you should be set! It worked when I edited it on jsFiddle.

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

Sidebar

Related Questions

I have following code (live: http://jsfiddle.net/xyZY8/1/ ): var str = '<div>hello</div><ul><li>Some text...</li>' + '<li>second
You can see the code live here: http://jsfiddle.net/z3xV3/50/ My HTML: <div id=slider></div> <input id=sliderValue
LIVE CODE: http://jsfiddle.net/vy4nY/ I'm following this challenge , but I'm having some issues. I'm
I have this code: http://jsfiddle.net/J6vzU/1/ I want to dynamically display thumbnail of uploaded file
I have a simple code like this http://jsfiddle.net/9braK/2/ $(function(){ $('body').append( $("<a/>").attr({ "id": "foo", "href":"#"
Here is a live example of my problem http://jsfiddle.net/littlesandra88/xksB9/ I would have expected that
i have a fairly simple dropdown I build. Here is the live example: http://jsfiddle.net/K8VtB/
I have the following code: http://jsfiddle.net/YfzbZ/ HTML <dl class=dropdown right> <dt><a>Options</a></dt> <dd> <ul style=display:none;>
Live Demo with visible code; http://jsfiddle.net/3eEgb/4/ The demo should be fairly self explanatory; I'm
My code is available below, and here: http://jsfiddle.net/fRpCy/ var input = []; input.push($('input')); $(input).live('keydown',

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.