Welcome Guest, Not a member yet? Register   Sign In
Retrieve a specific value from option value populated from database
#3

[eluser]CroNiX[/eluser]
What is the benefit of storing BOTH the branch name AND the id as the select VALUE? Just store the ID and display the name like Tpojka showed. That's all you'd want to store it in the db anyway (the ID), and then you don't need to explode() it.

I'm not clear on your actual question.

As far as how to get the VALUE or the TEXT using jQuery, you'd just

var text = $("#empName Confusedelected").text();
var value = $("#empName Confusedelected").val();


Messages In This Thread
Retrieve a specific value from option value populated from database - by El Forum - 09-09-2014, 10:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB