Actually, both type="button" and type="submit" are appropriate in this
case.

<input type="button" /> buttons will not submit a form - they don't do
anything by default. They're generally used in conjunction with
JavaScript as part of an AJAX application. Use this one to run the
script the closes the window.

<input type="submit"> buttons will submit the form they are in when the
user clicks on them. Use this one to do process a form or take you to
another page.

Kelly

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of James Perkins
Sent: Monday, November 16, 2009 9:25 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Easiest question ever posted?

To add to this, you also need to change the type of the submit button to
submit.

<input type="submit" value=I AGREE WITH THE ABOVE TERMS AND CONDITIONS-
SUBMIT" name="B2" />
--
James R. Perkins
http://twitter.com/the_jamezp


On Mon, Nov 16, 2009 at 07:07, <Michael_Schutte@xxxxxxxxxxxx> wrote:


<p style="text-align:center">
<input type="button" value="CANCEL REGISTRATION AND RETURN"
name="B1"
onchange="window.close();"> <!-- see note below -->
<input type="button" value="I AGREE WITH THE ABOVE TERMS AND
CONDITIONS
- SUBMIT" name="B2">
</p>



change the onsubmit to onclick.

onsubmit is an event for the form not the button.

see that I put quotes around you window.close() and put in a
semi-colon.
Your code would work as it was but what I gave is correct syntax.




--

Michael Schutte
Admin Professional



Bob Evans Holiday Farmhouse Feast, Serves 6-8 l $74.99
A complete homestyle meal TO GO, ready to heat at home, serve & enjoy!
Perfect for Thanksgiving, Christmas or holiday entertaining.
For more information, visit www.FarmhouseFeast.com



web400-bounces@xxxxxxxxxxxx wrote on 11/16/2009 09:59:07 AM:

All I want to do is put 2 buttons on the bottom of an html page and
have
them centered, and also have them do the action that I request.
After
hours
of reading and goggling I found that using absolute positioning was
the
way
to go. But I cannot get that to work. I tried putting the buttons
inside
of
a form, and then outside of a form. Here is the current version,
with no
positioning specified, outside of a form.

<p>
<input type="button" value="CANCEL REGISTRATION AND RETURN"
name="B1"
onsubmit=window.close()> (does not close the window)
<input type="button" value="I AGREE WITH THE ABOVE TERMS AND
CONDITIONS
-
SUBMIT" name="B2"></p>

I would like to have some of my natural color left in my hair before
I
turn
50 next month. Please help.

BTW, if you want your button to play music, spin and dance, you can
find
tons of help out there.

Thanks,

Tom Deskevich




--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.


--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.