Hi again, I hope you all had a good Thanksgiving (for those of you in the US)!
I think I tried adding a call from stateChangedPar tType() to set the next one but I didn't pass along the form (because I don't know how to from there) and it didn't solve the problem of the listboxes not loading initially. I can try it again. If you have a solution for how to be able to pass the form along, please let me know.
Here's where...
User Profile
Collapse
-
Thanks for the reply. The reason I didn't put the call to setPackage() in the stateChangedPar tType() method was because I wanted to call it while I still had a reference to the form variable (which is passed into the setPartType() method.
Changing the code to be in the stateChangedPar tType() method doesn't solve the issue with some of the listboxes not loading initially either.
Any other ideas? I'd really appreciate...Leave a comment:
-
Ajax listbox inconsistent
Hi guys,
I created a form for searching through a parts library that I have stored in a MySQL database. I'm not new to web programming but this is my first time using PHP and Ajax. I have four listboxes that are chained together. In other words, if you click on the first one it filters out what's available in the next three. If you click on the 3rd one, it filters out the available options in the 4th one, etc. I do this by having... -
I just figured out that I can pass "this.form" instead and then in the method parse out all the values that I need, such as:
It only requires passing the one form variable instead of passing multiple values which will be better if this form gets very complex....Code:var val1=form.PartType.options[form.PartType.options.selectedIndex].value; var val2=form.Package.options[form.Package.options.selectedIndex].value;
Leave a comment:
-
Thanks for the reply. I tried what you suggested and nothing happens when I select something in the listbox. If I change the code to pass in "this.value " for both params it works just fine so I'm not missing anything anywhere else that I know of.
Here's what the javascript looks like:
...Code:function setPackage(str, blah) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("BrowserLeave a comment:
-
Can't figure out what's wrong with my variable passing
Hi guys, I'm new to PHP and AJAX/JS so I apologize if this is an incredibly obvious error.
I'm in the process of creating multiple listboxes that are chained together for an advanced search form. I have everything working for the ajax and the issue I'm running into is when I try to pass a PHP variable to a JS function. I've searched multiple forums and read multiple posts about this issue but cannot figure out what's going on. I know...
No activity results to display
Show More
Leave a comment: