Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

auto submit?

  • 03-07-2006 8:54am
    #1
    Closed Accounts Posts: 238 ✭✭


    hi guys,

    im working on a page and need to achieve this:

    bob@whatever.com

    i want the user to only submit the blue bit, and the page complete the red bit. how do i do this with html (or even java) i know it could be done with cgi but its for an internal application and there will be no cgi bin.

    anyone know hoe to do this?


Comments

  • Registered Users, Registered Users 2 Posts: 8,488 ✭✭✭Goodshape


    mmmmm... gooooogle.

    This (first search result) might be the sort of thing you're after ?


  • Closed Accounts Posts: 238 ✭✭7aken


    cheers goodshape, you may have hit the nail on the head!!

    many thanks


  • Closed Accounts Posts: 238 ✭✭7aken


    for anyone who may be interested in this topic, i have since figured it out and the two best options are outlined below


    <input name="email" type="text" id="email" value="@whatever.com" size="25" maxlength="25">

    You can change the inputs as you require…

    Another way to do this would be using Javascript's concat() method. I have outlined the code below:


    CONCAT()

    Description
    Returns a String object containing the concatenation of two supplied strings.
    Syntax
    string1.concat(string2)
    The concat method syntax has these parts:
    Part Description
    string1 Required. The String object or literal to concatenate with string2.
    string2 Required. A String object or literal to concatenate to the end of string1.
    Remarks
    The result of the concat method is equivalent to: result = string1 + string2.
    The following example illustrates the use of the concat method:
    function concatDemo()
    {
    var str1 = "ABCDEFGHIJKLM" <-- ! this is where you put the submit -->
    var str2 = "NOPQRSTUVWXYZ"; <-- ! this will be @whatever.com -->
    var s = str1.concat(str2);
    // Return concatenated string.
    return(s);
    }



    ARRAY OPTION


    Description
    Returns an new array consisting of a combination of two arrays.
    Syntax
    array1.concat(array2)
    The concat method syntax has these parts:
    Part Description
    array1 Required. An Array object to concatenate with array2.
    array2 Required. An Array object to concatenate to the end of array1.
    Remarks
    The concat method returns an Array object containing the concatenation of array1 and array2.
    If an object reference is copied from either array1 or array2 to the result, the object reference in the result still points to the same object. Changes to that object are reflected in both arrays.
    The following example illustrates the use of the concat method:
    function ConcatArrayDemo()
    {
    var a, b, c;
    a = new Array(0,1,2,3,4);
    b = new Array(5,6,7,8,9);
    c = a.concat(b);
    return(c);
    }


Advertisement