[ic] [item-options] tag?

Mike Heins interchange-users@interchange.redhat.com
Thu Jan 24 11:25:01 2002


Quoting john j (john711685@yahoo.com):
> 
> 
> >"how could I specify more options to the tag
> >[item-options] ? e.g. I'd like to add
> >onClick="javascript funtion".  I couldn't find
> >anywhere in the document."
> >
> >[item-options js="onChange=SomeJavaFunction"]
> >
> >For more information on this tag and what can be done
> >with it, read the
> >interpolate.pm file.
> 
> 
> I did try that earlier, but it doesn't work.  I'm
> using IC 4.8.2.  I'm building my site from foundation
> store. In the flypage.html there was
> 
> [item-options td=1 label=1 bold=1 price=1]
> 
> so I changed it to
> 
> [item-options td=1 label=1 bold=1 price=1
> js="onChange='myJS()'"]
> 
> the js tag isn't inserted into the HTML page.
> 

I think this is in a bug report/enhancement request. In any case,
it can be achieved with this patch:

--- /R/Interpolate.pm	Mon Jan 21 21:47:02 2002
+++ /tmp/Interpolate.pm	Thu Jan 24 11:22:47 2002
@@ -2017,6 +2017,8 @@
 							$sku,
 							'',
 							{ 
+								js => $opt->{js},
+								extra => $opt->{extra},
 								passed => $ref->[3],
 								type => $opt->{type} || $ref->[5] || 'select',
 								attribute => 'mv_sku',
@@ -2081,6 +2083,8 @@
 							$sku,
 							'',
 							{ 
+								js => $opt->{js},
+								extra => $opt->{extra},
 								passed => join(",", @out),
 								type => $opt->{type} || $ref->[8] || 'select',
 								attribute => 'code',
@@ -2129,6 +2133,8 @@
 								price => $opt->{price},
 								item => $item,
 								default => undef,
+								js => $opt->{js},
+								extra => $opt->{extra},
 							},
 							$item || undef,
 						);

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

"Even if you're on the right track, you'll get run over if you just
sit there." -- Will Rogers