Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Feed combobox parameter from javascript function
skunkies
Hi All,
I'd like to know if it's possible to feed a combobox parameter from a javascript function. My need is to create a combobox parameter with Years but to be generic I want to create a function which insert value based on the currentYear-5 to currentYear+1
Something like that:
For(int i=curr_year-5; i<curr_year+1;i++)
{addValueTocombo(i);}
Thanks and happy Xmas
Find more posts tagged with
Comments
mailtorake
In case, if you don't get any other better solution; a crude way of doing:
Create a dataset with the following sql query:
select * from (select to_char(sysdate, 'yyyy')-5 dat from dual union select to_char(sysdate, 'yyyy')-4 dat from dual
union select to_char(sysdate, 'yyyy')-3 dat from dual union select to_char(sysdate, 'yyyy')-2 dat from dual
union select to_char(sysdate, 'yyyy')-1 dat from dual union select to_char(sysdate, 'yyyy')-0 dat from dual
union select to_char(sysdate, 'yyyy')+1 dat from dual)
that returns you:
dat
---
2004
2005
2006
2007
2008
2009
2010
This will get you going, but its not the best solution!
Virgil Dodson
Thats a great answer Rakesh. If it makes sense for your application, you could also create your own JSP page that collects the parameter from the user.
skunkies
thanks for the tip. I'll think about this solution.