PDA

View Full Version : Getting value from a combobox and put it as a range for other form



runeforce
27 Apr 2013, 7:20 AM
hi guys i wanna ask you about this problem that i had
here is some of the script that i had


<script type="text/javascript">
var gridimgpath = 'themes/basic/images';
//alert($("jqContextMenu"));
jQuery("#VWWMENU").jqGrid(
{
url:'loadstatic.php?q=2&t=CORE_VW_WMENUS',
datatype: "json",
mtype: "POST",
colNames:['Id', 'Module'],
colModel:
[
{
name:'id',
index:'id',
width:7,
editable:true,
edittype:'text',
editrules:{required:true, maxvalue: , minvalue: },
editoptions:{maxlength:10, size:10},
formoptions:{rowpos:2, elmprefix:' '},
key:true
},
{
name:'modulename',
index:'modulename',
width:15,
editable:true,
edittype:'select',
editrules:{required:true},
editoptions:{maxlength:10, size:0, dataUrl:'combopub.php?t=MODULE'},
formoptions:{rowpos:1, elmprefix:' '}
}
</script>

here is the info that i can give :
- 'modulename' is a combobox while 'id' is normal text form
- the value that we get from the combobox will be the index to get a value from database (sqlserver and table "module")
- in this table "module" there is a column name "fromid" and "toid"
- the input for 'id' have to between the range of "fromid" to "toid"
- minvalue and maxvalue of 'id' is where you can put the highest or the lowest number so if a user input something greater than the maxvalue or less than minvalue in the 'id' form, there will be an error message showed up

now the problem is how can i do that?
how can i send the value of "fromid" and "toid" that i get by choosing the combobox to become the value that i had to put in maxvalue and minvalue?
would you guys kindly please give me some light to this matter?
i'm really a noob in javascript and even more noob about extjs so please give me some easy to understand answer

if you need more info to understand this so you can help solve my problem, please ask it
i'll be happy to give you the info that you need
thanks before for the answer

suzuki1100nz
27 Apr 2013, 1:02 PM
Really - your posting a jquery question on a Sencha forum?
Im sure someone can help

runeforce
28 Apr 2013, 7:22 PM
okay i'm sorry if i may get in the wrong place. as i said, i'm still a dumb noob for this javascript, jquery, and extjs thing. and i am using extjs, so i don't really know if this thing is a matter of javascript, or jquery, or extjs. so are you saying that it is a matter of jquery? and theres nothing that i can do with the extjs to solve this? your answer will be much appreciated

suzuki1100nz
28 Apr 2013, 7:38 PM
Hi runforce,

Don't be so hard on yourself - Ok so you've mixed the frameworks but the code you have posted is a jquery grid plugin and probably best posted on a jquery site.

runeforce
28 Apr 2013, 8:19 PM
hahahaha not that i'm too hard on myself but i am a really dumb noob on this thing :))

okay suzuki, thank you very much for your reply and your help :)
my biggest regards for you :)