Re: [WSG] How to send two values to javascript

2007-11-15 Thread Michael Horowitz
Still fighting with this. Since I've taken the variables out of the javascript it is called like this But firebug keeps showing the error as missing ) after argument list showSubcategory2(document.getElementById() I'm looking forward to getting the book next week but this is driving me

Re: [WSG] How to send two values to javascript

2007-11-15 Thread Michael Horowitz
So here is the current issue. I am able to send a value. When sending two something strange is happening onchange="showSubcategory(document.getElementById('category').value)"> //(this works fine) onchange="showSubcategory2(document.getElementById('category').value,document.getElementById

Re: [WSG] How to send two values to javascript

2007-11-15 Thread Michael Horowitz
Now firebug gives the error showSubcategory2(document.getElementById( Code is Code samples I've been able to review I know this will be simple at the end. Michael Horowitz Your Computer Consultant http://yourcomputerconsultant.com 561-394-9079 Brian Cummiskey wrote: Michael Horowitz

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Kit Grose
The issue is that selects themselves don't have values. You notice the value is on the option tag, not the select. So you can't just get the .value of the element with ID 'subcategory'; you need to get the value of the currently selected item OF that select box. That can be done as an inlin

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Brian Cummiskey
Michael Horowitz wrote: onchange="showSubcategory2(document.getElementById('category').value,document.getElementById('subcategory').value)"> try this: *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Un

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Casey Farrell
It must not be finding the element... does the element you are looking for in the document have id="category"? Michael Horowitz wrote: I've tried single quotes and keep getting the error document.GetElementByID has no properties Michael Horowitz Your Computer Consultant http://yourcomputercon

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Michael Horowitz
That solves problem number 1 Michael Horowitz Your Computer Consultant http://yourcomputerconsultant.com 561-394-9079 Casey Farrell wrote: It must not be finding the element... does the element you are looking for in the document have id="category"? Michael Horowitz wrote: I've tried single

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Michael Horowitz
I think I understand it no need for more explanation. It's too late at night and I am working with twins in the room and a wife at the airport Michael Horowitz Your Computer Consultant http://yourcomputerconsultant.com 561-394-9079 Kit Grose wrote: On 15/11/2007, at 3:34 PM, Casey Farrell w

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Michael Horowitz
I think you may have something with this secondSelect.items as I am using a select menu. Can you explain where I would put my variable names in here please. Thanks Michael Horowitz Your Computer Consultant http://yourcomputerconsultant.com 561-394-9079 Kit Grose wrote: On 15/11/2007, at

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Michael Horowitz
I've tried single quotes and keep getting the error document.GetElementByID has no properties Michael Horowitz Your Computer Consultant http://yourcomputerconsultant.com 561-394-9079 Casey Farrell wrote: Try using single quotes, as in: onchange="showSubcategory(document.getElementById('cate

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Kit Grose
On 15/11/2007, at 3:34 PM, Casey Farrell wrote: Try using single quotes, as in: Michael Horowitz wrote: Even better would be to modify the function itself to get the second value: Then in the JS: function showSubcategory(value1) { // Get value 2 either with var value2 = docu

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Casey Farrell
Try using single quotes, as in: onchange="showSubcategory(document.getElementById('category').value)"> Michael Horowitz wrote: Having trouble so I went to testing with one element like this onchange="showSubcategory(document.getElementById("category").value)"> and firebug shows a syntax e

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Michael Horowitz
Having trouble so I went to testing with one element like this onchange="showSubcategory(document.getElementById("category").value)"> and firebug shows a syntax error. I tried it again taking oub the "" onchange="showSubcategory(document.getElementById(category).value)"> and then receive

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Michael Horowitz
I just ordered the book. Thanks for the help I test out the solutions given. Michael Horowitz Your Computer Consultant http://yourcomputerconsultant.com 561-394-9079 Olly Hodgson wrote: On Nov 14, 2007 11:11 PM, Olly Hodgson <[EMAIL PROTECTED]> wrote: onchange="showSubcategory(this.valu

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Olly Hodgson
On Nov 14, 2007 11:11 PM, Olly Hodgson <[EMAIL PROTECTED]> wrote: > > onchange="showSubcategory(this.value, > document.getElementById("anotherElement").value);" While I'm here, two points: Doing anything major using the onchange event isn't a great idea. The reason being it can scupper keyboard u

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Olly Hodgson
On Nov 14, 2007 10:37 PM, Michael Horowitz <[EMAIL PROTECTED]> wrote: > I have examples using one value > > onchange="showSubcategory(this.value)"> > > from a form to a script. > > What if I need to send two values one from the current element in the > form and one from another element onchange="s

Re: [WSG] How to send two values to javascript

2007-11-14 Thread Benedict Wyss
I believe it is as follows; onchange="showSubcategory(name, email, message)" --- if they are the name=name and name=email, etc. or, if you want to parse text, then onchange="showSubcategory("banana", "orange", "apple")" -- So when it arrives at the script it becomes an array starting at [0] to

[WSG] How to send two values to javascript

2007-11-14 Thread Michael Horowitz
I have examples using one value onchange="showSubcategory(this.value)"> from a form to a script. What if I need to send two values one from the current element in the form and one from another element Thanks -- Michael Horowitz Your Computer Consultant http://yourcomputerconsultant.com 561-