ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

jquery.simple.select.extractor.js
Go to the documentation of this file.
1
6 if( !ultimix.select_extractor )
7 {
8 ultimix.select_extractor = {};
9 }
10
22 ultimix.select_extractor.SetData = function( Items , Value )
23 {
24 for( var i = 0 ; i < Items.length ; i++ )
25 {
26 if( jQuery( Items[ i ] ).prop( 'tagName' ) == 'INPUT' ||
27 jQuery( Items[ i ] ).prop( 'tagName' ) == 'TEXTAREA' )
28 {
29 jQuery( Items[ i ] ).val( Value );
30 continue;
31 }
32 if( jQuery( Items[ i ] ).prop( 'tagName' ) == 'SPAN' ||
33 jQuery( Items[ i ] ).prop( 'tagName' ) == 'DIV' ||
34 jQuery( Items[ i ] ).prop( 'tagName' ) == 'A' )
35 {
36 jQuery( Items[ i ] ).html( Value );
37 continue;
38 }
39 }
40 }
41
53 ultimix.select_extractor.ExtractSimpleSelectResult = function( AcceptorSelector , StatusSelector , DataSource )
54 {
55 var Radios = jQuery( 'input[name=' + DataSource + ']:radio' );
56
57 for( var i = 0 ; i < Radios.length ; i++ )
58 {
59 if( jQuery( Radios[ i ] ).attr( 'checked' ) )
60 {
61 var Items = jQuery( AcceptorSelector );
62 ultimix.SetData( Items , jQuery( Radios[ i ] ).attr( 'value' ) );
63
64 Status = jQuery( '[for=' + jQuery( Radios[ i ] ).attr( 'id' ) + ']' ).html();
65 Items = jQuery( StatusSelector );
66 ultimix.SetData( Items , Status );
67
68 return( true );
69 }
70 }
71
72 return( false );
73 }