Changes ???

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

    Changes ???

    Is there anyway to tell if some of the content of a form has changed in
    anyway?

    For example, I have a form with some <input> elements, to include
    <input type="text"... >, and <select ...>. Let's call this the "parent"
    form.

    On that "parent" form there is a link for a pop-up. The pop-up has
    another form for data input. This "child" form has functionality that
    save and then attempts to refresh the "parent" form just before it
    closes.

    The problem is some users do data input into the "parent" form inputs
    and then press the link opening up the "child". Well you can guess it,
    the data inputs are lost because the parent form gets refreshed.

    So, If I know if any of the content of the parent form has changed,
    then instead of executing a refresh I can save first.

    Any ideas? What I'd hate to so is carte-blanc save the form inputs
    every time.

    Mike

  • Zoe Brown

    #2
    Re: Changes ???


    "mike" <hillmw@charter .net> wrote in message
    news:1126709410 .818239.10290@f 14g2000cwb.goog legroups.com...[color=blue]
    > Is there anyway to tell if some of the content of a form has changed in
    > anyway?
    >
    > For example, I have a form with some <input> elements, to include
    > <input type="text"... >, and <select ...>. Let's call this the "parent"
    > form.
    >
    > On that "parent" form there is a link for a pop-up. The pop-up has
    > another form for data input. This "child" form has functionality that
    > save and then attempts to refresh the "parent" form just before it
    > closes.[/color]

    here is your problem, why do you refresh the parent when the child chages ?

    you could save the form before the page is refreshed or loaded but this is a
    waste of resources.

    instead of refreshing the parent just use dhtml to edit...


    Comment

    • Zoe Brown

      #3
      Re: Changes ???


      "mike" <hillmw@charter .net> wrote in message
      news:1126709410 .818239.10290@f 14g2000cwb.goog legroups.com...[color=blue]
      > Is there anyway to tell if some of the content of a form has changed in
      > anyway?
      >
      > For example, I have a form with some <input> elements, to include
      > <input type="text"... >, and <select ...>. Let's call this the "parent"
      > form.
      >
      > On that "parent" form there is a link for a pop-up. The pop-up has
      > another form for data input. This "child" form has functionality that
      > save and then attempts to refresh the "parent" form just before it
      > closes.
      >
      > The problem is some users do data input into the "parent" form inputs
      > and then press the link opening up the "child". Well you can guess it,
      > the data inputs are lost because the parent form gets refreshed.
      >
      > So, If I know if any of the content of the parent form has changed,
      > then instead of executing a refresh I can save first.[/color]

      if you need to do this create a boolian on the page and set this when the
      user chages the form using theonChange()


      Comment

      • Matt Kruse

        #4
        Re: Changes ???

        mike wrote:[color=blue]
        > Is there anyway to tell if some of the content of a form has changed
        > in anyway?[/color]

        There is nothing built-in, but you can use my isFormModified( ) function
        found here:


        That should give you an easy interface to determine if any form elements are
        different from their default values.

        --
        Matt Kruse




        Comment

        • mike

          #5
          Re: Changes ???

          Because the parent form has some information the user can update on the
          child form.

          For instance, there are 15 elements total, 5 of those are updated
          really often so they are on the parent form, the other 10 are not. But
          when the child form opens (all 15 elements are there) and updates one
          of the 5 that are also on the parent, the parent data has to be changed
          or the user is confounded and thinks his data was not updated because
          he just changed it on the child form.

          Comment

          • mike

            #6
            Re: Changes ???

            Matt,

            Cool, let me try that.

            Mike

            Comment

            • Zoe Brown

              #7
              Re: Changes ???


              "mike" <hillmw@charter .net> wrote in message
              news:1126711368 .016099.85180@g 14g2000cwa.goog legroups.com...[color=blue]
              > Because the parent form has some information the user can update on the
              > child form.
              >
              > For instance, there are 15 elements total, 5 of those are updated
              > really often so they are on the parent form, the other 10 are not. But
              > when the child form opens (all 15 elements are there) and updates one
              > of the 5 that are also on the parent, the parent data has to be changed
              > or the user is confounded and thinks his data was not updated because
              > he just changed it on the child form.[/color]

              you should be using DHTML on the parents page and not saving and then
              refreshing the page, it is not very ecconomical.

              [color=blue]
              >[/color]


              Comment

              • mike

                #8
                Re: Changes ???

                Talk to me about that .... what are you recommending?

                Comment

                • Zoe Brown

                  #9
                  Re: Changes ???


                  "mike" <hillmw@charter .net> wrote in message
                  news:1126723169 .482797.134130@ g47g2000cwa.goo glegroups.com.. .[color=blue]
                  > Talk to me about that .... what are you recommending?[/color]

                  Well you create a function in the parent window called something like
                  applyChanges()

                  When the child window is saved make a call to applyChanges() and use
                  JavaScript to update the form elements. You can pass in the values to
                  applyChages() or get applychanged on the parent winow to read the child
                  window.

                  See ?


                  Comment

                  • mike

                    #10
                    Re: Changes ???

                    Yep, I see that...

                    Comment

                    Working...