[Nfb-web] java script glitch

Bryan Schulz b.schulz at sbcglobal.net
Tue Jan 8 18:33:30 UTC 2013


hi,

thanks, i'll get to these later today.
i'll mod the php that generated the value segment.
the dollar sign doesn't get injected into any of the mysql tables.
the php explode function splits the value into name and dollar value and 
throws away the dollar sign.
i also burned hours on a comma error and had to use str_replace to wipe out 
the commas as 1,200 + 2,500 = 3 instead of 3,700.
Bryan Schulz

----- Original Message ----- 
From: "Graham Mehl" <blind at trailstone.com>
To: "'NFB Webmaster's List'" <nfb-web at nfbnet.org>
Sent: Tuesday, January 08, 2013 4:20 AM
Subject: Re: [Nfb-web] java script glitch


> Hi Bryan,
> I tried to duplicate your problem. I did not use PHP or an external js 
> file,
> and I kept the limit at 2 since I did not have a long list.
> And I got it to work with 3 minor changes.
> I can send you the sample I used if you want. But I basically created a 
> HTML
> page starting with the sample you pointed us to and made your code
> substitutions.
> Yes, the array SelDrvr[] is probably the main source of your problem or
> rather the syntax you are using.
> I simply removed the left and right square brackets in the HTML input tag
> line and the javascript method call.
> The third change I made or recommend is not really regarding your problem.
> in the HTML input tag line, one of the attributes you have listed is 
> value.
> All attributes should have quotation marks around the value itself. so 
> your
> sample line would look like this now.
>
> <input type="checkbox" name="SelDrvr" tabindex="1"
> value="Antron_Brown$1,400,000" />Antron_Brown$1,400,000 <br />
>
> And if you may, I would like to make one other recommendation. I am not 
> sure
> what the dollar amount is needed for, but I would recommend not using it 
> in
> the value attribute if at all possible. Or at least the dollar sign 
> symbol.
> The dollar sign in most programming is a special character that indicates 
> a
> variable name and could cause other problems down the line in your
> processing.
>
> --
> Graham
> blind at trailstone.com
>
>
> -----Original Message-----
> From: Bryan Schulz [mailto:b.schulz at sbcglobal.net]
> Sent: Sunday, January 06, 2013 7:23 PM
> To: nfb-web at nfbnet.org
> Subject: [Nfb-web] java script glitch
>
> hi,
>
> after reading the sample found at:
> http://www.javascriptkit.com/script/script2/checkboxlimit.shtml
>
> any idea why this won't fire after 8 checkboxes are selected?
> does it matter if the java script function is in an external .js file?
> i have a feeling it has something related to the SelDrvr[] checkbox array.
>
> form html code:
> <form id="drivers" name="drivers" action="teamsummary.php" method="post"
> align="left">
>
> sample checkbox line generated from php:
> <input type="checkbox" name="SelDrvr[]" tabindex="1"
> value=Antron_Brown$1,400,000>Antron_Brown$1,400,000
>
> on same page with the form:
> <script type="text/javascript">
> checkboxlimit(document.forms.drivers.SelDrvr[], 8) </script>
>
> Bryan Schulz
>
>
> _______________________________________________
> Nfb-web mailing list
> Nfb-web at nfbnet.org
> http://nfbnet.org/mailman/listinfo/nfb-web_nfbnet.org
> To unsubscribe, change your list options or get your account info for
> Nfb-web:
> http://nfbnet.org/mailman/options/nfb-web_nfbnet.org/blind%40trailstone.com
>
>
> _______________________________________________
> Nfb-web mailing list
> Nfb-web at nfbnet.org
> http://nfbnet.org/mailman/listinfo/nfb-web_nfbnet.org
> To unsubscribe, change your list options or get your account info for 
> Nfb-web:
> http://nfbnet.org/mailman/options/nfb-web_nfbnet.org/b.schulz%40sbcglobal.net 





More information about the NFB-Web mailing list