[wdvltalk] Re: Javascript help

2004-10-25 Thread Cheryl D Wise
I love the return. I have convinced my client that we don't try to validate and convert 1500 into. When I pointed out they weren't doing it on the other forms (I think the previous people knew even less than I do) So we are going with 1.5-2.999 in the pricing field and forgetting validation. When

[wdvltalk] Re: Javascript help

2004-10-25 Thread Cheryl D Wise
It was getting it to pass the proper quantity I was getting stuck and I think Stephen's script showed me where my error was but I'm back burnering it for now since my client looked at the other places on the site where pricing was in bulk and saw that they didn't have the validation there just aske

[wdvltalk] Re: Javascript help

2004-10-25 Thread Bj
- Original Message - From: "Cheryl D Wise" > I need to pass to the cart the number in the format > of 1.5 for 1500 instead of 1500. The pricing is passed > via a hidden field (hate this cart) so I figured I'd just > divide the per thousand price by 1000 and pass the > decimal value but the

[wdvltalk] Re: Javascript help

2004-10-25 Thread Stephen Caudill
Okay... It sounds like you already wrote a script that does what you need, but I'll take a stab anyway. I'll assume the following HTML: ... ... So, here's the appropriate script function stupidCartFunction(oFrm) { qty =

[wdvltalk] Re: Javascript help

2004-10-25 Thread Cheryl D Wise
I agree that the constraints are crappy. What I am requested to do is to verify that the number is larger than 1500 then convert the quantity to 1.5 or whatever and pass the new quantity to the Perl script. For right now I've put instructions on the page to order in the number of thousands, aka 1.

[wdvltalk] Re: Javascript help

2004-10-25 Thread Stephen Caudill
I'm a fair hand at JS and this really doesn't sound like a job for it, given your constraints... plus I wince when I see critical functionality implemented through JavaScript. In any case, If the cart always rounds to two decimal places on the server side, there really isn't anything JavaScript ca

[wdvltalk] Re: Javascript Order Form

2004-08-25 Thread jdmajor
The below URL is a tutorial for creating an order form. I checked it out and it looks very good. You have several options also. I like it so much I'm bookmarking the spot for myself too. http://home.cogeco.ca/~ve3ll/jstutor6.htm?reload_coolmenus hth Jan • The WDVL Discussion List from WDVL.

[wdvltalk] RE: [Javascript] Getting index of selected item

2004-06-09 Thread Linden, Todd
Here's another solution that selects all items from the listbox on the click of a button. function getSelectedItems(oSel) { var selectedItems = new Array(); for (var i = 0; i < oSel.length; i++) { if (oSel.options[i].selected) selectedItems[selectedItems.length] = oSe

[wdvltalk] RE: [Javascript] Getting index of selected item

2004-06-09 Thread Linden, Todd
Ok if you have two arrays, compare the items in a loop. If it matches, add it to a third array. Continue until all elements of array two have been compared to all values in array one. The third array becomes the items selected array // array index for finalArray var z=0; // origArray

[wdvltalk] RE: [Javascript] Getting index of selected item

2004-06-09 Thread Howard Cheng
Right, that's good for getting ALL of the selected options, but what about the ONE item that was just clicked? Linden, Todd wrote: I think I've done this in the past and can't remember EXACTLY how I had done it but you have to loop through the options to see if they are selected. I found this cod

[wdvltalk] RE: [Javascript] Getting index of selected item

2004-06-09 Thread Linden, Todd
Arrgghhh...missed last paragraph. Sent previous post too early. Now contemplating a possible solution... - Todd • The WDVL Discussion List from WDVL.COM • To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal passwor

[wdvltalk] RE: [Javascript] Getting index of selected item

2004-06-09 Thread Linden, Todd
I think I've done this in the past and can't remember EXACTLY how I had done it but you have to loop through the options to see if they are selected. I found this code on the net. Maybe it'll help... var so = document.Form.select1; selectedOptions = new Array(); for (var i=0; i < so.length; i++){

[wdvltalk] Re: Javascript

2004-04-26 Thread Howard Cheng
According to the documentation, Javascript doesn't have associative arrays. See http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/array.html for reference. But then what exactly is document.forms["myForm"].elements["formElement"]? I suppose they might be custom collect

[wdvltalk] Re: JavaScript Question

2004-03-23 Thread mrport
Thank you - I will fiddle with this in the morning. :-) Riva On Tue, 23 Mar 2004 23:00:19 -0500 R'twick Niceorgaw <[EMAIL PROTECTED]> writes: > sure it can be done Riva Portman, MCIWD Certified Webdesigner Star Quality Designs www.starqualitydesigns.com • The WDVL Discussion List from WDV

[wdvltalk] Re: JavaScript Question

2004-03-23 Thread R'twick Niceorgaw
sure it can be done [EMAIL PROTECTED] wrote: >Hi all, > >I was wondering if there is a way to check if a field in a form has been >left blank and, if it is, not have it appear on the e-mail (that I get >from the form processor.) > >For example, my code is: > > >value="Butternut Squash Sou

[wdvltalk] Re: javascript: changing src attribute at load time

2004-03-11 Thread Scott Glasgow
;[EMAIL PROTECTED]> Sent: Wednesday, March 10, 2004 5:02 PM Subject: [wdvltalk] Re: javascript: changing src attribute at load time > - Original Message - > From: "Scott Glasgow" > > How about: > > document.write('<iframe src="'

[wdvltalk] Re: javascript: changing src attribute at load time

2004-03-10 Thread Bj
- Original Message - From: "Scott Glasgow" How about: document.write('