I have this part of my page.
the select-box ID: `GROUPS`
the input-type-number ID: `yr1`
the input-type-text ID: `yr2` (readonly)
The selectbox(GROUPS)has more options under it. It has a query that depends on a field(grpID) with prefixes of A.Y. For example:
20152016AA1
20152016AA2
20152016AA3
yeah this is quite a long kind of ID but please excuse me for that (school kind of project, so needs academic year for primary key purposes). The problem here is that when the yr1
changes its value, I want the select box to change as well. I want it to requery like "Select * from table1 where ID like '%'.$yr1
.$yr2
.'%'"
yeah its a php code but I am currently under a javascript function(when yr1 changes) where I go like:
document.getElementbyID('GROUPS').innerHTML = 'I want to echo out options under a query which will require the values of yr
and yr2
for sql_query correctness'
so yeah, i suppose it's gonna be AJAX but I know nothing about it. I have tried a simple tutorial but still can't get me going. Please help me people :)