Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old January 26th, 2004, 07:36 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,935 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 1 h 32 m 31 sec
Reputation Power: 3
Orkut
changing regular submit button for image

hey how do i change my basic submit button for an image i have created + is there a way to avoid using javascript?

Reply With Quote
  #2  
Old January 26th, 2004, 09:42 PM
DorkRawk DorkRawk is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 173 DorkRawk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to DorkRawk
RE: changing regular submit button for image

<input type="image" border=0 name="NAME" src="name.gif">
Creates a Submit button using an image

Reply With Quote
  #3  
Old January 27th, 2004, 12:29 AM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: changing regular submit button for image

DorkRawk!

You've mistaken a bit. That will send the user back to current page, but will not submit the data in a form like a submit button.

Cannot avoid javascript if you want to submit a form using image....

Reply With Quote
  #4  
Old January 27th, 2004, 11:27 AM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,935 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 1 h 32 m 31 sec
Reputation Power: 3
Orkut
RE: changing regular submit button for image

ok thanks for the advice.

Reply With Quote
  #5  
Old January 27th, 2004, 11:31 AM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: changing regular submit button for image

its REAL easy to do with javascript though. A simple OnClick="document.formname.submit();" and your off to the races!

Reply With Quote
  #6  
Old January 27th, 2004, 03:18 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,935 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 1 h 32 m 31 sec
Reputation Power: 3
Orkut
RE: changing regular submit button for image

ok becuase those standard submit buttons look ugly dont they. Thanks nawjei for telling me the javascript for it.

Reply With Quote
  #7  
Old January 27th, 2004, 03:24 PM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: changing regular submit button for image

But what if the user has disabled javascript in thier browsers? They cannot ever submit the form then... it is too risky in my point of view... specially to use javascript in a submit button

That's why I always prefer harmless stylesheets to make submit buttons handsome!!

Reply With Quote
  #8  
Old January 27th, 2004, 03:31 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: changing regular submit button for image

You know, Ive seen a lot of posts saying, "What if they disable javascript". While I completely agree to webpages being able to be seen by all, if you disable javascript in your browser, you have more things to worry about. A good portion of websites out there on the web use javascript to drive some portion of the website. Gotta make that jump sometime

Reply With Quote
  #9  
Old January 27th, 2004, 03:40 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,935 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 1 h 32 m 31 sec
Reputation Power: 3
Orkut
RE: changing regular submit button for image

yeh almost 90% of webusers have javascript enabled and some of them dont even know its there so dont know they can disable it even if they wanted too. The same applies to cookies.

Reply With Quote
  #10  
Old January 27th, 2004, 04:15 PM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: changing regular submit button for image

Code:
.buttons {
	font-family: "Verdana";
	font-size: 11px;
	color: "#FFFFFF";
	font-weight:bold;
	background-color: "#FF0000";
	border: 1px ridge #245979;
}

Reply With Quote
  #11  
Old January 27th, 2004, 08:14 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,935 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 1 h 32 m 31 sec
Reputation Power: 3
Orkut
RE: changing regular submit button for image

hmmm im trying to decide the best way stylesheets or javascript. Ill probably pick stylesheets or if i pick javascript i would use the <noscript> tag to display a different form. Anway thanks for your help.

Reply With Quote
  #12  
Old January 30th, 2004, 07:23 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: changing regular submit button for image

codeKadiya: what are you talking about?

i mean, i agree that css is the way to go, but <input type=image /> is a valid replacement for a submit button, and there is no wrong in using it.

i mean, it submits the form. where did you get the idea that it doesn't?

Reply With Quote
  #13  
Old January 30th, 2004, 09:20 AM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: RE: changing regular submit button for image

zombie,
I told DorkRawk that it does not make a submit button when you just use a script like this one below. He got to use onClick='..' and bit of javascript to make it a submit button, not only the image. If he use only the image without javascript it will not submit the form.
Quote:
<input type="image" border=0 name="NAME" src="name.gif">
Creates a Submit button using an image


Reply With Quote
  #14  
Old January 30th, 2004, 07:02 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: changing regular submit button for image

i repeat, that is SO NOT TRUE!

put it in a form, set the action attr of the form, put it on a page, anc click it.. see what happens!

or just copy/paste this:

Code:
<form action="test.php">
<input type="image" name="foo" src="button.jpg" />
</form>


and click it..


as i said it before, if you state something to be true, please first verify it...

Reply With Quote
  #15  
Old January 30th, 2004, 08:32 PM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: changing regular submit button for image

zombie is right about this, <input type="image" ...> is a substitute for the submit button. WebMonkey's HTML cheatsheet agrees too.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > changing regular submit button for image


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On