onchange

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rturner99

    onchange

    Hi all,
    Im fairly new to all this and was after a little bit of help. I
    apologise now as my Javascript is extremely limited. I currently have
    an ASP page which has a drop down menu which is dynamically populated
    from an MS SQL database. It has 4 options which can be chosen. These
    are, Complete, On schedule, Behind schedule and Archive. One of these
    will get written back to the database in a field called Status
    depending on what has been chosen. What I am after is if someone
    selects Archive I want it to write back a 1 to a hidden field which is
    called Archive which when the form submits it will also write back a 1
    to a field called Archive in the same table if you see what I mean!
    After having a look around on the net I assume an "onchange" event
    would be able to do this but being a bit dense when it comes to
    Javascript I don't know really where to start.
    Any help would be greatly appreciated and a little explanation on the
    code would be useful to help me understand.
    Thanks in advance
    Richard
  • Randy Webb

    #2
    Re: onchange

    rturner99 wrote:[color=blue]
    > Hi all,
    > Im fairly new to all this and was after a little bit of help. I
    > apologise now as my Javascript is extremely limited. I currently have
    > an ASP page which has a drop down menu which is dynamically populated
    > from an MS SQL database. It has 4 options which can be chosen. These
    > are, Complete, On schedule, Behind schedule and Archive. One of these
    > will get written back to the database in a field called Status
    > depending on what has been chosen. What I am after is if someone
    > selects Archive I want it to write back a 1 to a hidden field which is
    > called Archive which when the form submits it will also write back a 1
    > to a field called Archive in the same table if you see what I mean!
    > After having a look around on the net I assume an "onchange" event
    > would be able to do this but being a bit dense when it comes to
    > Javascript I don't know really where to start.
    > Any help would be greatly appreciated and a little explanation on the
    > code would be useful to help me understand.[/color]

    Use ASP to do it.

    Check the value of the Select list. If its Archive, then change two
    fields in the Database. No JS needed at all.


    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javas cript FAQ - http://jibbering.com/faq/

    Comment

    Working...