Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 5th, 2006, 10:28 AM   #1
commodore
Programmer
 
Join Date: Nov 2005
Location: Estonia
Posts: 97
Rep Power: 0 commodore is an unknown quantity at this point
HTML Parameters to document.form.submit()

I have a submit similar to this <input type="submit" class="asdf"....
How can I use the "class=""" with javascript's document.form.submit() or do I have to use some other trick?
commodore is offline   Reply With Quote
Old Dec 5th, 2006, 10:59 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Why don't you just use the name or id?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Dec 5th, 2006, 11:58 AM   #3
commodore
Programmer
 
Join Date: Nov 2005
Location: Estonia
Posts: 97
Rep Power: 0 commodore is an unknown quantity at this point
What name? What id?

I now know that I need the "name=""" attribute included with it.

And I do type "document.myformname.submit()" not "document.form.submit()".
commodore is offline   Reply With Quote
Old Dec 7th, 2006, 5:28 AM   #4
BlackDal
Newbie
 
Join Date: Feb 2006
Posts: 12
Rep Power: 0 BlackDal is on a distinguished road
you want submit your form from jscript code?
then you don't need class property!(and you can't use it for submit method)
class is a UI property for HTML elements.
BlackDal is offline   Reply With Quote
Old Dec 7th, 2006, 5:49 AM   #5
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by BlackDal View Post
(and you can't use it for submit method)
Well, you can, but it's easier to use the id or form name.
Arevos is offline   Reply With Quote
Old Dec 9th, 2006, 11:16 AM   #6
BlackDal
Newbie
 
Join Date: Feb 2006
Posts: 12
Rep Power: 0 BlackDal is on a distinguished road
Quote:
Originally Posted by Arevos View Post
Well, you can, but it's easier to use the id or form name.
yes I know it! for submiting a form should use ID of form but no class property
class property say which class of styles (style tag or CSS file) should apply on element. when I don't understand why(and what) you use class property in submit method

Mr/Mrs commodore you can submit your form by a code like this:
document.FormName.ElementID.value = 'ElementValue';
//.. and for other form elements
document.FormName.method = 'Method Type';
document.FormName.action = 'Action Target';
document.FormName.submit(); //this method gives no parametere
BlackDal is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Basics of HTML Tutorial crawforddavid2006 HTML / XHTML / CSS 14 Jul 11th, 2006 7:40 AM
Basic HTML Tutorial - Reuben Keeney ReubenK HTML / XHTML / CSS 14 Mar 26th, 2006 5:50 AM
HTML =/= Programming Sane Coder's Corner Lounge 32 Mar 8th, 2006 2:50 AM
Python Client for an HTML Server sabz Python 4 Aug 18th, 2005 7:49 AM
Want to upload, show as HTML and other things.... Invisible Other Web Development Languages 4 Jun 19th, 2005 7:51 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:28 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC