Re: OT CGI script with target in the body
- From: "Jesse F. Hughes" <jesse@xxxxxxxxxxxxx>
- Date: Wed, 17 Aug 2005 17:31:21 +0200
Gunnar Hjalmarsson <noreply@xxxxxxxxx> writes:
> Jesse F. Hughes wrote:
>> I have a form with two different submit buttons. When button A is
>> pressed, I want the new page opened in a new window, but not when
>> button B is pressed. Unfortunately, submit buttons don't seem to pay
>> attention to target attributes.
>
> Try onsubmit / windows.open.
But I have two submit buttons. I only want a new window when button A
is pressed. Isn't onsubmit a <form> attribute?
onSubmit
The user has pressed the submit button of a form. This
event happens just before the form is submitted, and
your function can return a value of false in order to
abort the submission. Valid for:
+ Forms only.
Oh wait. I get it. I can write a little javascript code to see which
button was pressed, right? I'll see if I can't do that.
But from my perspective, the less javascript the better. I like using
perl more than javascript. Not sure why. Maybe it's because I prefer
server-side scripting.
>> (Note that I've crossposted, since I'm not sure what group is
>> appropriate.)
>
> No Perl group is (the other group does not exist AFAIK). You should
> probably have asked in an HTML or JavaScript group.
Okay, thanks.
--
Jesse F. Hughes
"I want to really eat myself, so then I'll be a coalgebra."
-- Quincy P. Hughes, Age 3 1/2
.
- Follow-Ups:
- Re: OT CGI script with target in the body
- From: Gunnar Hjalmarsson
- Re: OT CGI script with target in the body
- References:
- Re: OT CGI script with target in the body
- From: Gunnar Hjalmarsson
- Re: OT CGI script with target in the body
- Prev by Date: CPAN, packaging tools, META.yml
- Next by Date: Re: CGI script with target in the body
- Previous by thread: Re: OT CGI script with target in the body
- Next by thread: Re: OT CGI script with target in the body
- Index(es):