hi all,
I'm beginning to think about a thing i need to implement in my web page.
i have asked a lot of question in the past days, and now it's the end of
my work, after this thing i must add.
i think that it will be really easier if i show you the page :
it's a query wizard where people select conditions to create their own SQL
queries.
as you can see on the page, when you add a condition it appears in a list
where you can remove it if you want. now I'd like to add a functionality :
want I'd like is (first part only : Select your conditions) : when a user
click on one of the conditions in the list, the 3 boxes upon the list will
show the value that where selected to create the condition, and the user
will be able to update this condition, in stead of 1: deleting it 2:
creating a new one.
i don't really know how to do.
Showing the values that where selected for the conditions, i think it's
not the harder and will be able to do this. the harder is after : how to
update it ?
i do have all my conditions in an array ( storeQuery[number]= new
Array(cond,document.forms[0].operation[document.forms[0].operation.selectedIndex].value,document.forms[0].value.value,
logical, document.forms[0].condition.selectedIndex,
document.forms[0].operation.selectedIndex) )
i thought i could add to this array the number of the index of each select
box selected to create and with an onclick event call a function that
retrieves those values and set them back to the select boxes.
then how could i know if i must add or update the values in my array ?
any suggestions will be appreciated, i want to that i don't expect you to
give me the whole answer (of course), just a beginning of solution would
be already perfect, then i would be able to work on my own.
ho, just to situate the goal of this web page, that's the first part,
their will be after, behind, a servlet under a websphere IBM server that
will do the rest. i just need help for javascript, as JS is a language
well done but if you don't know how things works, you can't guess them.
sorry for my coarse English,
regards,
ps: it's my first JS app so please be comprehensive
I'm beginning to think about a thing i need to implement in my web page.
i have asked a lot of question in the past days, and now it's the end of
my work, after this thing i must add.
i think that it will be really easier if i show you the page :
it's a query wizard where people select conditions to create their own SQL
queries.
as you can see on the page, when you add a condition it appears in a list
where you can remove it if you want. now I'd like to add a functionality :
want I'd like is (first part only : Select your conditions) : when a user
click on one of the conditions in the list, the 3 boxes upon the list will
show the value that where selected to create the condition, and the user
will be able to update this condition, in stead of 1: deleting it 2:
creating a new one.
i don't really know how to do.
Showing the values that where selected for the conditions, i think it's
not the harder and will be able to do this. the harder is after : how to
update it ?
i do have all my conditions in an array ( storeQuery[number]= new
Array(cond,document.forms[0].operation[document.forms[0].operation.selectedIndex].value,document.forms[0].value.value,
logical, document.forms[0].condition.selectedIndex,
document.forms[0].operation.selectedIndex) )
i thought i could add to this array the number of the index of each select
box selected to create and with an onclick event call a function that
retrieves those values and set them back to the select boxes.
then how could i know if i must add or update the values in my array ?
any suggestions will be appreciated, i want to that i don't expect you to
give me the whole answer (of course), just a beginning of solution would
be already perfect, then i would be able to work on my own.
ho, just to situate the goal of this web page, that's the first part,
their will be after, behind, a servlet under a websphere IBM server that
will do the rest. i just need help for javascript, as JS is a language
well done but if you don't know how things works, you can't guess them.
sorry for my coarse English,
regards,
ps: it's my first JS app so please be comprehensive