You need to sign in to do that
Don't have an account?

How to pass the value from JQuery result to Page Controller.
Hi,
I'm using the JQuery Autocomplete in a VF component. I need help with passing the selected value from the JQuery .result(function(event, data, formatted) funtion to the page controller. Please let me know how can i do this.
Thanks.....
I think, you can store your selected value on some hidden field on component and when you are clicking the Save button, using javascript set this value in a controller property.
I have tried doing that but that is not working....
try it with apex:input field not with apex:inputhidden
& if it work the hide the apex:inputtext using <div style="display:none"/>
It does not return a value if i use apex:inputText, but i do get a value if i use input type="text" and the value={!the_value_to_be _set} but this is not being set in the controller
when u click submit button call a javascript & in javascript using document.getelemetbyId get this input tyoe ="test" field & put it's values into apex:inputtext or u can use apex:param
Tried that as well...
<script>
function setName(){
var txt = document.getElementbyid("hiddenId").value;
alert("Text : " + txt);
document.getElementById("clnm").value = txt;
alert("In SetName : " + document.getElementById("clnm").value);
}
</script>
==================================
<apex:commandButton onClick="setName()" action="{!srch}" value="Find">
<apex:param value="{!clientName}" id="clnm"/>
</apex:commandButton>
===================================
Function and the commandbutton code.....but this is not working......