denisa Zivy

Greenhorn
+ Follow
since Apr 05, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by denisa Zivy

Great advices everybody. Thanks!
yeah, it works with show/hide, but still, i don't like the empty space of the hidden elements. i'm pretentious

David Newton wrote:Then why not use the hide/show thing suggested earlier? Sooooo much easier than the mess you're working with now!



yeah, i think you're right.... :D
if i've have had more experience i would have thought of that a long time ago :))
i'll give it a try
thanks:)

Bear Bibeault wrote:Eric's point was: why are you generating JavaScript code to, in turn, generate the options when you could just generate the options in the JSP and lose the script completely?



because i was trying to display this drop-down list only if the user checked a certain radio button. I have 2 options, the user can choose to input something in an input text or to select something from that list.





still not working...

Eric Pascarello wrote:

denisa Zivy wrote:thank you very much for your advice. i know that 250 of options is a lot... but if my database is that large..
i will try to put all the select in a string, to see if that works.
again thanks



Why is JavaScript doing this and not your server? It makes no sense. Have the server generate the string. I think you are really over thinking this.

Eric



yes, in jsp code i ment. and then the function will look like this:


right?
thank you very much for your advice. i know that 250 of options is a lot... but if my database is that large..
i will try to put all the select in a string, to see if that works.
again thanks
After some minor changes from the previous version of the function:


Thank you for your time trying to get me out of this mess.

Note: i have other javascript functions and they've worked until i've written this function. Now they don't...
Ok, i will try to be more specific. So, i have a html form, and i want a drop-down list to appear when a radio button is checked or an input text if another radio button is checked.



changeToIsi() works just fine, but the second function not. and i can't figure out why.

Paul Clapham wrote:so I'm going to move the post over there.


ok, thanks, but i thought the jsp code is the problem here...

Devaka Cooray wrote:
Got it?


no... i know what the rendered output should be like, i wrote the function, didn't i? but the fact is that it doesn't work..

Devaka Cooray wrote:
BTW, you must avoid using these Scriptlets in your JSP.


I have to, i what a drop-down list to appear in <div id='index'></div> when a certain radio button is checked...
Hi! What's wrong with this function? It doesn't display anything in <div id="index"><div> tag. The problem is with that <select>.. I've done something similar, but instead of a <select>, i've had <input> and it worked.... Help, please! Thank you!