This project is read-only.

Retreiving Value from Javascript function

Feb 20, 2009 at 11:15 PM

I am trying to write a function to be used in validation.  Unfortunately, I can't seem to get the value for the flexbox.


<

 

script type="text/javascript">
  $(document).ready(function() {
    f
unction validate_fb(src, arg) {
      arg.IsValid = ($('#fb').flexbox.value.length >0);
      return arg.IsValid
   
}
  }); //doc ready
</script>

I've tried...
 
$('#fb').value
$('#fb').flexbox.value
$('#fb_input').value

and nothing helps.  Can anyone offer some assistance?

 

Feb 27, 2009 at 6:06 PM
Edited Feb 27, 2009 at 6:13 PM

As a temporary workaround, you can use this:

$('#fb_hidden').val()
 
I will add a function to jquery.flexbox.js to retrieve the current value:

$.fn.getValue = function() {
    return $('#' + this.attr('id') + '_hidden').val();
}

Then, you will be able to use $('#fb').getValue()

Thanks,
Noah

Feb 27, 2009 at 6:08 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.