Forum OpenACS Q&A: Re: Graphing for OACS?

Collapse
6: Re: Graphing for OACS? (response to 5)
Posted by Jamie Rasmussen on
There are many procs in OpenACS to help you pass variables between pages - look in https://openacs.org/api-doc/ for export_url_vars and ad_page_contract for instance, and grep through some of the packages you've installed for how they are used in practice.  In your case the link generated might look something like <IMG src="graph.tcl?table=foo">.
Collapse
7: Re: Graphing for OACS? (response to 6)
Posted by Jerome M on
no what i mean is pass an argument to a tcl script in a web page.. such as..

page1.adp
contains...
  <img src=graph.tcl @argv1@ @argv2@>

page1.tcl
contains...
  set argv "dyanmicvalue1"
  set argv "dynamicvalue2"

Collapse
9: Re: Graphing for OACS? (response to 7)
Posted by Jamie Rasmussen on
I think what you want is:

page1.adp contains...
  <img src=@graph_link@>

page1.tcl contains...
  set argv1 "dynamicvalue1"
  set argv2 "dynamicvalue2"
  set graph_link "graph.tcl?[export_url_vars argv1 argv2]"

You can see very similar code in various OpenACS packages.  For example, check out workflow-gif.tcl, case-state-graph.tcl, and case-state-graph.adp in packages/acs-workflow/www/