[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] mv_click
Ed LaFrance <edl@newmediaems.com> wrote...
}Your right. It seems that the input type 'image' does not recognize a name
}or value attribute - though browsers will be tolerant if you give if
}one. You will have to resort to a 'click_map' or a javascript trick (see
}the 'Checkout' button on the construct demo basket page) for this. Take a
}look at the docs on Forms (Interchange Templates is the correct section, I
}think) for info on click maps.
Which is where I will be going, but I thought I'd mention that the
following does not work.
}Try setting your mv_click value as a hidden field in the form. E.g.:
}
} <INPUT TYPE=hidden NAME=mv_click VALUE="Check for Number">
}
} Then name your mv_click block:
}
} [set Check for Number]
} [perl]
} # your perl code
} [/perl]
} [/set]
And, for completeness, in case you joined us more lately, the original
question...
}}
}} Subject: [ic] mv_click
}}
}} I am trying to adjust the main Search function in the Templates.
}}
}} I'd like, if the user enters a number, to limit the mv_search_field to just
}} the SKU field in that case.
}}
}} In Perl, it seems that is as simple as,
}} if ( $CGI_array->{'mv_searchspec'}[1] =~ /^\d+$/ ) {
}} $CGI_array->{'mv_search_field'}[1] = "sku";
}} }
}}
}} And it seems like I am supposed to use mv_click to make it happen.
}}
}} The problem is that the submit button is an image, and even when I name
}} it mv_click, it does not seem to execute the code wrapped in...
}} [set mv_click]
}} [perl]
}} Perl code mentioned above.
}} [/perl]
}} [/set]
}}
}} Am I correct in trying to set this up in the templates?
}} I would imagine pages/results.html would be too late to try to change
}} something like mv_search_field...
}}
}} Any help would be appreciated.
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users