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
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
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
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
Michael Horowitz wrote:
onchange="showSubcategory2(document.getElementById('category').value,document.getElementById('subcategory').value)">
try this:
***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Un
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
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
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
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
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
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
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
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
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
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
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
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
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-
18 matches
Mail list logo