You need to sign in to do that
Don't have an account?
JamesSS
ids values isn't putting in Text boxes
My code:
<apex:page sidebar="false" showheader="false">
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" />
<script>
$(document).ready(function() {
$('input[id^="textInput"]').val('news here!');
});
</script>
<apex:form>
<apex:inputText id="textInput1"/>
<apex:inputText id="textInput2"/>
<apex:inputText id="textInput3"/>
</apex:form>
</apex:page>
In above code, on page load,jquery value isn't put in the textboxes.Is any error is in my code?
To select VF component using jquery you need ENDS WITH selector
Something like
Thanks Avi.Still its not working.
In my expected output is
all input texts with an attribute id that starts with 'textInput ' and puts text('My Value') in them.
But your above code is working only for id that starts with 'textInput1 '.Is it possible to get the above my expected output?
Well salesforce has its own algorithm to generate Ids. It generraly adds a prefix to the Id.
Use style class instead