1 2 3 Previous Next 34 Replies Latest reply: Oct 4, 2013 8:51 AM by Alexandra Robin Go to original post RSS
      • 15. Re: Tabular Form, Add Row, Enter Key
        Alexandra Robin

        k. thanks...looking

        • 16. Re: Tabular Form, Add Row, Enter Key
          Alexandra Robin

          Welll, I think I've determined it's f06 but f06 nor f06_0000 through f06_0006 (number of elements on this page in the tabluar form) work. What am I missing?

          <tr class="highlight-row"><td headers="CHECK$01"
          class="t14data"><label for="f01_0006" class="hideMe508">CHECK$01</label><input type="checkbox"
          name="f01"
          value="6"
          class="row-selector"
          id="f01_0006"
          /></td><td headers="ASSOC_ITEMNO"  class="t14data"><label
          for="f06_0006"
          class="hideMe508">ASSOC_ITEMNO</label><input type="text" name="f06" size="15" maxlength="2000"
          value="33333"  id="f06_0006"

           

          AM I MISSING CLIENT SIDE VALIDATION?

          • 17. Re: Tabular Form, Add Row, Enter Key
            jariola

            Hi,

             

            Ok, then try change Add Row button URL target to

            javascript:adddRow();$("input[name=f06]:last").focus();  
            

             

            Regards,

            Jari

            • 18. Re: Tabular Form, Add Row, Enter Key
              Alexandra Robin

              No luck.  I just tried it again - copied and pasted yours in. Am I to set up any button action? validation?

              • 19. Re: Tabular Form, Add Row, Enter Key
                jariola

                Hi,

                 

                Sorry , try

                javascript:adddRow();var a=$("input[name=f06]:last").focus();
                


                That should set focus to new row.


                We need check later that validation. It's midnight here=)


                Regards,

                Jari


                • 20. Re: Tabular Form, Add Row, Enter Key
                  Alexandra Robin

                  Get some sleep!  Thanks again for all your help! I'll keep working.  It's only 2:30 p.m. here - - - ten hours...hmmm, possibly Finland? If so I must tell you a funny story tmmr. Good night!

                  • 21. Re: Tabular Form, Add Row, Enter Key
                    pkpanda

                    what apex version r u using. if it 4.2 try this

                    javascript:apex.widget.tabular.addRow();$("input[name=f06]:last").focus();

                    make sure the field is not hidden or disabled.

                    • 22. Re: Tabular Form, Add Row, Enter Key
                      jariola

                      Hi,

                       

                      pkpanda, OP is using APEX 4.0.

                       

                      AlexandraRobin, yes I'm located in Finland.

                      Is it possible if you create example to apex.oracle.com and share developer login details to workspace ?

                      Then I could check validation and create example for you.

                       

                      Regards,

                      Jari

                      • 23. Re: Tabular Form, Add Row, Enter Key
                        Alexandra Robin

                        Good morning, Jari.  I need to remind myself how to set it up at apex.oracle.com.  I have a workspace set.  What I don't remember is how to install the data you need. I just typed my Finnish story for you but it was blocked here saying is was spam.  Can you tell me how to get around that?

                        Also, remember that this field is in a tabular form if this matters.

                        We're on 4.0.0.00.46!!!!! I've asked numerous times for an upgrade and our Network Administrator doesn't really know how to do it so what I hear is "he's working on it."  I've been asking for at least a year now that I think more about it.

                        • 24. Re: Tabular Form, Add Row, Enter Key
                          jariola

                          Hi,

                           

                          If you can set example and just insert few example lines that would do just fine.

                          I will keep on mind you are on APEX 4.0

                           

                          I do not know how go round if forum false positive detect something as spam, sorry.

                          But I like hear your story. If you like send me email jari dot laine at dbswh dot com, thanks.

                           

                          It is Friday so I will not be long online. Need to go sauna=)

                           

                          Regards,
                          Jari

                          • 25. Re: Tabular Form, Add Row, Enter Key
                            Alexandra Robin

                            How wonderful...the sauna!  I use the steamroom at our gym - an excellent fitness center/health club/whatever you want to call it.  Enjoy!! We can get back to this Monday.

                            • 26. Re: Tabular Form, Add Row, Enter Key
                              Alexandra Robin

                              Well, Jari - I think we have another version upgrade issue. It works on apex.oracle.com. I've stopped adding data and other tables to see the whole page work.  It's too time consuming.  But you can see the Associated Items Tabular Form here

                              WORKSPACE:  ALEX_TEST

                              USER:  guest

                              PASS: nukik5

                               

                              Click on the Office Staff button and use the same login there

                              Click on the pencil and look to the bottom right

                              Don't be confused with the Assoc Items text area.  It is this that I wanted to get rid of.

                               

                              I'll create collections.   need one for associated items and another for discontinued items. In the end this is probably better because I can't use more than one tabular form on a page...or has this changed with the new version, too?

                              • 27. Re: Tabular Form, Add Row, Enter Key
                                jariola

                                Hi,

                                 

                                I did add to your sample page 3 new JavaScript function to page HTML header

                                function validateAndAddNewRow(){
                                
                                /* get all input tags */
                                var lInput=$("input[name=f06]");
                                
                                /* array to hold input values */
                                var lValues=[]
                                
                                /* collect input values to array */
                                lInput.each(function(i){
                                  lValues.push(this.value);
                                });
                                
                                /* get unique values */
                                lValues=$.unique(lValues);
                                
                                /* compare input count to unique values count */
                                if(lInput.length !== lValues.length){
                                
                                  /* if there is duplicate values */
                                  /* alert about duplicates and exit */
                                  alert("Duplicate values");
                                  return false;
                                
                                }
                                
                                /* no duplicates. so we add new row */
                                addRow();
                                
                                /* set focus to last row */
                                $("input[name=f06]:last").focus();
                                
                                }
                                
                                

                                 

                                And changed Add Row button target

                                javascript:validateAndAddNewRow();
                                

                                This seems work ok in your example when I run it with Firefox.

                                 

                                 

                                I did notice that in page 3 you have some JavaScript in Page HTML Body Attribute.

                                You should not write there any JavaScript functions. You need fix that.

                                 

                                After you have fix this problem and try my proposal in your own environment post back does it work.

                                If it did not work, check is there is any JavaScript errors, e.g. using Firebug.

                                 

                                Regards,

                                Jari

                                • 28. Re: Tabular Form, Add Row, Enter Key
                                  Alexandra Robin

                                  Thank you, Jari!! I will try your additions! I hope you had a nice weekend. All the best, Alex

                                  • 29. Re: Tabular Form, Add Row, Enter Key
                                    jariola

                                    Hi,

                                     

                                    Thanks.

                                    Did you manage test this on your APEX instance?

                                     

                                    Regards,

                                    Jari