Passing form elements from/to HTML pages via JavaScript...

Discussion in 'Javascript' started by Kevin Lyons, Oct 14, 2003.

  1. Kevin Lyons

    Kevin Lyons Guest


    I am trying to get all of my form elements passed correctly from the
    following URL:
    to the following URL:

    I am passing name, email, countries, cities, products, courses, etc.
    The others display as they should on the subsequent page,
    but the courses retains my loop variable rather than the value as I
    would like.

    I am concerned that my JS & HTML code function correctly for an
    intranet site working in an IE environment only, but I have
    a few errors that I am trying to implement (which need fixing):

    1) I am getting an error each time I select a different city name.
    Could the underscores be an issue for the courses when UK
    or US is selected?

    2) Should all occurrences of "_" within the code be streamlined
    against being used? If so, similarly to the city names code,
    should the 'courses' data be an associative array object as well?

    3) Another had suggested using a 'dynamic' index for comparison for
    the courses data validation on the suggest input box? I
    have tried different variations to correct this, but I cannot get it
    to work.

    These two lines in particular pertain to what was suggested about
    using a variation of this replacement code:
    if([somePassedNdx].value == 'someFlag')

    if ( == "" ||[17].selected) {
    if ([18].selected) {

    4) Furthermore, how can I resolve my course name also passing for the
    results page:

    One suggested, "can I pass the associated array text value instead of
    the number of the array. Simply, create a hidden field,
    pass the text value to the hidden field -- pick up the hidden field in
    the receiving page and ignore the passed index."

    To no avail I have tried; how do I go about writing the hidden field
    portion so that it can populate the results page?

    5) For my date select box data validation, I have a portion of it
    written near the bottom of the function verifyData(data), but I
    am having trouble verifying if the selected date is before or after
    the current date. How can I compare the selected date with
    today's date so that one doesn't select a date prior to today's?

    6) Lastly, if a product is selected before the country is selected and
    auto-populates the courses, the courses don't populate
    unless a product radio button is reselected. Can this be avoided?

    I welcome anyone to review the code from each to see what I can do to
    correct things. Can someone assist? Again, the
    pages can be viewed from the following URL:

    Thanks much,

    Kevin Lyons, Oct 14, 2003
    1. Advertisements

  2. kaeli

    kaeli Guest

    And on the day 14 Oct 2003 09:12:16 -0700,
    enlightened us with <>...
    > Hello,
    > I am trying to get all of my form elements passed correctly from the
    > following URL:
    > to the following URL:

    First off, this didn't work at all in IE6/WinXP. Got an error and
    couldn't get to the next page at all - couldn't select a course. The
    browser has no idea what this is and neither do I.
    category = window[selectChoice + "_" + radioChoice];
    I get an error when you try to access category.length. Null or not an
    object. What are you trying to do here? Your code has no comments.
    Trying to decide what you want it to do is not an easy thing.

    Also, a bug - when the page is refreshed, the city is still there, but
    no cities are listed. To fix that, add the fill to the onload.

    <body onload="if( == 0)
    document.getElementById('hide').style.display = 'none'; else fillCity
    [].value);"><!-- _HEADER_START_
    --><!-- _HEADER_END_ -->

    There is a function call that I can't find the function...and neither
    can my browser.
    <SELECT onchange=selectCity(this) size=1 name=cities>
    where is the function selectCity()?

    Fix that stuff and see if it helps.

    Kill one man and you are a murderer. Kill millions
    and you are a conqueror. Kill everyone and you
    are God.
    kaeli, Oct 15, 2003
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. P
    Joe Kesselman
    Jul 7, 2006
  2. Rajarshi Guha
    Larry Bates
    Apr 18, 2005
  3. Kevin Lyons
    Dr John Stockton
    Oct 7, 2003
  4. Replies:
  5. Replies: