Manipulating contents of Text Field

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Manipulating contents of Text Field

    My task is to build a login form. My only tool is HTML - the site does not
    have Coldfusion. It is a very simple form except that the username needs to be
    concatenated with the text '@mydomain.com'

    Instead of just:
    username: ______________
    Password: ______________

    I need it to be Username: ________________ @mydomain.com
    Password: __________________

    When the user clicks 'submit', I want the form.username contents to be
    'username@mydomain.com'
    I think it would be logical to handle this in the processing script, but I
    have no control over that file - someone else, far away is doing that and it
    handles more than just my login form. I could do it in Coldfusion, naming the
    field username1, and then creating a hidden field called Username that =
    #username1#@mydomain.com But, I don't have coldfusion for this page.

    I know nothing about Java, but I'm wondering if that is where my solution is?

    Any help would be appreciated.
    Thanx

    RV Chris Guest

  2. Similar Questions and Discussions

    1. Verifying Case of field contents
      Hi All, A colleague wants a script for a quiz which takes the content of a field and checks it against the given answers. Pretty...
    2. Simple go to frame (contents of field) script
      Hi, I'm having a problem with one of my scripts and I can't figure it out. I have it set so that the I have a object on stage that, when...
    3. Exporting field contents to .html file
      I have a problem that I reckon somone has come across before. We have a database where I enter an HTML header and an HTML footer into two global...
    4. List all and field names database contents
      I have been provided with a DSN, user name and password for one of my clients sites. I'm not an ASP developer and need to view all the contents...
    5. importing exporting container field contents
      Hello Pierre, Under Windows you might find some hints at www.tekstotaal.com/c.fmp.image.import.html and...
  3. #2

    Default Re: Manipulating contents of Text Field

    Use this script in the head section of your html document.
    Change:
    "formname" to yours
    "textfieldname" to your text field name.

    function dothis()
    { document.formname.textfieldname.value =
    document.formname.textfieldname.value + "@domain.com";
    }
    </script>


    Then add this to your text field properties:

    onBlur="dothis();"


    When the user clicks off of the text field it will concantenate for you.



    "RV Chris" <webforumsuser@macromedia.com> wrote in message
    news:d3i3e8$qv4$1@forums.macromedia.com...
    > My task is to build a login form. My only tool is HTML - the site does
    > not
    > have Coldfusion. It is a very simple form except that the username needs
    > to be
    > concatenated with the text '@mydomain.com'
    >
    > Instead of just:
    > username: ______________
    > Password: ______________
    >
    > I need it to be Username: ________________ @mydomain.com
    > Password: __________________
    >
    > When the user clicks 'submit', I want the form.username contents to be
    > 'username@mydomain.com'
    > I think it would be logical to handle this in the processing script, but I
    > have no control over that file - someone else, far away is doing that and
    > it
    > handles more than just my login form. I could do it in Coldfusion, naming
    > the
    > field username1, and then creating a hidden field called Username that =
    > #username1#@mydomain.com But, I don't have coldfusion for this page.
    >
    > I know nothing about Java, but I'm wondering if that is where my solution
    > is?
    >
    > Any help would be appreciated.
    > Thanx
    >

    Anthony Brown Guest

  4. #3

    Default Re: Manipulating contents of Text Field

    Sorry I forgot the Jscript part. Here ya go:

    <script language="JavaScript">
    function dothis()
    { document.formname.textfieldname.value =
    document.formname.textfieldname.value + "@domain.com";
    }
    </script>



    "Anthony Brown" <anthony@kermy.com> wrote in message
    news:d3i60g$mh$1@forums.macromedia.com...
    > Use this script in the head section of your html document.
    > Change:
    > "formname" to yours
    > "textfieldname" to your text field name.
    >
    > function dothis()
    > { document.formname.textfieldname.value =
    > document.formname.textfieldname.value + "@domain.com";
    > }
    > </script>
    >
    >
    > Then add this to your text field properties:
    >
    > onBlur="dothis();"
    >
    >
    > When the user clicks off of the text field it will concantenate for you.
    >
    >
    >
    > "RV Chris" <webforumsuser@macromedia.com> wrote in message
    > news:d3i3e8$qv4$1@forums.macromedia.com...
    >> My task is to build a login form. My only tool is HTML - the site does
    >> not
    >> have Coldfusion. It is a very simple form except that the username needs
    >> to be
    >> concatenated with the text '@mydomain.com'
    >>
    >> Instead of just:
    >> username: ______________
    >> Password: ______________
    >>
    >> I need it to be Username: ________________ @mydomain.com
    >> Password: __________________
    >>
    >> When the user clicks 'submit', I want the form.username contents to be
    >> 'username@mydomain.com'
    >> I think it would be logical to handle this in the processing script, but
    >> I
    >> have no control over that file - someone else, far away is doing that and
    >> it
    >> handles more than just my login form. I could do it in Coldfusion,
    >> naming the
    >> field username1, and then creating a hidden field called Username that =
    >> #username1#@mydomain.com But, I don't have coldfusion for this page.
    >>
    >> I know nothing about Java, but I'm wondering if that is where my solution
    >> is?
    >>
    >> Any help would be appreciated.
    >> Thanx
    >>
    >
    >

    Anthony Brown Guest

  5. #4

    Default Re: Manipulating contents of Text Field

    .oO(RV Chris)
    > When the user clicks 'submit', I want the form.username contents to be
    >'username@mydomain.com'
    > I think it would be logical to handle this in the processing script
    That's the only reliable way.
    >but I
    >have no control over that file - someone else, far away is doing that and it
    >handles more than just my login form. I could do it in Coldfusion, naming the
    >field username1, and then creating a hidden field called Username that =
    >#username1#@mydomain.com But, I don't have coldfusion for this page.
    >
    > I know nothing about Java, but I'm wondering if that is where my solution is?
    You can do it with Javascript (not Java!), but what if the user has JS
    disabled or not available at all? It will break the script.

    Micha
    Michael Fesser Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139