Announcement

Collapse
No announcement yet.

Form - Select Field - Ajax events problem

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Form - Select Field - Ajax events problem

    Hello,

    I have a form, there are 2 select fields on it, lookup method automatic on both fields.

    field1 - Use title = yes
    field1 - Title internal value = 0
    field1 - Title: "None selected!"

    I make an Ajax event OnChange on field2. The onChange Ajax code is on field2 is:

    if ({field1} != 0) {
    {field1} = 0;
    }

    I would like, if the user select anything from field2, and field1 is not empty, than set the value of {field1} to 0.

    It is not working. If the lookup method of field1 is Manual, than the Ajax event of field2's onChange can manipulate field1.

    Anyone can help?

    BR,
    Tibor

  • #2
    Hi Tibor,

    have a look, this may help
    http://www.scriptcase.net/forum/show...unction-of-sc)




    regards
    Mike

    Comment


    • #3
      Hi Mike,

      Thanks for your replay, but it didn't help. In SC7 it works, in SC8 not.

      Best regards,
      Tibor

      Comment


      • #4
        a lot of things don't work in SC8, all software becoming better, SC becoming worse unfortunately

        Comment


        • #5
          Originally posted by itsme3 View Post
          a lot of things don't work in SC8, all software becoming better, SC becoming worse unfortunately
          I tried the project mentioned in your link, and works on V8
          /Giuseppe

          Professional Scriptcase Services
          Some Customers opinions

          Comment


          • #6
            Originally posted by itsme3 View Post
            a lot of things don't work in SC8, all software becoming better, SC becoming worse unfortunately
            Yes that's right, slower and more unstable than SC7

            Comment


            • #7
              Originally posted by Giu View Post
              I tried the project mentioned in your link, and works on V8
              Yes Giu, that was provided by you when I was stuck once a while ago good you tried it because i'm planning to convert that project to V8 soon...

              in general, sc8 yet needs a lot to become stable, everybody agrees, but we are optimistic after the good intervention from SC team recently, so lets hope for the best

              Comment


              • #8
                Hello,

                I've got the solution Bit complex, but it works.
                The problem is that there are two select field and the user can select only one of them. My primary idea is the when a user select from field1 than with the use of onchange I set the field2 value to 0, this is what doesn't working.
                By the way field1 points to customers table, field2 points to workers table.

                Solution: you have to make two text field for field1, field2 which are contains the name of the record, instead of keyvalue. Than you have to reload the text fields at form onLoad.
                You have to make 2 capture field link for the new text fields, which are points to the 2 grid application, from the user can select the record for field1 and field2. Than you have to make 2 onChange Ajax event for the 2 text fields. These Ajax onChange methods gets the key fields from the appropriate key fields from an sql statement, and puts the keyfields into the appropriate field1 and field2. Textfield1 onchange contains {field2} = 0 and {textfield2} = "" and TextField2 onchange contains {field1} = 0 and {textfield1} = ""
                It is not too excat way, bacause it is assumes that there are no customers have same name and workers too.
                (I hope I'm clear enough and sorry for my English)

                Comment


                • #9
                  I'm sure there are an easy way. I think just not enough data was provided to us. And you mentioned in your previous thread, thath my tests worked.
                  /Giuseppe

                  Professional Scriptcase Services
                  Some Customers opinions

                  Comment


                  • #10
                    Originally posted by Giu View Post
                    I'm sure there are an easy way. I think just not enough data was provided to us. And you mentioned in your previous thread, thath my tests worked.
                    I can't tell regarding the mobile part, but as far as I have seen it, current version of SC isn't worse then SC 7. Doesn't mean that there are not many things to fix. But as a heavy-user, I pretty happy with SC8.
                    Albert Drent
                    aducom software netherlands
                    scriptcase partner, reseller, support and (turn-key) development
                    www.scriptcase.eu / www.scriptcase.nl

                    Comment


                    • #11
                      Hello,

                      I simulated your problem with two fields of type select, using the same configuration as mentioned in the first post. I got a positive result (there was no an error). Could better illustrate your problem? Based on what you said above I had no problems.

                      Thank you.
                      Best regards,
                      Thomas Soares.
                      ScriptCase International.

                      Email: t.soares@scriptcase.net
                      Visit our Blog: http://www.scriptcase.net/blog/
                      Visit out fan page: http://www.facebook.com/Scriptcase

                      Comment


                      • #12
                        Thomas, thanks for your efforts
                        Your testing and interference with us as I can see lately is really appreciated
                        Keep good care and works coming
                        Cheers

                        Comment

                        Working...
                        X