2 msgIssue with Catalyst:Can't locate object method'...
2 msgplease take me off your list
3 msgPost-login redirection problem
4 msgC::P::UploadProgress
6 msgOutput as XML
2 msgControlling Location of Footer On Page
10 msgFYI: Contracting possibilities
1 msgAdvanced role-based authorization
1 msgAdding Indexes To MySQL Database Tables in DBIC...
1 msgSolved - curious Catalyst/DBIx:Class bug
1 msgLooking for suggestions for CatalystX::Installer
11 msgSuggestions for CatalystX::Installer
11 msgIMPORTANT: To all Catalyst::Whatever Authors,pl...
11 msgsession in DB example in Catalyst book
5 msgCSS file how to?
5 msgVariable Catalyst seems to be undefined.
11 msgRequest paths - rejoining Chained actions toget...
7 msgUTF-16 surrogate message when writing binary da...

Multiple Submit Button
\ gaurav001 (8 May 2008)
. \ gaurav001 (8 May 2008)

Subject:Multiple Submit Button
Group:Catalyst
From:gaurav001
Date:8 May 2008


 

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>
&nbsp; <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
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst/
Dev site: http://dev.catalyst.perl.org/


© 2004-2008 readlist.com