Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript" charset="utf-8">
- $(document).ready(function(myVar) {
- myVar = <?php echo ($this->Input->post('EUR')); ?>;
- if(typeof myVar != 'undefined') { // value from previous page exists
- var radioValues = [100, 50, 30, 15]; // all possible values
- if(jQuery.inArray(myVar,radioValues) > -1) { // is in array
- path= '#f5 input[value='+myVar+']';
- } else { // is not in array
- path= '#f5 input[value=anderer]';
- $('input[name=AndererBetrag]').val(myVar); // set text field val
- }
- $(path).attr('checked', true); //set checkbox
- }
- });
- </script>
Add Comment
Please, Sign In to add comment