From ddjolley at gmail.com Sat Jul 9 18:07:34 2005 From: ddjolley at gmail.com (Doug Jolley) Date: Sat, 9 Jul 2005 18:07:34 -0700 Subject: [OCLUG-devel] * on the left Message-ID: I'm embarrassed to admint; but, can anyone please tell me what the following declaration means: node* window I would know what 'node *window' would mean; but, moving the * to the LH side leaves me at a loss. Thanks for any input. ... doug (Not digitally signed.) -- (Not digitally signed.) From michael.elkins at gmail.com Sun Jul 10 13:16:56 2005 From: michael.elkins at gmail.com (Michael Elkins) Date: Sun, 10 Jul 2005 13:16:56 -0700 Subject: [OCLUG-devel] * on the left In-Reply-To: References: Message-ID: <42D18238.7020609@gmail.com> Doug, There is no difference where the asterisk is placed. It still means the same thing. Some people prefer to use "Node* window" to note that "window" is a type of "Node*" to make it look a little more straightforward. Michael Doug Jolley wrote: >I'm embarrassed to admint; but, can anyone please tell me what the >following declaration means: > > node* window > >I would know what 'node *window' would mean; but, moving the * to the >LH side leaves me at a loss. Thanks for any input. > > ... doug (Not digitally signed.) > > From ddjolley at gmail.com Sun Jul 10 20:18:16 2005 From: ddjolley at gmail.com (Doug Jolley) Date: Sun, 10 Jul 2005 20:18:16 -0700 Subject: [OCLUG-devel] * on the left In-Reply-To: <42D18238.7020609@gmail.com> References: <42D18238.7020609@gmail.com> Message-ID: Thanks to all who responded for the clarification. I think I'm squared away on the point now. ... doug (Not digitally signed.) From ddjolley at gmail.com Thu Jul 14 12:14:31 2005 From: ddjolley at gmail.com (Doug Jolley) Date: Thu, 14 Jul 2005 12:14:31 -0700 Subject: [OCLUG-devel] getopts Message-ID: I'm assuming that there must exist a C library function for parsing command line arguments similar to the bash getopts builtin command. In fact, I wouldn't be surprised if the C function served as the basis of all such functions. Anyway, can someone tell me where to find this function and info on how to use it? Thanks. ... doug -- (Not digitally signed.) From x at xman.org Thu Jul 14 12:45:53 2005 From: x at xman.org (Christopher Smith) Date: Thu, 14 Jul 2005 12:45:53 -0700 Subject: [OCLUG-devel] getopts In-Reply-To: References: Message-ID: <42D6C0F1.4050403@xman.org> Doug Jolley wrote: > I'm assuming that there must exist a C library function for parsing > command line arguments similar to the bash getopts builtin command. > In fact, I wouldn't be surprised if the C function served as the basis > of all such functions. Anyway, can someone tell me where to find this > function and info on how to use it? Thanks. Very good guess: http://www.opengroup.org/onlinepubs/007908799/xsh/getopt.html Not part of C, but part of POSIX. GNU provides getopt, getopt_long and argp: http://www.gnu.org/software/libc/manual/html_node/Parsing-Program-Arguments.html#Parsing-Program-Arguments I've never used argp, but it's supposed to be better. These days I'm mostly doing C++, so I used the Boost.Program_options library instead: http://www.boost.org/doc/html/program_options.html --Chris From strombrg at dcs.nac.uci.edu Thu Jul 14 12:52:25 2005 From: strombrg at dcs.nac.uci.edu (Dan Stromberg) Date: Thu, 14 Jul 2005 12:52:25 -0700 Subject: [OCLUG-devel] getopts In-Reply-To: References: Message-ID: <1121370745.4522.10.camel@seki.nac.uci.edu> getopt, getopt_long. getopt is on just about any *ix. getopt_long is more likely to be present on linux systems, but if you want getopt_long functionality, cross-platform, you can include the sources to getopt_long. I just noticed that there's now a "getopt_long_only", also. On Thu, 2005-07-14 at 12:14 -0700, Doug Jolley wrote: > I'm assuming that there must exist a C library function for parsing > command line arguments similar to the bash getopts builtin command. > In fact, I wouldn't be surprised if the C function served as the basis > of all such functions. Anyway, can someone tell me where to find this > function and info on how to use it? Thanks. > > ... doug -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://localhost.localdomain/pipermail/oclug-devel/attachments/20050714/05b19f95/attachment.bin From ddjolley at gmail.com Sat Jul 16 16:21:05 2005 From: ddjolley at gmail.com (Doug Jolley) Date: Sat, 16 Jul 2005 16:21:05 -0700 Subject: [OCLUG-devel] getopts In-Reply-To: <1121370745.4522.10.camel@seki.nac.uci.edu> References: <1121370745.4522.10.camel@seki.nac.uci.edu> Message-ID: Thanks, guys. That gives me quite a bit to chew on for a while. ... doug (Not digitally signed.) From zaurusc3100 at yahoo.com Mon Jul 18 19:15:48 2005 From: zaurusc3100 at yahoo.com (carlos rodriguez) Date: Mon, 18 Jul 2005 19:15:48 -0700 (PDT) Subject: [OCLUG-devel] zaurusc3100 Message-ID: <20050719021548.97475.qmail@web34009.mail.mud.yahoo.com> hello oclug-devel, i am a newbie programmer........this is kind of a code related question.....since its regarding the world's best pocket-size programmer's linux computer........i just purchased a new sharp zaurus c3100, with extra battery and battery charger from japan direct for $903 (best price, i shopped).........i got it today and have not even turned it on (since i have to charge battery first).......unfortunately, when i purchased a week ago, i was not expecting to have to buy a used car, since my current transportation is junk..............i will not turn unit on, but i will charge battery so as to keep it new condition...........i am selling this new unit for best offer......i know i will lose one or two hundred, because i need cash now..........but as long as it goes to a good linux neighbor thats ok.........do you know the best way to share the good news......i live in fullerton, next to cal state fullerton.........thanks.........please respond __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://localhost.localdomain/pipermail/oclug-devel/attachments/20050718/69df5bc4/attachment.html From ddjolley at gmail.com Thu Jul 21 08:01:56 2005 From: ddjolley at gmail.com (Doug Jolley) Date: Thu, 21 Jul 2005 08:01:56 -0700 Subject: [OCLUG-devel] Appropriate List Topics Message-ID: I know this list is heavily into C. That's why I joined it. However, I have been struggling for about a day with a Javascript issue that I can't seem to get resolved. I was wondering if it would be horribly inappropriate for me to post it here. Thanks. ... doug -- (Not digitally signed.) From x at xman.org Thu Jul 21 08:15:00 2005 From: x at xman.org (Christopher Smith) Date: Thu, 21 Jul 2005 08:15:00 -0700 Subject: [OCLUG-devel] Appropriate List Topics In-Reply-To: References: Message-ID: <42DFBBF4.5020505@xman.org> Doug Jolley wrote: >I know this list is heavily into C. That's why I joined it. However, >I have been struggling for about a day with a Javascript issue that I >can't seem to get resolved. I was wondering if it would be horribly >inappropriate for me to post it here. Thanks. > > I here Javascript is used by some developers, so it would seem to be appropriate. That being said my Javascript is quite week, so don't expect any help from me. ;-) --Chris From msimpson at braysimpson.com Thu Jul 21 08:53:04 2005 From: msimpson at braysimpson.com (Morgan Simpson) Date: Thu, 21 Jul 2005 08:53:04 -0700 Subject: [OCLUG-devel] Appropriate List Topics In-Reply-To: References: Message-ID: <30e0355f404cc67cddd76dbe02afaf23@braysimpson.com> On Jul 21, 2005, at 8:01 AM, Doug Jolley wrote: > I know this list is heavily into C. That's why I joined it. However, > I have been struggling for about a day with a Javascript issue that I > can't seem to get resolved. I was wondering if it would be horribly > inappropriate for me to post it here. Thanks. As I recall, we created this list to get the programming questions off of the general list. I don't think there was ever any intention of limiting the discussion to C. We get a number of C questions as we have several members in various stages of learning the language. As for Javascript, I don't know how much expertise is available. (I'm certainly no expert!) Why not ask away and see what happens. Best regards, Morgan Simpson Bray, Simpson & Associates, Inc. (714) 390 5040 (voice) (714) 549 3064 (fax) From ddjolley at gmail.com Thu Jul 21 08:57:59 2005 From: ddjolley at gmail.com (Doug Jolley) Date: Thu, 21 Jul 2005 08:57:59 -0700 Subject: [OCLUG-devel] Appropriate List Topics In-Reply-To: <42DFBBF4.5020505@xman.org> References: <42DFBBF4.5020505@xman.org> Message-ID: > I here Javascript is used by some developers, so it would seem to be > appropriate. Sounds good to me, Chris. I'll post my issue. Thanks. ... doug -- (Not digitally signed.) From ddjolley at gmail.com Thu Jul 21 09:08:24 2005 From: ddjolley at gmail.com (Doug Jolley) Date: Thu, 21 Jul 2005 09:08:24 -0700 Subject: [OCLUG-devel] JavaScript - An enhanced confirmation dialog box Message-ID: Basically what I'm trying to produce is a confirm dialog box on sterroids. After a user has finished entering data into a form and clicks the submit button, I want to do some error checking on the data and if it's OK open a window which will present a summary of the data submitted and ask the user via Accept and Cancel buttons whether he wants to submit the data. I am appending my code below. I intended that if the user clicks the Accept button the verify() function would return true and the form data would be submitted. If the user clicks the 'Cancel' button, the verify function returns false and the form data would not be submitted leaving the user in the position of being able to edit the form data before submitting it. What seems to be happening is that the verify() function is returning true right away (i.e., before the user has done anything). So, even though the window is open presenting the user with the 'Accept' and 'Cancel' buttons, the form data is immediately submitted without regard for what button the user ultimately clicks. Can anyone think of how I might resolve this delima? Thanks. Here's my code. Test 3
From tnation at baipro.com Thu Jul 21 09:37:49 2005 From: tnation at baipro.com (Tim Nation) Date: Thu, 21 Jul 2005 09:37:49 -0700 Subject: [OCLUG-devel] JavaScript - An enhanced confirmation dialog box References: Message-ID: <001401c58e12$89a25580$0317a8c0@win2000> confirmWin.document.write("

") confirmWin.document.write("

") Both buttons are set to return 'true' when clicked. Shouldn't the cancel button return 'false'? One of the main places I've turned to in the past for examples is the Script Asylum (http://www.scriptasylum.com/) Maybe they'll have something helpful? Tim From ddjolley at gmail.com Thu Jul 21 09:59:22 2005 From: ddjolley at gmail.com (Doug Jolley) Date: Thu, 21 Jul 2005 09:59:22 -0700 Subject: [OCLUG-devel] JavaScript - An enhanced confirmation dialog box In-Reply-To: <001401c58e12$89a25580$0317a8c0@win2000> References: <001401c58e12$89a25580$0317a8c0@win2000> Message-ID: > Both buttons are set to return 'true' when clicked. Shouldn't the cancel > button return 'false'? Thanks, Tim. You're absolutely right. That's just a fowl up on my part. However, the point is that the action of returning true and submitting the data doesn't wait for the user to click EITHER button. It just occurrs automatically immediately after the window is opened. So, while you have definitely identified a problem (and I very much appreciate that) it's not the one I'm looking for. I'll have a look at the scriptasylum and see what they have to offer. Thanks. ... doug From chris_berry-list-oclug-devel at jm-associates.com Thu Jul 21 12:28:55 2005 From: chris_berry-list-oclug-devel at jm-associates.com (Chris Berry) Date: Thu, 21 Jul 2005 12:28:55 -0700 Subject: [OCLUG-devel] JavaScript - An enhanced confirmation dialog box In-Reply-To: References: Message-ID: <42DFF777.9030703@jm-associates.com> I'm pretty sure this forum is for all programming not just C, so JavaScript is definitely ok here, though I suppose you'd probably get some flack if you wanted to talk VBScript or windows batch files hehe. My JavaScript is a litte rusty, but I think this is your problem:
You don't return directly in the onSubmit event handler, you return from the function. So onSubmit should be onsubmit="function()", and the function should return true or false. The way you've got it set, it's always true even before the function runs. Chris Berry chris_berry at jm-associates.com Information Advisory Manager JM Associates "There is nothing so useless as doing efficiently that which should not be done at all." --Peter Drucker Doug Jolley wrote: > Basically what I'm trying to produce is a confirm dialog box on > sterroids. After a user has finished entering data into a form and > clicks the submit button, I want to do some error checking on the data > and if it's OK open a window which will present a summary of the data > submitted and ask the user via Accept and Cancel buttons whether he > wants to submit the data. > > I am appending my code below. > > I intended that if the user clicks the Accept button the verify() > function would return true and the form data would be submitted. If > the user clicks the 'Cancel' button, the verify function returns false > and the form data would not be submitted leaving the user in the > position of being able to edit the form data before submitting it. > > What seems to be happening is that the verify() function is returning > true right away (i.e., before the user has done anything). So, even > though the window is open presenting the user with the 'Accept' and > 'Cancel' buttons, the form data is immediately submitted without > regard for what button the user ultimately clicks. Can anyone think > of how I might resolve this delima? Thanks. Here's my code. > > > > Test 3 > > > > onsubmit="return verify()"> > >
> > > _______________________________________________ > OCLUG-devel mailing list -- OCLUG-devel at oclug.org > http://mailman.oclug.org/mailman/listinfo/oclug-devel From ddjolley at gmail.com Thu Jul 21 14:50:05 2005 From: ddjolley at gmail.com (Doug Jolley) Date: Thu, 21 Jul 2005 14:50:05 -0700 Subject: [OCLUG-devel] JavaScript - An enhanced confirmation dialog box In-Reply-To: <42DFF777.9030703@jm-associates.com> References: <42DFF777.9030703@jm-associates.com> Message-ID: > You don't return directly in the onSubmit event handler, you return from > the function. So onSubmit should be onsubmit="function()", and the > function should return true or false. Thanks for the input, Chris. I tried it; but, it didn't fix the problem. I think that it has to do with the fact that clicking on a button triggers an event; but, a function that loads a document into a window does just that without waiting for any events to happen. Anyway, I have made some changes and I think that I have this problem all but solved. If I do actually get it solved, I'll post the solution although I suspect that there's not a great deal of interest one way or the other. :) If I may, let me describe what it is that I believe is standing between me and success. As you know, I have a document with a form in it and that form has a submit button. Clicking on the submit button runs a JS function that opens a secondary window. The secondary window has a button which I *BELIEVE* is a property of the original form -- the only form I have. The reason I believe that is that the button seems to function just fine and if I try to put it in its own form it doesn't work. So, with the changes I have made, I believe that all I need to do is to get the event of clicking on the button in the secondary window to run the click() method of the submit button in the form. That should be easy enough. I'm just trying to run the click() method of a button in a form in the primary window from a button in a secondary window. I think that once I'm able to do that, I will have this thing solved. Thanks again for the input. ... doug From ddjolley at gmail.com Fri Jul 22 08:34:45 2005 From: ddjolley at gmail.com (Doug Jolley) Date: Fri, 22 Jul 2005 08:34:45 -0700 Subject: [OCLUG-devel] JavaScript - An enhanced confirmation dialog box In-Reply-To: References: <42DFF777.9030703@jm-associates.com> Message-ID: Thanks to all who rendered assistance with this problem. I finally got it resolved. Basically the situation is that when the verify function is called by the onsubmit event handler, that function just runs from beginning to end without pausing for anything. So, the Accept button in the confirm window has to set a variable noting the acceptance and then effect a click on the form's submit button which causes the function to be re-run. It turns out that the crux of my problem was this (and I'm not exactly sure why I wasn't able to do it my way); but, I was trying to effect the click on the form's submit button using the click() method of that button. Apparently what I needed to do was to use the submit() method of the form. As I say, I'm not exactly sure why my original way didn't work; but, it doesn't. So, again, thanks to all who contributed. Just to get closure on this issue, I'm appending my working script. Here it is. Thanks. - - - - - - - - - - - - Cut Here - - - - - - - - - - Test 2

Ron Oyer Test Form

Number of passengers in your cabin that are registering on this form:
1 2 3 4
Name 1:
Name 2:
Name 3:
Name 4:
Cabin Category:
A B C D
Meal Seating:
First Second
Rooming Preference:
Alone Match Me Share with
From zaurusc3100 at yahoo.com Sun Jul 24 14:30:15 2005 From: zaurusc3100 at yahoo.com (carlos rodriguez) Date: Sun, 24 Jul 2005 14:30:15 -0700 (PDT) Subject: [OCLUG-devel] new zaurus c3100 for sale Message-ID: <20050724213016.43216.qmail@web34014.mail.mud.yahoo.com> who wants to buy a new sharp zaurus c3100......includes: (1) zaurus c3100 (2) power adapter (3) extra battery (4) battery charger (5) included accessories ..........bought it from price japan for $903 2-weeks ago..........i need the cash.........best offer......starting $700......i live in fullerton --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://localhost.localdomain/pipermail/oclug-devel/attachments/20050724/2fab7c5a/attachment.html