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.

JavaScript Forum


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



Reply
Check box that will submit a form
Old 08-17-2009, 01:45 PM Check box that will submit a form
Junior Talker

Posts: 3
Name: Tim
Trades: 0
I know this is probably the easiest question asked so far which will explain why I can't find the answer by trawling through this forum but,

I have a checkbox that I want to action a form with....

So with a little javascript I think the following form can be submitted?

<form name="weblogin" action="" method="post" onsubmit="return checkCheckBox(this)" style="padding: 0px; margin: 0px;">
<input type="hidden" value="wba_login" name="fname">
<input type="hidden" maxLength="32" size="15" name="username" value="guest">
<input type="hidden" maxLength="32" size="15" name="key" value="password">

Any help would be appreciated as I am sure theres an easy way to do this but its beyond me currently....
Jigsaw is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-17-2009, 01:54 PM Re: Check box that will submit a form
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
in the checkbox add an onclick event

HTML Code:
onclick="document.form.formname.submit();"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-18-2009, 07:44 AM Re: Check box that will submit a form
Junior Talker

Posts: 3
Name: Tim
Trades: 0
Many thanks Chris,

Incidentally I looked up your website as I may have some work if your interested but got;

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[MySQL][ODBC 3.51 Driver]Access denied for user 'candsadm'@'EUK11200' (using password: YES)
/include/common/inc_vars_database.asp, line 10


in my mozilla browser...
Jigsaw is offline
Reply With Quote
View Public Profile
 
Old 08-18-2009, 07:59 AM Re: Check box that will submit a form
Junior Talker

Posts: 3
Name: Tim
Trades: 0
Actually if you want to drop me a line via e-mail, <removed to prevent spam> I would appreciate it.

Thanks again,

Last edited by chrishirst; 08-18-2009 at 08:49 AM..
Jigsaw is offline
Reply With Quote
View Public Profile
 
Old 08-18-2009, 08:37 AM Re: Check box that will submit a form
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Yep we are moving servers and not fully synched up with the DBs as yet.

Clients get first priority on getting things fixed
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Check box that will submit a form
 

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.21739 seconds with 12 queries