Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submitting control values

Status
Not open for further replies.

anirban2k2001

Programmer
Aug 25, 2003
27
IN
Hi all!,

I have a combo box generated using TCL. The combo box control fetches values from a backend sqlite database. My requirement is that when the user selects a value from the combo, the selected value should be passed onto another .tcl page where a query is to be executed based on the combo box selection. For instance, my current .tcl page is page1.tcl and the query page is page2.tcl.

Any help in this regard will be highly appreciated.

Thanks in advance.
 
Take a look at trace for dynamic variable actions.

There are also probably tk specific event handlers based
on trace like accesses that I'm just not very familiar with.

Code:
trace add variable foo write doaction

proc doaction {var indice op} {
upvar $var local
         catch {
               if {$local < 1000} {
                   puts "Threshold not reached: [expr 1000 - $local]"
                   return 1
               }
               puts "Threshold exceded: $local"
               return -1
          }
}

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top