Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
invisible submit button
Old 03-19-2008, 04:32 PM invisible submit button
Novice Talker

Posts: 5
Name: David van der Tuijn
Trades: 0
Hi,

I would like to submit a form with an invisible submit button,

And use the 'RETURN' button on the keyboard to submit the form.

However this does not work when using multiple input fields within Internet Explorer.

PHP Code:
<?PHP
print_r 
($_POST);
?>
HTML Code:
<h1>Does NOT work in Internet Explorer:</h1>
<form action="index.php" method="post">
 <input type="text" name="naam" />
 <input type="text" name="achternaam" />
 <input type="submit" name="submit" style="visibility: hidden" />
</form>
<hr />
<form action="index.php" method="post">
 <input type="text" name="straat" />
 <input type="text" name="huisnummer" />
 <input type="submit" name="submit" style="display: none" />
</form>
<h1>Does work in Internet Explorer:</h1>
<form action="index.php" method="post">
 <input type="text" name="naam" />
 <input type="submit" name="submit" style="visibility: hidden" />
</form>
<hr />
<form action="index.php" method="post">
 <input type="text" name="straat" />
 <input type="submit" name="submit" style="display: none" />
</form>
Any suggestions would be great!
TFaLCoN is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-19-2008, 05:14 PM Re: invisible submit button
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
You really shouldn't do that, it flies in the face of accessibility.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 03-19-2008, 05:17 PM Re: invisible submit button
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
I second that opinion. always have a submit button accesable by the user, much, much easier.
__________________

Please login or register to view this content. Registration is FREE
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 03-19-2008, 06:01 PM Re: invisible submit button
Novice Talker

Posts: 5
Name: David van der Tuijn
Trades: 0
But is it possible, with JavaScript?
TFaLCoN is offline
Reply With Quote
View Public Profile
 
Old 03-19-2008, 06:24 PM Re: invisible submit button
Average Talker

Posts: 16
Name: andy
Trades: 0
you could have an onkeydown function on the second input passing the event, which checks which key was pressed - if enter submit form
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
womble is offline
Reply With Quote
View Public Profile
 
Old 03-20-2008, 02:27 AM Re: invisible submit button
Novice Talker

Posts: 5
Name: David van der Tuijn
Trades: 0
HTML Code:
<input type="text" name="huisnummer" onKeyDown="if (window.event.keyCode==13) this.form.submit();" />
Almost there... why does it not work?!?
TFaLCoN is offline
Reply With Quote
View Public Profile
 
Old 03-20-2008, 08:29 AM Re: invisible submit button
Banned

Posts: 4
Name: alper
Trades: 0
you can do with javascript
emengen3 is offline
Reply With Quote
View Public Profile
 
Old 03-20-2008, 04:59 PM Re: invisible submit button
Novice Talker

Posts: 5
Name: David van der Tuijn
Trades: 0
Please explain how...

TFaLCoN is offline
Reply With Quote
View Public Profile
 
Old 03-23-2008, 09:17 AM Re: invisible submit button
Novice Talker

Posts: 5
Name: David van der Tuijn
Trades: 0
SOLVED!

Do not name your submit button 'submit'. Internet Explorer !@#$
TFaLCoN is offline
Reply With Quote
View Public Profile
 
Old 03-24-2008, 07:04 PM Re: invisible submit button
QiSoftware's Avatar
Skilled Talker

Posts: 74
Location: U.S.
Trades: 0
use a 1x1 clear graphic as the submit button.

Q...
__________________


Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
QiSoftware is offline
Reply With Quote
View Public Profile Visit QiSoftware's homepage!
 
Old 03-24-2008, 09:44 PM Re: invisible submit button
Average Talker

Posts: 22
Name: Jeremy Smith
Trades: 0
and that's why we're glad to see ff on the rise...
__________________

Please login or register to view this content. Registration is FREE
thewebdude76 is offline
Reply With Quote
View Public Profile Visit thewebdude76's homepage!
 
Old 02-28-2012, 03:46 AM Re: invisible submit button
Junior Talker

Posts: 1
Trades: 0
you can solve it with pure CSS

#submit{ width: 0px; height: 0px; border: none; padding: 0; margin: 0; }
harakternik is offline
Reply With Quote
View Public Profile
 
Old 02-28-2012, 08:11 AM Re: invisible submit button
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Quote:
Originally Posted by harakternik View Post
you can solve it with pure CSS

#submit{ width: 0px; height: 0px; border: none; padding: 0; margin: 0; }
You know, this thread is really, really old. Why did it up?
Besides, if you want to hide something you're probably better of setting "display: none;" (which will actually remove the elements from view) rather than making it very small.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is online now
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Reply     « Reply to invisible submit button
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.92865 seconds with 12 queries