Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 4 of 4 FirstFirst ... 234
Results 46 to 52 of 52
  1. #46
    Regular Coder
    Join Date
    Apr 2013
    Posts
    112
    Thanks
    1
    Thanked 0 Times in 0 Posts
    a7 element is just a textbox lol, its a parent/carer textbox.. Basically whatever u type goes into another section which is labeled carer: , makes sense?

  2. #47
    Regular Coder
    Join Date
    Apr 2013
    Posts
    112
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Scratch everything i said, lol..

    This form of code should work correct? Will copy first textbox PARENT to textbox PRINTNAME correct ? How will the javascript look ?
    Code:
    <form>
    ...
    	<input type="text" size="30" name="parent" 
                   onchange="this.form.printname.value=this.value;" />
    	<input type="text" size="30" name="printname" />
    ...
    </form>

  3. #48
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    THAT INCLUDES THE JAVASCRIPT. THE CODE IN RED IS--REPEAT IS--JAVASCRIPT.
    Code:
    <form>
    ...
    	<input type="text" size="30" name="parent" 
                   onchange="this.form.printname.value=this.value;" />
    	<input type="text" size="30" name="printname" readonly="readonly" />
    ...
    </form>
    Sorry to get so emphatic, but apparently you thought that code was chopped-liver-and-onions, despite my prior disclaimer.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  4. #49
    Regular Coder
    Join Date
    Apr 2013
    Posts
    112
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Sorry i should be more thorough, i mean do i include this without changing any values ?
    Code:
    <script type="text/javascript">
    function copy(what)
    {
        form["print" + what.name].value = what.value;
    }
    </script>

  5. #50
    Regular Coder
    Join Date
    Apr 2013
    Posts
    112
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Do u have a email? I havent added the above code but my previous validation doesn't display anything yet when i move it in front of my other validation it works and the other doesn't ??? Mind ****

  6. #51
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    *SIGH*

    I gave you TWO DIFFERENT WAYS of doing the copy.

    The easiest, especially if you will only be using a handful of copied fields, is the version with the inline JS code, the stuff in post #48 and others. I do *NOT* suggest you use the copy(what) stuff at this time. If for no other reason than your instructor will never believe you wrote it if you don't understand it.

    And no, I don't answer email questions about homework. (I do about other kinds of questions.) If I did (if any of us here did) we would be snowed under and never get any work done.

    When and if you are prepared to show the *ENTIRE* <form> and the *ENTIRE* JavaScript you are using, feel free to post them. But when you give us little dribbles and drabs as you have been doing, it's nearly impossible for us to guess what mistakes you have made in trying to integrate them.

    In any case, I'm off for the night. Food and sleep await me.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  7. Users who have thanked Old Pedant for this post:

    Johnny87auxsm (05-02-2013)

  8. #52
    Regular Coder
    Join Date
    Apr 2013
    Posts
    112
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thats okay dude, i completely understand. I havent pasted my javascript here because people from my class will see it and use it trust me seen it hundreds of times over the 3 years of being here, hence why i asked for your email mate. Well i guess i'll use #post48 which doesn't require any javascript below as the javascript is implemented within the text box correct?


 
Page 4 of 4 FirstFirst ... 234

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •