|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
dynamic s
I have 3 <select> boxes, and the values that should be in them is dependant on what information has been previously entered. All that info is stored in a database, and the code that does that is irrelivant at this point.
So what I want to know, is should I dynamically generate alot of javascript and swap out the select boxes, or refresh the page using <select onChange> and redo the boxes each time? |
|
#2
|
|||
|
|||
|
RE: dynamic s
the choice is yours, but I would suggest using the onchange event to refresh the page and the display each successive dropdown as the dependent dropdown selection is made.
|
|
#3
|
|||
|
|||
|
RE: dynamic s
To be, or not to be!
Your preference. From a "client" stand point. The faster you can do something, the better. Ever add a listing on Ebay? They change their combo boxes on the fly, instead of reloading. I feel it makes it more professional. If someone is still on shall I say it, dial up (huuh?, whats that) ... they will need to keep reloading the page. If your just pushing a lot of text, it generally gets transfered extremely fast. Much better then having to keep sending data back to the server. Plus, it can take a small load off the server. I say use dynamic combo/drop down boxes. Just remember though, if they do not have JS enabled, it is broke. So, you may just want to do both. Or make it a requirement that you have JS enabled to view the pages/site. |
|
#4
|
|||
|
|||
|
RE: dynamic s
No heres another issue.
I have 1 category, and under that there are about 30 options, each one of them has at least 5 options for it, which can grow, that makes 150 items to get and generate. Now, assuming each option may get more, lets say as many as 10, that raises us to 300 options, making 300 more words that have to be pushed out to the user, and placed into a dynamically generated combo box.... But thanks for the suggestions, I'll probably go that way anyway. |
|
#5
|
|||
|
|||
|
RE: dynamic s
if you really want cool, and functional, use the xml HTTP Request Object in javascript
it is the perfect solution to this. youll need to learn it, but its gives you so much power when doing these things. |
|
#6
|
|||
|
|||
|
RE: dynamic s
heres a demo
http://developer.apple.com/internet/webcontent/XMLHttpRequestExample/example.html |
|
#7
|
|||
|
|||
|
RE: dynamic s
now THATS cool.... too bad I've almost finished doing it my way, but I'll keep that in mind if this way gets too bad
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > dynamic s |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|