
gmpatel001 at yahoo
May 8, 2008, 11:14 AM
Post #1 of 2
(56 views)
Permalink
|
Hello Gurus, So far I learnt Catalyst + FormBuilder + TT2 all by myself... When I realize use of *.fb file....Its so amazing Ok coming to the point...I have web page which contain 2 Submit Button.... I use overview.fb file like this submit: Enroll, Curriculum When I press Enroll Button...it should call 1 JavaScript function and For Curriculum Button ... there is another Javascript function !!!!!!!! So I defined overview.tt2 file like this ====================================== [% META title = "Overview" %] <script language="JavaScript"> <!-- function curriculumpage(form) { window.location='curriculum'; } function paymentpage(form) { window.location='payment'; } //--> </script> [% FOREACH field IN formbuilder.submit %] <center> <div id="submit" onClick="paymentpage(this.form)">[% field %]</div> <br> <br> <div id="submit1" onClick="curriculumpage(this.form)"></div> </center>[% END %] ============================================= I got both buttons on page...but [% field %] prints both buttons at same time..so doesn't matter i press "Enroll" or "Curriculum"....Both redirects to same page... So i Need VALUE of Submit Button....something like this ......... [% formbuilder.submit.value %] or I have to define overview.fb file like this. fields: enroll: value: Enroll type: button curriculum: value: Curriculum type: button Any IDEA..How can I get value of both buttons so i can redirect to different page ???????????????? Thanks in Advance -- View this message in context: http://www.nabble.com/Multiple-Submit-Button-tp17130149p17130149.html Sent from the Catalyst Web Framework mailing list archive at Nabble.com. _______________________________________________ List: Catalyst[at]lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
|