× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I would debug your javascript.  You'll probably find the
problem there.

Also, one note.  If you really don't need a count of the
number of checkboxes and are just checking to see if any
were checked, I would have your AnyRecords() method just
reuturn TRUE if it finds a checked box (in the loop), and
FALSE at the end of the loop.  This will speed things up a
little and make the code a little clearer.

Brad
www.bvstools.com

On Thu, 8 Nov 2001 12:49:22 -0600
 "Mark A. Manske" <mmanske@minter-weisman.com> wrote:
> I can't figure out what is wrong with this, and nothing
> seems to work -
>
> I have my cgi program writing out the html, with
> javascript to "count" the
> check boxes checked,
> so you cannot go on unless at least one is checked (works
> great)
>
> The problem is this (same javascript) first time displays
> a list of items,
> you can check "some", click continue
> for a mass change, make your changes, the next programs
> reads in and
> re-posts the html (same code,
> differant program - but screen "looks" the same, now if
> you check the same
> "some" and click continue,
> the java script says that you did not check any, there
> are also a check all
> and uncheck all buttons, when
> I execute them, it will ignore the ones previously
> checked, UNLESS you click
> an apply button, bringing you
> back to where you have to search by catalog header and
> then get your list
> again, now the buttons, functions
> all work as they should (the html is the same, and what
> is REALLY weird, I
> copy it to a test area and use
> Frontpage2000 to "test" it, and get the same results
> (cannot seem to check
> the previously checked boxes)
>
> I know I am going crazy, so anyhow, is there some weird
> cache that I have to
> cleare to tell the java script
> that a box has been checked or not (I see nothing
> differant in the source
> html, line for line, exactly the same,
> but they do not work the same)
>
> TIA and for the straight jacket :)
>
> here is the javascript (the check boxes are named SRPI1_C
> to SRPIxxx_C (xxx
> being how ever many lines I have)
> The rpg program also placed the 7 in because that is how
> many lines this
> example had.
>
>    <SCRIPT LANGUAGE="JavaScript1.2">
> function CheckALL() {
> for (var j = 1; j <=7; j++)  {
> box = eval("document.keys.SRPI" + j + "_C");
> if (box.checked == false) box.checked = true;
>    }
>   }
>
> function UNCheckALL() {
> for (var j = 1; j <=7; j++)  {
> box = eval("document.keys.SRPI" + j + "_C");
> if (box.checked == true) box.checked = false;
>    }
>   }
>
> //   End  -->                   </SCRIPT>
>
>
>    <SCRIPT LANGUAGE="JavaScript1.2">
> function actionFIX() {
> var total = 0;
> var anyrecords = "YES";
> if (anyrecords == "YES") {
> for (var j = 1; j <=7; j++)  {
> box = eval("document.keys.SRPI" + j + "_C");
> if (box.checked == true) {
>      total += 1;
>    }
>   }
>  }
>
> if (total == 0)      {
> if (anyrecords == "YES") {
> document.forms['keys'].action = "/cgi-bin/SRP_C";
> alert("Please check at least one item");
>    }
> if (anyrecords == "NO") {
> document.forms['keys'].action = "/cgi-bin/SRP_CHDRS";
>    }
>   }
> }
>
> //   End  -->                   </SCRIPT>
>
>
> Mark A. Manske
> Fleming CSD - Plymouth Division
> Sr. Project Lead
> http://www.minter-weisman.com
> mailto:mmanske@minter-weisman.com
>
>
>
>
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400)
> mailing list
> To post a message email: WEB400@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/web400
> or email: WEB400-request@midrange.com
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/web400.
>

Bradley V. Stone
BVS.Tools
www.bvstools.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.