JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

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 Dev Shed Forums Sponsor:
  #1  
Old June 30th, 2000, 12:47 PM
puq puq is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 3 puq User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to puq
Howdy all...

I'm using a form on a site, and one of the submit buttons calls a javascript function such as:
<input type=button name=submit_button onClick="function();">

My question is, I would like to change the image of this button. I've tried:
<input type=image src=images/picture name=submit_button onClick="function();">

This however doesn't seem to do the trick, without the type=button. If anyone can steer me in the right direction, or give me any help, I would be forever greatful...

Thanks

Reply With Quote
  #2  
Old July 1st, 2000, 01:04 AM
firepages's Avatar
firepages firepages is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: Perth West Australia
Posts: 757 firepages User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 18 m 32 sec
Reputation Power: 14
You can put an onSubmit capture in the form tag and place your code there.
<form onsubmit="function()">

------------------
Simon Wheeler
FirePages -DHTML/PHP/MySQL

Reply With Quote
  #3  
Old July 2nd, 2000, 12:38 PM
billyo billyo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 114 billyo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Internet Explorer recognizes a button tag. Just use it like this: <button>Button</button> The button tag supports most of the same attributes as other block elements, such as background images, size, visibility, etc... There's a really good tutorial about it at http://wsabstract.com/howto/button.shtml
(part 1 of 2). Sadly, netscape just ingnores the tag, so you have to embed hyperlinks in it to make it functional in that browser.

Reply With Quote
  #4  
Old July 4th, 2000, 03:59 PM
marina marina is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 4 marina User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi! You can simply place image as submit button before the end of form end tag.
<input type="image" src="filename.gif">
This will act as submit button and take you to the header action in the form. you can modify you header if you need by placing another function call in onSubmit.
Try this first.

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by puq:
Howdy all...

I'm using a form on a site, and one of the submit buttons calls a javascript function such as:
<input type=button name=submit_button onClick="function();">

My question is, I would like to change the image of this button. I've tried:
<input type=image src=images/picture name=submit_button onClick="function();">

This however doesn't seem to do the trick, without the type=button. If anyone can steer me in the right direction, or give me any help, I would be forever greatful...

Thanks
[/quote]



[This message has been edited by marina (edited July 04, 2000).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Javascript form button

Developer Shed Advertisers and Affiliates



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
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap