Forum Moderators: open

Message Too Old, No Replies

jquery Dynamic selecting

         

nanat

2:23 am on Sep 9, 2009 (gmt 0)

10+ Year Member



im trying to make on select automatic change value.. this sample code..

var message = new Array();
message[1] = "1";
message[2] = "2";
message[3] = "3";
message[4] = "4";
message[5] = "5";
message[6] = "6";

$(document).ready(function(){
$("#item_select").change(function()
{
var message_index

message_index = $("#item_select").val();
if (message_index > 0)
$("#value").html("<input type='hidden' value='value' name='value' / >");
});
});

$Group=@$_GET["value"];
my problem is my how can i store a data with my name='value' field? i wrote some code but it doesn't work.. i begging you guys Tnx :D

whoisgregg

2:15 pm on Sep 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What data are you trying to store in that field?

nanat

12:27 am on Sep 10, 2009 (gmt 0)

10+ Year Member



my select statement

<select name="item_select" id="item_select">
<option value="1">uno</option>
<option value="2">Dos</option>
<option value="3">trees</option>
<option value="4">kuwatro</option>
<option value="5">Cinco</option>
</select>

whoisgregg

6:38 pm on Sep 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Perhaps this is what you are looking for?

$("#value").html("<input type='hidden' value='" + message_index + "' name='value' / >");

Or are you trying to retrieve the "uno," "dos," etc. portion of the select?