A selection changes on asp page with 6 dependent list boxes, when back

Discussion in 'ASP .Net' started by Galina, Jan 20, 2004.

  1. Galina

    Galina Guest

    Hello
    I have 6 dependent list boxes on my ASP page:
     Faculty;
     Lecturer;
     Course;
     Course occurrence;
     Group;
     Week commencing date.
    When faculty is selected, lists of lecturers and courses are
    populated. When course is selected, lists of occurrences, groups and
    dates are populated.
    All data to populate list boxes come from a database on SQL server,
    from separate recordsets. List boxes are populated on the client side
    using functions generated in the source, when asp page is processed on
    the server side. An example:
    function populateLecturer_from_Faculty(Faculty) {
    prodBox1 = document.getSearch.selLecturer
    clearBox(prodBox1);
    switch (Faculty) {

    case 'ABT' :
    addBoxItem(prodBox1, ' ', '*');

    addBoxItem(prodBox1, 'Baxxr, V', '52');

    addBoxItem(prodBox1, 'Coxxly, M', '293');

    addBoxItem(prodBox1, 'Dxxn, T', '357');

    break;

    case 'BMP' :
    addBoxItem(prodBox1, ' ', '*'); addBoxItem(prodBox1, 'Buxxll, N',
    '4197');

    addBoxItem(prodBox1, 'Caxxde, J', '2779');

    addBoxItem(prodBox1, 'Vowxxs, C', '1279');

    break;

    case 'CHT' :
    addBoxItem(prodBox1, ' ', '*');

    addBoxItem(prodBox1, 'Bisxxp, E', '2763');

    addBoxItem(prodBox1, 'Brxxey, D, '172');

    break;

    case 'CLT' :
    addBoxItem(prodBox1, ' ', '*');

    addBoxItem(prodBox1, 'Garxxng, M', '471');

    addBoxItem(prodBox1, 'Waxxh, J', '1302');

    break;

    and so on.

    It is of course a very long source, but it works.
    When user selects everything, the selection uniquely identifies a
    group of students. When user clicks the button Submit, another asp
    page is activated showing room(s) occupied by this group on each day
    of the selected week. It also works.
    My problem: when user clicks the button Back of the browser to return
    to the selection asp page, the selection disappears. All list boxes
    return to the full initial lists of faculties, lecturers, courses and
    so on and the first item of each list is shown rather then that one
    that was selected.
    Why does asp page changes, when user navigates back to it? How can I
    prevent this change? I want my users to see the same data, when they
    return to the page.
    The browser is IE 5.5 on Windows 9x and 6.0. on Windows 2000. (Being a
    large college, we have PCs in different stages of Windows update.) The
    problem looks the same on both browsers.
    Any help will be greatly appreciated.
    Thank you.
    Galina
     
    Galina, Jan 20, 2004
    #1
    1. Advertising

  2. Do you mean that when a user chooses faculty for example, the page is posted
    back to the server to get the values for lists of lectures and courses?
    or Do you mean that all those values are taken from the database once and
    client side script handles the case when the user makes his choices?


    If you use the option of getting the data from the database at start and
    then a client side script would handle the choices of the user, the page is
    not posted back unless the submit button is clicked. In this case, when the
    user presses the back button, the web browser would return to the first page
    and the choices won't be saved. If this is actually your scenario and you
    want the back button to return to the choices the user made, then you could
    make the list boxes post back (set AutoPostBackBack property to true) and
    retrieve the data from the database in that event. This means that when a
    user makes a choice in one of the listboxes, the request will be posted to
    the server and the needed data is retrieved and returned to the client.
    This way would make the loading of the page quicker in the first time, but
    would need make more roundtrips between the server and the user's browser
    when the user makes a selection from the list boxes.

    regards
    Mohamed El Ashmawy
    Microsoft GTSC Developer support for Middle East

    "Galina" <> wrote in message
    news:...
    > Hello
    > I have 6 dependent list boxes on my ASP page:
    >  Faculty;
    >  Lecturer;
    >  Course;
    >  Course occurrence;
    >  Group;
    >  Week commencing date.
    > When faculty is selected, lists of lecturers and courses are
    > populated. When course is selected, lists of occurrences, groups and
    > dates are populated.
    > All data to populate list boxes come from a database on SQL server,
    > from separate recordsets. List boxes are populated on the client side
    > using functions generated in the source, when asp page is processed on
    > the server side. An example:
    > function populateLecturer_from_Faculty(Faculty) {
    > prodBox1 = document.getSearch.selLecturer
    > clearBox(prodBox1);
    > switch (Faculty) {
    >
    > case 'ABT' :
    > addBoxItem(prodBox1, ' ', '*');
    >
    > addBoxItem(prodBox1, 'Baxxr, V', '52');
    >
    > addBoxItem(prodBox1, 'Coxxly, M', '293');
    >
    > addBoxItem(prodBox1, 'Dxxn, T', '357');
    >
    > break;
    >
    > case 'BMP' :
    > addBoxItem(prodBox1, ' ', '*'); addBoxItem(prodBox1, 'Buxxll, N',
    > '4197');
    >
    > addBoxItem(prodBox1, 'Caxxde, J', '2779');
    >
    > addBoxItem(prodBox1, 'Vowxxs, C', '1279');
    >
    > break;
    >
    > case 'CHT' :
    > addBoxItem(prodBox1, ' ', '*');
    >
    > addBoxItem(prodBox1, 'Bisxxp, E', '2763');
    >
    > addBoxItem(prodBox1, 'Brxxey, D, '172');
    >
    > break;
    >
    > case 'CLT' :
    > addBoxItem(prodBox1, ' ', '*');
    >
    > addBoxItem(prodBox1, 'Garxxng, M', '471');
    >
    > addBoxItem(prodBox1, 'Waxxh, J', '1302');
    >
    > break;
    >
    > and so on.
    >
    > It is of course a very long source, but it works.
    > When user selects everything, the selection uniquely identifies a
    > group of students. When user clicks the button Submit, another asp
    > page is activated showing room(s) occupied by this group on each day
    > of the selected week. It also works.
    > My problem: when user clicks the button Back of the browser to return
    > to the selection asp page, the selection disappears. All list boxes
    > return to the full initial lists of faculties, lecturers, courses and
    > so on and the first item of each list is shown rather then that one
    > that was selected.
    > Why does asp page changes, when user navigates back to it? How can I
    > prevent this change? I want my users to see the same data, when they
    > return to the page.
    > The browser is IE 5.5 on Windows 9x and 6.0. on Windows 2000. (Being a
    > large college, we have PCs in different stages of Windows update.) The
    > problem looks the same on both browsers.
    > Any help will be greatly appreciated.
    > Thank you.
    > Galina
     
    Mohamed El Ashamwy, Jan 20, 2004
    #2
    1. Advertising

  3. Galina

    Galina Guest

    Mohamed
    Thank you very much for your answer.

    I have set AutoPostBackBack property to true, I hope, correctly:
    <select name="selFaculty" AUTOPOSTBACK = TRUE
    onChange="populateLecturer_from_Faculty(this.options[this.selectedIndex].value),
    populateCourse_from_Faculty(this.options[this.selectedIndex].value);">

    Would it be possible for you to point me in a direction of a code,
    which retrieves the data from the database, when selected item is auto
    posted? It is my very first asp page...
    Galina

    "Mohamed El Ashamwy" <> wrote in message news:<#>...
    > Do you mean that when a user chooses faculty for example, the page is posted
    > back to the server to get the values for lists of lectures and courses?
    > or Do you mean that all those values are taken from the database once and
    > client side script handles the case when the user makes his choices?
    >
    >
    > If you use the option of getting the data from the database at start and
    > then a client side script would handle the choices of the user, the page is
    > not posted back unless the submit button is clicked. In this case, when the
    > user presses the back button, the web browser would return to the first page
    > and the choices won't be saved. If this is actually your scenario and you
    > want the back button to return to the choices the user made, then you could
    > make the list boxes post back (set AutoPostBackBack property to true) and
    > retrieve the data from the database in that event. This means that when a
    > user makes a choice in one of the listboxes, the request will be posted to
    > the server and the needed data is retrieved and returned to the client.
    > This way would make the loading of the page quicker in the first time, but
    > would need make more roundtrips between the server and the user's browser
    > when the user makes a selection from the list boxes.
    >
    > regards
    > Mohamed El Ashmawy
    > Microsoft GTSC Developer support for Middle East
    >
    > "Galina" <> wrote in message
    > news:...
    > > Hello
    > > I have 6 dependent list boxes on my ASP page:
    > >  Faculty;
    > >  Lecturer;
    > >  Course;
    > >  Course occurrence;
    > >  Group;
    > >  Week commencing date.
    > > When faculty is selected, lists of lecturers and courses are
    > > populated. When course is selected, lists of occurrences, groups and
    > > dates are populated.
    > > All data to populate list boxes come from a database on SQL server,
    > > from separate recordsets. List boxes are populated on the client side
    > > using functions generated in the source, when asp page is processed on
    > > the server side. An example:
    > > function populateLecturer_from_Faculty(Faculty) {
    > > prodBox1 = document.getSearch.selLecturer
    > > clearBox(prodBox1);
    > > switch (Faculty) {
    > >
    > > case 'ABT' :
    > > addBoxItem(prodBox1, ' ', '*');
    > >
    > > addBoxItem(prodBox1, 'Baxxr, V', '52');
    > >
    > > addBoxItem(prodBox1, 'Coxxly, M', '293');
    > >
    > > addBoxItem(prodBox1, 'Dxxn, T', '357');
    > >
    > > break;
    > >
    > > case 'BMP' :
    > > addBoxItem(prodBox1, ' ', '*'); addBoxItem(prodBox1, 'Buxxll, N',
    > > '4197');
    > >
    > > addBoxItem(prodBox1, 'Caxxde, J', '2779');
    > >
    > > addBoxItem(prodBox1, 'Vowxxs, C', '1279');
    > >
    > > break;
    > >
    > > case 'CHT' :
    > > addBoxItem(prodBox1, ' ', '*');
    > >
    > > addBoxItem(prodBox1, 'Bisxxp, E', '2763');
    > >
    > > addBoxItem(prodBox1, 'Brxxey, D, '172');
    > >
    > > break;
    > >
    > > case 'CLT' :
    > > addBoxItem(prodBox1, ' ', '*');
    > >
    > > addBoxItem(prodBox1, 'Garxxng, M', '471');
    > >
    > > addBoxItem(prodBox1, 'Waxxh, J', '1302');
    > >
    > > break;
    > >
    > > and so on.
    > >
    > > It is of course a very long source, but it works.
    > > When user selects everything, the selection uniquely identifies a
    > > group of students. When user clicks the button Submit, another asp
    > > page is activated showing room(s) occupied by this group on each day
    > > of the selected week. It also works.
    > > My problem: when user clicks the button Back of the browser to return
    > > to the selection asp page, the selection disappears. All list boxes
    > > return to the full initial lists of faculties, lecturers, courses and
    > > so on and the first item of each list is shown rather then that one
    > > that was selected.
    > > Why does asp page changes, when user navigates back to it? How can I
    > > prevent this change? I want my users to see the same data, when they
    > > return to the page.
    > > The browser is IE 5.5 on Windows 9x and 6.0. on Windows 2000. (Being a
    > > large college, we have PCs in different stages of Windows update.) The
    > > problem looks the same on both browsers.
    > > Any help will be greatly appreciated.
    > > Thank you.
    > > Galina
     
    Galina, Jan 21, 2004
    #3
  4. Are you using ASP or ASP.net?
    If you are using ASP, then there is no AutoPostback property. In this case,
    you should make each of the listboxes submit values to an asp page (could be
    the same page) which get the values from the database (the usual way you
    did before).

    I see from your code that you are using "select" which is an HTML control,
    so it's better that you use the previous strategy in all cases rather than
    using the AutoPostBack Property.

    In general the old code that you used before to connect to the database
    should suffice your need.
    A good ASP site that contains some tutorials is:
    http://www.4guysfromrolla.com

    Regards
    Mohamed El Ashmawy
    Microsoft GTSC Developer support for Middle East

    "Galina" <> wrote in message
    news:...
    > Mohamed
    > Thank you very much for your answer.
    >
    > I have set AutoPostBackBack property to true, I hope, correctly:
    > <select name="selFaculty" AUTOPOSTBACK = TRUE
    >

    onChange="populateLecturer_from_Faculty(this.options[this.selectedIndex].val
    ue),
    > populateCourse_from_Faculty(this.options[this.selectedIndex].value);">
    >
    > Would it be possible for you to point me in a direction of a code,
    > which retrieves the data from the database, when selected item is auto
    > posted? It is my very first asp page...
    > Galina
    >
    > "Mohamed El Ashamwy" <> wrote in

    message news:<#>...
    > > Do you mean that when a user chooses faculty for example, the page is

    posted
    > > back to the server to get the values for lists of lectures and courses?
    > > or Do you mean that all those values are taken from the database once

    and
    > > client side script handles the case when the user makes his choices?
    > >
    > >
    > > If you use the option of getting the data from the database at start and
    > > then a client side script would handle the choices of the user, the page

    is
    > > not posted back unless the submit button is clicked. In this case, when

    the
    > > user presses the back button, the web browser would return to the first

    page
    > > and the choices won't be saved. If this is actually your scenario and

    you
    > > want the back button to return to the choices the user made, then you

    could
    > > make the list boxes post back (set AutoPostBackBack property to true)

    and
    > > retrieve the data from the database in that event. This means that when

    a
    > > user makes a choice in one of the listboxes, the request will be posted

    to
    > > the server and the needed data is retrieved and returned to the client.
    > > This way would make the loading of the page quicker in the first time,

    but
    > > would need make more roundtrips between the server and the user's

    browser
    > > when the user makes a selection from the list boxes.
    > >
    > > regards
    > > Mohamed El Ashmawy
    > > Microsoft GTSC Developer support for Middle East
    > >
    > > "Galina" <> wrote in message
    > > news:...
    > > > Hello
    > > > I have 6 dependent list boxes on my ASP page:
    > > >  Faculty;
    > > >  Lecturer;
    > > >  Course;
    > > >  Course occurrence;
    > > >  Group;
    > > >  Week commencing date.
    > > > When faculty is selected, lists of lecturers and courses are
    > > > populated. When course is selected, lists of occurrences, groups and
    > > > dates are populated.
    > > > All data to populate list boxes come from a database on SQL server,
    > > > from separate recordsets. List boxes are populated on the client side
    > > > using functions generated in the source, when asp page is processed on
    > > > the server side. An example:
    > > > function populateLecturer_from_Faculty(Faculty) {
    > > > prodBox1 = document.getSearch.selLecturer
    > > > clearBox(prodBox1);
    > > > switch (Faculty) {
    > > >
    > > > case 'ABT' :
    > > > addBoxItem(prodBox1, ' ', '*');
    > > >
    > > > addBoxItem(prodBox1, 'Baxxr, V', '52');
    > > >
    > > > addBoxItem(prodBox1, 'Coxxly, M', '293');
    > > >
    > > > addBoxItem(prodBox1, 'Dxxn, T', '357');
    > > >
    > > > break;
    > > >
    > > > case 'BMP' :
    > > > addBoxItem(prodBox1, ' ', '*'); addBoxItem(prodBox1, 'Buxxll, N',
    > > > '4197');
    > > >
    > > > addBoxItem(prodBox1, 'Caxxde, J', '2779');
    > > >
    > > > addBoxItem(prodBox1, 'Vowxxs, C', '1279');
    > > >
    > > > break;
    > > >
    > > > case 'CHT' :
    > > > addBoxItem(prodBox1, ' ', '*');
    > > >
    > > > addBoxItem(prodBox1, 'Bisxxp, E', '2763');
    > > >
    > > > addBoxItem(prodBox1, 'Brxxey, D, '172');
    > > >
    > > > break;
    > > >
    > > > case 'CLT' :
    > > > addBoxItem(prodBox1, ' ', '*');
    > > >
    > > > addBoxItem(prodBox1, 'Garxxng, M', '471');
    > > >
    > > > addBoxItem(prodBox1, 'Waxxh, J', '1302');
    > > >
    > > > break;
    > > >
    > > > and so on.
    > > >
    > > > It is of course a very long source, but it works.
    > > > When user selects everything, the selection uniquely identifies a
    > > > group of students. When user clicks the button Submit, another asp
    > > > page is activated showing room(s) occupied by this group on each day
    > > > of the selected week. It also works.
    > > > My problem: when user clicks the button Back of the browser to return
    > > > to the selection asp page, the selection disappears. All list boxes
    > > > return to the full initial lists of faculties, lecturers, courses and
    > > > so on and the first item of each list is shown rather then that one
    > > > that was selected.
    > > > Why does asp page changes, when user navigates back to it? How can I
    > > > prevent this change? I want my users to see the same data, when they
    > > > return to the page.
    > > > The browser is IE 5.5 on Windows 9x and 6.0. on Windows 2000. (Being a
    > > > large college, we have PCs in different stages of Windows update.) The
    > > > problem looks the same on both browsers.
    > > > Any help will be greatly appreciated.
    > > > Thank you.
    > > > Galina
     
    Mohamed El Ashamwy, Jan 24, 2004
    #4
  5. Galina

    Galina Guest

    Mohamed
    Thank you for your help. I really appreciate it.
    It is very interesting idea - to submit form to itself. A question:
    with my 6 select boxes I'll submit the form to itself 5 times:
    <form action=thesamepage.asp method=post>
    Then, when something is selected in the very last box and user clicks
    the button Submit, I need to pass information to another form. I am
    sure it should be very simple, but I cannot find it, how to submit a
    form to itself and, after certain event, to a different form?

    4guysfromrolla site you recommend is very useful and very easy to
    read.

    Thank you once more.
    Best Regards.
    Galina

    "Mohamed El Ashamwy" <> wrote in message news:<#>...
    > Are you using ASP or ASP.net?
    > If you are using ASP, then there is no AutoPostback property. In this case,
    > you should make each of the listboxes submit values to an asp page (could be
    > the same page) which get the values from the database (the usual way you
    > did before).
    >
    > I see from your code that you are using "select" which is an HTML control,
    > so it's better that you use the previous strategy in all cases rather than
    > using the AutoPostBack Property.
    >
    > In general the old code that you used before to connect to the database
    > should suffice your need.
    > A good ASP site that contains some tutorials is:
    > http://www.4guysfromrolla.com
    >
    > Regards
    > Mohamed El Ashmawy
    > Microsoft GTSC Developer support for Middle East
    >
    > "Galina" <> wrote in message
    > news:...
    > > Mohamed
    > > Thank you very much for your answer.
    > >
    > > I have set AutoPostBackBack property to true, I hope, correctly:
    > > <select name="selFaculty" AUTOPOSTBACK = TRUE
    > >

    > onChange="populateLecturer_from_Faculty(this.options[this.selectedIndex].val
    > ue),
    > > populateCourse_from_Faculty(this.options[this.selectedIndex].value);">
    > >
    > > Would it be possible for you to point me in a direction of a code,
    > > which retrieves the data from the database, when selected item is auto
    > > posted? It is my very first asp page...
    > > Galina
    > >
    > > "Mohamed El Ashamwy" <> wrote in

    > message news:<#>...
    > > > Do you mean that when a user chooses faculty for example, the page is

    > posted
    > > > back to the server to get the values for lists of lectures and courses?
    > > > or Do you mean that all those values are taken from the database once

    > and
    > > > client side script handles the case when the user makes his choices?
    > > >
    > > >
    > > > If you use the option of getting the data from the database at start and
    > > > then a client side script would handle the choices of the user, the page

    > is
    > > > not posted back unless the submit button is clicked. In this case, when

    > the
    > > > user presses the back button, the web browser would return to the first

    > page
    > > > and the choices won't be saved. If this is actually your scenario and

    > you
    > > > want the back button to return to the choices the user made, then you

    > could
    > > > make the list boxes post back (set AutoPostBackBack property to true)

    > and
    > > > retrieve the data from the database in that event. This means that when

    > a
    > > > user makes a choice in one of the listboxes, the request will be posted

    > to
    > > > the server and the needed data is retrieved and returned to the client.
    > > > This way would make the loading of the page quicker in the first time,

    > but
    > > > would need make more roundtrips between the server and the user's

    > browser
    > > > when the user makes a selection from the list boxes.
    > > >
    > > > regards
    > > > Mohamed El Ashmawy
    > > > Microsoft GTSC Developer support for Middle East
    > > >
    > > > "Galina" <> wrote in message
    > > > news:...
    > > > > Hello
    > > > > I have 6 dependent list boxes on my ASP page:
    > > > >  Faculty;
    > > > >  Lecturer;
    > > > >  Course;
    > > > >  Course occurrence;
    > > > >  Group;
    > > > >  Week commencing date.
    > > > > When faculty is selected, lists of lecturers and courses are
    > > > > populated. When course is selected, lists of occurrences, groups and
    > > > > dates are populated.
    > > > > All data to populate list boxes come from a database on SQL server,
    > > > > from separate recordsets. List boxes are populated on the client side
    > > > > using functions generated in the source, when asp page is processed on
    > > > > the server side. An example:
    > > > > function populateLecturer_from_Faculty(Faculty) {
    > > > > prodBox1 = document.getSearch.selLecturer
    > > > > clearBox(prodBox1);
    > > > > switch (Faculty) {
    > > > >
    > > > > case 'ABT' :
    > > > > addBoxItem(prodBox1, ' ', '*');
    > > > >
    > > > > addBoxItem(prodBox1, 'Baxxr, V', '52');
    > > > >
    > > > > addBoxItem(prodBox1, 'Coxxly, M', '293');
    > > > >
    > > > > addBoxItem(prodBox1, 'Dxxn, T', '357');
    > > > >
    > > > > break;
    > > > >
    > > > > case 'BMP' :
    > > > > addBoxItem(prodBox1, ' ', '*'); addBoxItem(prodBox1, 'Buxxll, N',
    > > > > '4197');
    > > > >
    > > > > addBoxItem(prodBox1, 'Caxxde, J', '2779');
    > > > >
    > > > > addBoxItem(prodBox1, 'Vowxxs, C', '1279');
    > > > >
    > > > > break;
    > > > >
    > > > > case 'CHT' :
    > > > > addBoxItem(prodBox1, ' ', '*');
    > > > >
    > > > > addBoxItem(prodBox1, 'Bisxxp, E', '2763');
    > > > >
    > > > > addBoxItem(prodBox1, 'Brxxey, D, '172');
    > > > >
    > > > > break;
    > > > >
    > > > > case 'CLT' :
    > > > > addBoxItem(prodBox1, ' ', '*');
    > > > >
    > > > > addBoxItem(prodBox1, 'Garxxng, M', '471');
    > > > >
    > > > > addBoxItem(prodBox1, 'Waxxh, J', '1302');
    > > > >
    > > > > break;
    > > > >
    > > > > and so on.
    > > > >
    > > > > It is of course a very long source, but it works.
    > > > > When user selects everything, the selection uniquely identifies a
    > > > > group of students. When user clicks the button Submit, another asp
    > > > > page is activated showing room(s) occupied by this group on each day
    > > > > of the selected week. It also works.
    > > > > My problem: when user clicks the button Back of the browser to return
    > > > > to the selection asp page, the selection disappears. All list boxes
    > > > > return to the full initial lists of faculties, lecturers, courses and
    > > > > so on and the first item of each list is shown rather then that one
    > > > > that was selected.
    > > > > Why does asp page changes, when user navigates back to it? How can I
    > > > > prevent this change? I want my users to see the same data, when they
    > > > > return to the page.
    > > > > The browser is IE 5.5 on Windows 9x and 6.0. on Windows 2000. (Being a
    > > > > large college, we have PCs in different stages of Windows update.) The
    > > > > problem looks the same on both browsers.
    > > > > Any help will be greatly appreciated.
    > > > > Thank you.
    > > > > Galina
     
    Galina, Jan 27, 2004
    #5
  6. Anytime :)

    I have 3 different ways in mind to make what you want:
    1. You could make the submit button a normal button (use type="button"
    instead of type="submit") and make its onclick event calls a javascipt
    function.
    The javscript function should check the event and then set the action
    proprty of the form to the needed asp page whether it's the same page or
    another one(<FormID>.action = "<WebPagePath>"); after that the javascript
    function should call the submit method on the form (<FormID>.submit)

    2. You could make the last select box in a different form and have a
    separate submit button. This helps you make this new form have a different
    action and go to a different page. (This might not be appealing).

    3. Make all events post to the same page and put a server side script at the
    very top of the page to check for the events that should send to other
    pages. If you should send to another page, you could use response.redirect
    method (This solution is the least appealing because it posts back to the
    same page again then redirects to the other page in case of that event which
    is an overhead).

    The best solution is the first one but it needs that you write some
    javascript code (Very little though. About 5 or 6 lines of code only)

    Regards
    Mohamed El Ashmawy
    Microsoft GTSC Developer support for Middle East



    "Galina" <> wrote in message
    news:...
    > Mohamed
    > Thank you for your help. I really appreciate it.
    > It is very interesting idea - to submit form to itself. A question:
    > with my 6 select boxes I'll submit the form to itself 5 times:
    > <form action=thesamepage.asp method=post>
    > Then, when something is selected in the very last box and user clicks
    > the button Submit, I need to pass information to another form. I am
    > sure it should be very simple, but I cannot find it, how to submit a
    > form to itself and, after certain event, to a different form?
    >
    > 4guysfromrolla site you recommend is very useful and very easy to
    > read.
    >
    > Thank you once more.
    > Best Regards.
    > Galina
    >
    > "Mohamed El Ashamwy" <> wrote in

    message news:<#>...
    > > Are you using ASP or ASP.net?
    > > If you are using ASP, then there is no AutoPostback property. In this

    case,
    > > you should make each of the listboxes submit values to an asp page

    (could be
    > > the same page) which get the values from the database (the usual way

    you
    > > did before).
    > >
    > > I see from your code that you are using "select" which is an HTML

    control,
    > > so it's better that you use the previous strategy in all cases rather

    than
    > > using the AutoPostBack Property.
    > >
    > > In general the old code that you used before to connect to the database
    > > should suffice your need.
    > > A good ASP site that contains some tutorials is:
    > > http://www.4guysfromrolla.com
    > >
    > > Regards
    > > Mohamed El Ashmawy
    > > Microsoft GTSC Developer support for Middle East
    > >
    > > "Galina" <> wrote in message
    > > news:...
    > > > Mohamed
    > > > Thank you very much for your answer.
    > > >
    > > > I have set AutoPostBackBack property to true, I hope, correctly:
    > > > <select name="selFaculty" AUTOPOSTBACK = TRUE
    > > >

    > >

    onChange="populateLecturer_from_Faculty(this.options[this.selectedIndex].val
    > > ue),
    > > > populateCourse_from_Faculty(this.options[this.selectedIndex].value);">
    > > >
    > > > Would it be possible for you to point me in a direction of a code,
    > > > which retrieves the data from the database, when selected item is auto
    > > > posted? It is my very first asp page...
    > > > Galina
    > > >
    > > > "Mohamed El Ashamwy" <> wrote in

    > > message news:<#>...
    > > > > Do you mean that when a user chooses faculty for example, the page

    is
    > > posted
    > > > > back to the server to get the values for lists of lectures and

    courses?
    > > > > or Do you mean that all those values are taken from the database

    once
    > > and
    > > > > client side script handles the case when the user makes his choices?
    > > > >
    > > > >
    > > > > If you use the option of getting the data from the database at start

    and
    > > > > then a client side script would handle the choices of the user, the

    page
    > > is
    > > > > not posted back unless the submit button is clicked. In this case,

    when
    > > the
    > > > > user presses the back button, the web browser would return to the

    first
    > > page
    > > > > and the choices won't be saved. If this is actually your scenario

    and
    > > you
    > > > > want the back button to return to the choices the user made, then

    you
    > > could
    > > > > make the list boxes post back (set AutoPostBackBack property to

    true)
    > > and
    > > > > retrieve the data from the database in that event. This means that

    when
    > > a
    > > > > user makes a choice in one of the listboxes, the request will be

    posted
    > > to
    > > > > the server and the needed data is retrieved and returned to the

    client.
    > > > > This way would make the loading of the page quicker in the first

    time,
    > > but
    > > > > would need make more roundtrips between the server and the user's

    > > browser
    > > > > when the user makes a selection from the list boxes.
    > > > >
    > > > > regards
    > > > > Mohamed El Ashmawy
    > > > > Microsoft GTSC Developer support for Middle East
    > > > >
    > > > > "Galina" <> wrote in message
    > > > > news:...
    > > > > > Hello
    > > > > > I have 6 dependent list boxes on my ASP page:
    > > > > >  Faculty;
    > > > > >  Lecturer;
    > > > > >  Course;
    > > > > >  Course occurrence;
    > > > > >  Group;
    > > > > >  Week commencing date.
    > > > > > When faculty is selected, lists of lecturers and courses are
    > > > > > populated. When course is selected, lists of occurrences, groups

    and
    > > > > > dates are populated.
    > > > > > All data to populate list boxes come from a database on SQL

    server,
    > > > > > from separate recordsets. List boxes are populated on the client

    side
    > > > > > using functions generated in the source, when asp page is

    processed on
    > > > > > the server side. An example:
    > > > > > function populateLecturer_from_Faculty(Faculty) {
    > > > > > prodBox1 = document.getSearch.selLecturer
    > > > > > clearBox(prodBox1);
    > > > > > switch (Faculty) {
    > > > > >
    > > > > > case 'ABT' :
    > > > > > addBoxItem(prodBox1, ' ', '*');
    > > > > >
    > > > > > addBoxItem(prodBox1, 'Baxxr, V', '52');
    > > > > >
    > > > > > addBoxItem(prodBox1, 'Coxxly, M', '293');
    > > > > >
    > > > > > addBoxItem(prodBox1, 'Dxxn, T', '357');
    > > > > >
    > > > > > break;
    > > > > >
    > > > > > case 'BMP' :
    > > > > > addBoxItem(prodBox1, ' ', '*'); addBoxItem(prodBox1, 'Buxxll, N',
    > > > > > '4197');
    > > > > >
    > > > > > addBoxItem(prodBox1, 'Caxxde, J', '2779');
    > > > > >
    > > > > > addBoxItem(prodBox1, 'Vowxxs, C', '1279');
    > > > > >
    > > > > > break;
    > > > > >
    > > > > > case 'CHT' :
    > > > > > addBoxItem(prodBox1, ' ', '*');
    > > > > >
    > > > > > addBoxItem(prodBox1, 'Bisxxp, E', '2763');
    > > > > >
    > > > > > addBoxItem(prodBox1, 'Brxxey, D, '172');
    > > > > >
    > > > > > break;
    > > > > >
    > > > > > case 'CLT' :
    > > > > > addBoxItem(prodBox1, ' ', '*');
    > > > > >
    > > > > > addBoxItem(prodBox1, 'Garxxng, M', '471');
    > > > > >
    > > > > > addBoxItem(prodBox1, 'Waxxh, J', '1302');
    > > > > >
    > > > > > break;
    > > > > >
    > > > > > and so on.
    > > > > >
    > > > > > It is of course a very long source, but it works.
    > > > > > When user selects everything, the selection uniquely identifies a
    > > > > > group of students. When user clicks the button Submit, another asp
    > > > > > page is activated showing room(s) occupied by this group on each

    day
    > > > > > of the selected week. It also works.
    > > > > > My problem: when user clicks the button Back of the browser to

    return
    > > > > > to the selection asp page, the selection disappears. All list

    boxes
    > > > > > return to the full initial lists of faculties, lecturers, courses

    and
    > > > > > so on and the first item of each list is shown rather then that

    one
    > > > > > that was selected.
    > > > > > Why does asp page changes, when user navigates back to it? How can

    I
    > > > > > prevent this change? I want my users to see the same data, when

    they
    > > > > > return to the page.
    > > > > > The browser is IE 5.5 on Windows 9x and 6.0. on Windows 2000.

    (Being a
    > > > > > large college, we have PCs in different stages of Windows update.)

    The
    > > > > > problem looks the same on both browsers.
    > > > > > Any help will be greatly appreciated.
    > > > > > Thank you.
    > > > > > Galina
     
    Mohamed El Ashamwy, Jan 28, 2004
    #6
  7. Galina

    Galina Guest

    Great! Thank you very much! Luckily, I have already had a small java
    script function - to check, what users enter. I have added commands
    you recommend and yes, I get another form on the screen! Of course,
    there is still plenty of work changing recordsets and code, if I
    submit form every time user selects something, but I expect my asp
    page to be simpler and faster with this method.

    Interesting, that me and a collegue of mine have tried the 1st method
    to re-direct to another form, but we used "Submit" type button, and it
    didn't work. If you have a minute and it is easy to explain, why
    "button" type button re-directs and "Submit" type button using the
    same function doesn't?
    Thank you once more. It is very kind of you to help such novices as
    myself.

    "Mohamed El Ashamwy" <> wrote in message news:<OdQD$>...
    > Anytime :)
    >
    > I have 3 different ways in mind to make what you want:
    > 1. You could make the submit button a normal button (use type="button"
    > instead of type="submit") and make its onclick event calls a javascipt
    > function.
    > The javscript function should check the event and then set the action
    > proprty of the form to the needed asp page whether it's the same page or
    > another one(<FormID>.action = "<WebPagePath>"); after that the javascript
    > function should call the submit method on the form (<FormID>.submit)
    >
    > 2. You could make the last select box in a different form and have a
    > separate submit button. This helps you make this new form have a different
    > action and go to a different page. (This might not be appealing).
    >
    > 3. Make all events post to the same page and put a server side script at the
    > very top of the page to check for the events that should send to other
    > pages. If you should send to another page, you could use response.redirect
    > method (This solution is the least appealing because it posts back to the
    > same page again then redirects to the other page in case of that event which
    > is an overhead).
    >
    > The best solution is the first one but it needs that you write some
    > javascript code (Very little though. About 5 or 6 lines of code only)
    >
    > Regards
    > Mohamed El Ashmawy
    > Microsoft GTSC Developer support for Middle East
    >
    >
    >
    > "Galina" <> wrote in message
    > news:...
    > > Mohamed
    > > Thank you for your help. I really appreciate it.
    > > It is very interesting idea - to submit form to itself. A question:
    > > with my 6 select boxes I'll submit the form to itself 5 times:
    > > <form action=thesamepage.asp method=post>
    > > Then, when something is selected in the very last box and user clicks
    > > the button Submit, I need to pass information to another form. I am
    > > sure it should be very simple, but I cannot find it, how to submit a
    > > form to itself and, after certain event, to a different form?
    > >
    > > 4guysfromrolla site you recommend is very useful and very easy to
    > > read.
    > >
    > > Thank you once more.
    > > Best Regards.
    > > Galina
    > >
    > > "Mohamed El Ashamwy" <> wrote in

    > message news:<#>...
    > > > Are you using ASP or ASP.net?
    > > > If you are using ASP, then there is no AutoPostback property. In this

    > case,
    > > > you should make each of the listboxes submit values to an asp page

    > (could be
    > > > the same page) which get the values from the database (the usual way

    > you
    > > > did before).
    > > >
    > > > I see from your code that you are using "select" which is an HTML

    > control,
    > > > so it's better that you use the previous strategy in all cases rather

    > than
    > > > using the AutoPostBack Property.
    > > >
    > > > In general the old code that you used before to connect to the database
    > > > should suffice your need.
    > > > A good ASP site that contains some tutorials is:
    > > > http://www.4guysfromrolla.com
    > > >
    > > > Regards
    > > > Mohamed El Ashmawy
    > > > Microsoft GTSC Developer support for Middle East
    > > >
    > > > "Galina" <> wrote in message
    > > > news:...
    > > > > Mohamed
    > > > > Thank you very much for your answer.
    > > > >
    > > > > I have set AutoPostBackBack property to true, I hope, correctly:
    > > > > <select name="selFaculty" AUTOPOSTBACK = TRUE
    > > > >
    > > >

    > onChange="populateLecturer_from_Faculty(this.options[this.selectedIndex].val
    > > > ue),
    > > > > populateCourse_from_Faculty(this.options[this.selectedIndex].value);">
    > > > >
    > > > > Would it be possible for you to point me in a direction of a code,
    > > > > which retrieves the data from the database, when selected item is auto
    > > > > posted? It is my very first asp page...
    > > > > Galina
    > > > >
    > > > > "Mohamed El Ashamwy" <> wrote in

    > message news:<#>...
    > > > > > Do you mean that when a user chooses faculty for example, the page

    > is
    > posted
    > > > > > back to the server to get the values for lists of lectures and

    > courses?
    > > > > > or Do you mean that all those values are taken from the database

    > once
    > and
    > > > > > client side script handles the case when the user makes his choices?
    > > > > >
    > > > > >
    > > > > > If you use the option of getting the data from the database at start

    > and
    > > > > > then a client side script would handle the choices of the user, the

    > page
    > is
    > > > > > not posted back unless the submit button is clicked. In this case,

    > when
    > the
    > > > > > user presses the back button, the web browser would return to the

    > first
    > page
    > > > > > and the choices won't be saved. If this is actually your scenario

    > and
    > you
    > > > > > want the back button to return to the choices the user made, then

    > you
    > could
    > > > > > make the list boxes post back (set AutoPostBackBack property to

    > true)
    > and
    > > > > > retrieve the data from the database in that event. This means that

    > when
    > a
    > > > > > user makes a choice in one of the listboxes, the request will be

    > posted
    > to
    > > > > > the server and the needed data is retrieved and returned to the

    > client.
    > > > > > This way would make the loading of the page quicker in the first

    > time,
    > but
    > > > > > would need make more roundtrips between the server and the user's

    > browser
    > > > > > when the user makes a selection from the list boxes.
    > > > > >
    > > > > > regards
    > > > > > Mohamed El Ashmawy
    > > > > > Microsoft GTSC Developer support for Middle East
    > > > > >
    > > > > > "Galina" <> wrote in message
    > > > > > news:...
    > > > > > > Hello
    > > > > > > I have 6 dependent list boxes on my ASP page:
    > > > > > >  Faculty;
    > > > > > >  Lecturer;
    > > > > > >  Course;
    > > > > > >  Course occurrence;
    > > > > > >  Group;
    > > > > > >  Week commencing date.
    > > > > > > When faculty is selected, lists of lecturers and courses are
    > > > > > > populated. When course is selected, lists of occurrences, groups

    > and
    > > > > > > dates are populated.
    > > > > > > All data to populate list boxes come from a database on SQL

    > server,
    > > > > > > from separate recordsets. List boxes are populated on the client

    > side
    > > > > > > using functions generated in the source, when asp page is

    > processed on
    > > > > > > the server side. An example:
    > > > > > > function populateLecturer_from_Faculty(Faculty) {
    > > > > > > prodBox1 = document.getSearch.selLecturer
    > > > > > > clearBox(prodBox1);
    > > > > > > switch (Faculty) {
    > > > > > >
    > > > > > > case 'ABT' :
    > > > > > > addBoxItem(prodBox1, ' ', '*');
    > > > > > >
    > > > > > > addBoxItem(prodBox1, 'Baxxr, V', '52');
    > > > > > >
    > > > > > > addBoxItem(prodBox1, 'Coxxly, M', '293');
    > > > > > >
    > > > > > > addBoxItem(prodBox1, 'Dxxn, T', '357');
    > > > > > >
    > > > > > > break;
    > > > > > >
    > > > > > > case 'BMP' :
    > > > > > > addBoxItem(prodBox1, ' ', '*'); addBoxItem(prodBox1, 'Buxxll, N',
    > > > > > > '4197');
    > > > > > >
    > > > > > > addBoxItem(prodBox1, 'Caxxde, J', '2779');
    > > > > > >
    > > > > > > addBoxItem(prodBox1, 'Vowxxs, C', '1279');
    > > > > > >
    > > > > > > break;
    > > > > > >
    > > > > > > case 'CHT' :
    > > > > > > addBoxItem(prodBox1, ' ', '*');
    > > > > > >
    > > > > > > addBoxItem(prodBox1, 'Bisxxp, E', '2763');
    > > > > > >
    > > > > > > addBoxItem(prodBox1, 'Brxxey, D, '172');
    > > > > > >
    > > > > > > break;
    > > > > > >
    > > > > > > case 'CLT' :
    > > > > > > addBoxItem(prodBox1, ' ', '*');
    > > > > > >
    > > > > > > addBoxItem(prodBox1, 'Garxxng, M', '471');
    > > > > > >
    > > > > > > addBoxItem(prodBox1, 'Waxxh, J', '1302');
    > > > > > >
    > > > > > > break;
    > > > > > >
    > > > > > > and so on.
    > > > > > >
    > > > > > > It is of course a very long source, but it works.
    > > > > > > When user selects everything, the selection uniquely identifies a
    > > > > > > group of students. When user clicks the button Submit, another asp
    > > > > > > page is activated showing room(s) occupied by this group on each

    > day
    > > > > > > of the selected week. It also works.
    > > > > > > My problem: when user clicks the button Back of the browser to

    > return
    > > > > > > to the selection asp page, the selection disappears. All list

    > boxes
    > > > > > > return to the full initial lists of faculties, lecturers, courses

    > and
    > > > > > > so on and the first item of each list is shown rather then that

    > one
    > > > > > > that was selected.
    > > > > > > Why does asp page changes, when user navigates back to it? How can

    > I
    > > > > > > prevent this change? I want my users to see the same data, when

    > they
    > > > > > > return to the page.
    > > > > > > The browser is IE 5.5 on Windows 9x and 6.0. on Windows 2000.

    > (Being a
    > > > > > > large college, we have PCs in different stages of Windows update.)

    > The
    > > > > > > problem looks the same on both browsers.
    > > > > > > Any help will be greatly appreciated.
    > > > > > > Thank you.
    > > > > > > Galina
     
    Galina, Feb 2, 2004
    #7
  8. The submit button actually submits the form (in contrast "button" that
    doesn't do so).
    Thus if you use the submit button, the form is submitted even before your
    javascript is processed and the action poperty that you change in your
    javascript code doesn't get processed before the form is submitted.
    Howerver, when you use a normal "button", no submit occurs until you call
    the submit method(<FormID>.submit) so you can control the order and have the
    action property set before calling the submit method.

    Best Regards and best of luck for you and your collegue
    Mohamed El Ashmawy
    Microsoft GTSC Developer support for Middle East




    "Galina" <> wrote in message
    news:...
    > Great! Thank you very much! Luckily, I have already had a small java
    > script function - to check, what users enter. I have added commands
    > you recommend and yes, I get another form on the screen! Of course,
    > there is still plenty of work changing recordsets and code, if I
    > submit form every time user selects something, but I expect my asp
    > page to be simpler and faster with this method.
    >
    > Interesting, that me and a collegue of mine have tried the 1st method
    > to re-direct to another form, but we used "Submit" type button, and it
    > didn't work. If you have a minute and it is easy to explain, why
    > "button" type button re-directs and "Submit" type button using the
    > same function doesn't?
    > Thank you once more. It is very kind of you to help such novices as
    > myself.
    >
    > "Mohamed El Ashamwy" <> wrote in

    message news:<OdQD$>...
    > > Anytime :)
    > >
    > > I have 3 different ways in mind to make what you want:
    > > 1. You could make the submit button a normal button (use type="button"
    > > instead of type="submit") and make its onclick event calls a javascipt
    > > function.
    > > The javscript function should check the event and then set the action
    > > proprty of the form to the needed asp page whether it's the same page or
    > > another one(<FormID>.action = "<WebPagePath>"); after that the

    javascript
    > > function should call the submit method on the form (<FormID>.submit)
    > >
    > > 2. You could make the last select box in a different form and have a
    > > separate submit button. This helps you make this new form have a

    different
    > > action and go to a different page. (This might not be appealing).
    > >
    > > 3. Make all events post to the same page and put a server side script at

    the
    > > very top of the page to check for the events that should send to other
    > > pages. If you should send to another page, you could use

    response.redirect
    > > method (This solution is the least appealing because it posts back to

    the
    > > same page again then redirects to the other page in case of that event

    which
    > > is an overhead).
    > >
    > > The best solution is the first one but it needs that you write some
    > > javascript code (Very little though. About 5 or 6 lines of code only)
    > >
    > > Regards
    > > Mohamed El Ashmawy
    > > Microsoft GTSC Developer support for Middle East
    > >
    > >
    > >
    > > "Galina" <> wrote in message
    > > news:...
    > > > Mohamed
    > > > Thank you for your help. I really appreciate it.
    > > > It is very interesting idea - to submit form to itself. A question:
    > > > with my 6 select boxes I'll submit the form to itself 5 times:
    > > > <form action=thesamepage.asp method=post>
    > > > Then, when something is selected in the very last box and user clicks
    > > > the button Submit, I need to pass information to another form. I am
    > > > sure it should be very simple, but I cannot find it, how to submit a
    > > > form to itself and, after certain event, to a different form?
    > > >
    > > > 4guysfromrolla site you recommend is very useful and very easy to
    > > > read.
    > > >
    > > > Thank you once more.
    > > > Best Regards.
    > > > Galina
    > > >
    > > > "Mohamed El Ashamwy" <> wrote in

    > > message news:<#>...
    > > > > Are you using ASP or ASP.net?
    > > > > If you are using ASP, then there is no AutoPostback property. In

    this
    > > case,
    > > > > you should make each of the listboxes submit values to an asp page

    > > (could be
    > > > > the same page) which get the values from the database (the usual

    way
    > > you
    > > > > did before).
    > > > >
    > > > > I see from your code that you are using "select" which is an HTML

    > > control,
    > > > > so it's better that you use the previous strategy in all cases

    rather
    > > than
    > > > > using the AutoPostBack Property.
    > > > >
    > > > > In general the old code that you used before to connect to the

    database
    > > > > should suffice your need.
    > > > > A good ASP site that contains some tutorials is:
    > > > > http://www.4guysfromrolla.com
    > > > >
    > > > > Regards
    > > > > Mohamed El Ashmawy
    > > > > Microsoft GTSC Developer support for Middle East
    > > > >
    > > > > "Galina" <> wrote in message
    > > > > news:...
    > > > > > Mohamed
    > > > > > Thank you very much for your answer.
    > > > > >
    > > > > > I have set AutoPostBackBack property to true, I hope, correctly:
    > > > > > <select name="selFaculty" AUTOPOSTBACK = TRUE
    > > > > >
    > > > >

    > >

    onChange="populateLecturer_from_Faculty(this.options[this.selectedIndex].val
    > > > > ue),
    > > > > >

    populateCourse_from_Faculty(this.options[this.selectedIndex].value);">
    > > > > >
    > > > > > Would it be possible for you to point me in a direction of a code,
    > > > > > which retrieves the data from the database, when selected item is

    auto
    > > > > > posted? It is my very first asp page...
    > > > > > Galina
    > > > > >
    > > > > > "Mohamed El Ashamwy" <> wrote

    in
    > > message news:<#>...
    > > > > > > Do you mean that when a user chooses faculty for example, the

    page
    > > is
    > > posted
    > > > > > > back to the server to get the values for lists of lectures and

    > > courses?
    > > > > > > or Do you mean that all those values are taken from the database

    > > once
    > > and
    > > > > > > client side script handles the case when the user makes his

    choices?
    > > > > > >
    > > > > > >
    > > > > > > If you use the option of getting the data from the database at

    start
    > > and
    > > > > > > then a client side script would handle the choices of the user,

    the
    > > page
    > > is
    > > > > > > not posted back unless the submit button is clicked. In this

    case,
    > > when
    > > the
    > > > > > > user presses the back button, the web browser would return to

    the
    > > first
    > > page
    > > > > > > and the choices won't be saved. If this is actually your

    scenario
    > > and
    > > you
    > > > > > > want the back button to return to the choices the user made,

    then
    > > you
    > > could
    > > > > > > make the list boxes post back (set AutoPostBackBack property to

    > > true)
    > > and
    > > > > > > retrieve the data from the database in that event. This means

    that
    > > when
    > > a
    > > > > > > user makes a choice in one of the listboxes, the request will be

    > > posted
    > > to
    > > > > > > the server and the needed data is retrieved and returned to the

    > > client.
    > > > > > > This way would make the loading of the page quicker in the first

    > > time,
    > > but
    > > > > > > would need make more roundtrips between the server and the

    user's
    > > browser
    > > > > > > when the user makes a selection from the list boxes.
    > > > > > >
    > > > > > > regards
    > > > > > > Mohamed El Ashmawy
    > > > > > > Microsoft GTSC Developer support for Middle East
    > > > > > >
    > > > > > > "Galina" <> wrote in message
    > > > > > > news:...
    > > > > > > > Hello
    > > > > > > > I have 6 dependent list boxes on my ASP page:
    > > > > > > >  Faculty;
    > > > > > > >  Lecturer;
    > > > > > > >  Course;
    > > > > > > >  Course occurrence;
    > > > > > > >  Group;
    > > > > > > >  Week commencing date.
    > > > > > > > When faculty is selected, lists of lecturers and courses are
    > > > > > > > populated. When course is selected, lists of occurrences,

    groups
    > > and
    > > > > > > > dates are populated.
    > > > > > > > All data to populate list boxes come from a database on SQL

    > > server,
    > > > > > > > from separate recordsets. List boxes are populated on the

    client
    > > side
    > > > > > > > using functions generated in the source, when asp page is

    > > processed on
    > > > > > > > the server side. An example:
    > > > > > > > function populateLecturer_from_Faculty(Faculty) {
    > > > > > > > prodBox1 = document.getSearch.selLecturer
    > > > > > > > clearBox(prodBox1);
    > > > > > > > switch (Faculty) {
    > > > > > > >
    > > > > > > > case 'ABT' :
    > > > > > > > addBoxItem(prodBox1, ' ', '*');
    > > > > > > >
    > > > > > > > addBoxItem(prodBox1, 'Baxxr, V', '52');
    > > > > > > >
    > > > > > > > addBoxItem(prodBox1, 'Coxxly, M', '293');
    > > > > > > >
    > > > > > > > addBoxItem(prodBox1, 'Dxxn, T', '357');
    > > > > > > >
    > > > > > > > break;
    > > > > > > >
    > > > > > > > case 'BMP' :
    > > > > > > > addBoxItem(prodBox1, ' ', '*'); addBoxItem(prodBox1, 'Buxxll,

    N',
    > > > > > > > '4197');
    > > > > > > >
    > > > > > > > addBoxItem(prodBox1, 'Caxxde, J', '2779');
    > > > > > > >
    > > > > > > > addBoxItem(prodBox1, 'Vowxxs, C', '1279');
    > > > > > > >
    > > > > > > > break;
    > > > > > > >
    > > > > > > > case 'CHT' :
    > > > > > > > addBoxItem(prodBox1, ' ', '*');
    > > > > > > >
    > > > > > > > addBoxItem(prodBox1, 'Bisxxp, E', '2763');
    > > > > > > >
    > > > > > > > addBoxItem(prodBox1, 'Brxxey, D, '172');
    > > > > > > >
    > > > > > > > break;
    > > > > > > >
    > > > > > > > case 'CLT' :
    > > > > > > > addBoxItem(prodBox1, ' ', '*');
    > > > > > > >
    > > > > > > > addBoxItem(prodBox1, 'Garxxng, M', '471');
    > > > > > > >
    > > > > > > > addBoxItem(prodBox1, 'Waxxh, J', '1302');
    > > > > > > >
    > > > > > > > break;
    > > > > > > >
    > > > > > > > and so on.
    > > > > > > >
    > > > > > > > It is of course a very long source, but it works.
    > > > > > > > When user selects everything, the selection uniquely

    identifies a
    > > > > > > > group of students. When user clicks the button Submit, another

    asp
    > > > > > > > page is activated showing room(s) occupied by this group on

    each
    > > day
    > > > > > > > of the selected week. It also works.
    > > > > > > > My problem: when user clicks the button Back of the browser to

    > > return
    > > > > > > > to the selection asp page, the selection disappears. All list

    > > boxes
    > > > > > > > return to the full initial lists of faculties, lecturers,

    courses
    > > and
    > > > > > > > so on and the first item of each list is shown rather then

    that
    > > one
    > > > > > > > that was selected.
    > > > > > > > Why does asp page changes, when user navigates back to it? How

    can
    > > I
    > > > > > > > prevent this change? I want my users to see the same data,

    when
    > > they
    > > > > > > > return to the page.
    > > > > > > > The browser is IE 5.5 on Windows 9x and 6.0. on Windows 2000.

    > > (Being a
    > > > > > > > large college, we have PCs in different stages of Windows

    update.)
    > > The
    > > > > > > > problem looks the same on both browsers.
    > > > > > > > Any help will be greatly appreciated.
    > > > > > > > Thank you.
    > > > > > > > Galina
     
    Mohamed El Ashamwy, Feb 3, 2004
    #8
  9. Galina

    Galina Guest

    Mohamed
    Thank you. It is real pleasure to talk to you!
    Galina
    "Mohamed El Ashamwy" <> wrote in message news:<>...
    > The submit button actually submits the form (in contrast "button" that
    > doesn't do so).
    > Thus if you use the submit button, the form is submitted even before your
    > javascript is processed and the action poperty that you change in your
    > javascript code doesn't get processed before the form is submitted.
    > Howerver, when you use a normal "button", no submit occurs until you call
    > the submit method(<FormID>.submit) so you can control the order and have the
    > action property set before calling the submit method.
    >
    > Best Regards and best of luck for you and your collegue
    > Mohamed El Ashmawy
    > Microsoft GTSC Developer support for Middle East
    >
    >
    >
    >
     
    Galina, Feb 3, 2004
    #9
    1. Advertising

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. Stefan Mueller
    Replies:
    5
    Views:
    12,400
    jamesxa
    Jun 16, 2009
  2. K B
    Replies:
    0
    Views:
    539
  3. puzzlecracker
    Replies:
    1
    Views:
    521
    James Kanze
    Aug 7, 2008
  4. curiousity

    HOWTO autopost the selection list upon selection

    curiousity, Nov 21, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    271
    curiousity
    Nov 21, 2003
  5. Matt Kruse
    Replies:
    1
    Views:
    199
    Calan
    Apr 6, 2004
Loading...

Share This Page