SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    pass contents of field to URL

    from the below code how do I pass the contents of the 'username' field to the end of the URL:

    https://carrierconnect.etdatacenter....&user=username

    where I currently have username


    Basically the form works where I fill in the username and password then based on whether the user selects 'customer tracking' or 'web booking' goes to the specific URL



    <script type="text/javascript">

    function OnSubmitForm()

    {

    if(document.myform.operation[0].checked == true)

    {

    document.myform.action ="https://webtrace.etdatacenter.com/webtrace.aspx?accesstype=autologin&cust=id_015&user=templateuser";

    }

    else

    if(document.myform.operation[1].checked == true)

    {

    document.myform.action ="https://carrierconnect.etdatacenter.com/Default.aspx?accesstype=autologin&cust=id_015&user=username";

    }

    return true;

    }

    </script>



    <form name="myform" target="_blank" method="post" action="" onsubmit="return OnSubmitForm();">
    <fieldset>
    <legend><font color="#FFFFFF">LOGIN</font></legend>
    username: <input type="text" name="username"/><br /><br />
    password: <input type="password" name="password"/><br />
    <input type="radio" name="operation" value="1" checked="checked"/><font size="-1">Customer Tracking</font>
    <input type="radio" name="operation" value="2" /><font size="-1">Web Booking </font>
    <input type="submit" name="submit" value="submit" />
    </fieldset>

    </form>

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could someone take a look at this? The page is at www.meadowlarkco.com/indexnewsite_test7.htm

    basically based off of which radio button is selected whether 'Customerr Tracking' or 'Web Booking' the user is directed to the appropriate URL and I need to attach the value of what is put in the username field to the end of that URL. For example for 'Web Booking


    https://carrierconnect.etdatacenter....r=templateuser



    Where I currently have templateuser I need to put the value of the field 'username'

    thanks


Bookmarks

Posting Permissions

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