473,545 Members | 289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image Button and Post Method Help

I'm trying to use an image as a submit button - I'm reading Sams Teach
Yourself HTML and the chapter on this doesn't show me the details on
how this is done - I mean I can't seem to see it or grasp how this
works?

I see the tag for the image and I assume I need a form get or post
line but how are the two connected so the clicking on the image button
activates the post method?

Thanks...

Jul 16 '05 #1
5 12573
RG

"Ralph Freshour" <ra***@primemai l.com> wrote in message
news:ek******** *************** *********@4ax.c om...
I'm trying to use an image as a submit button - I'm reading Sams Teach
Yourself HTML and the chapter on this doesn't show me the details on
how this is done - I mean I can't seem to see it or grasp how this
works?

I see the tag for the image and I assume I need a form get or post
line but how are the two connected so the clicking on the image button
activates the post method?

Thanks...

<input type="image" border="0" src="images/login.gif" alt="Trade Login">
RG


Jul 16 '05 #2

"Ralph Freshour" <ra***@primemai l.com> wrote in message:
news:ek******** *************** *********@4ax.c om...
I'm trying to use an image as a submit button - I'm reading Sams Teach
Yourself HTML and the chapter on this doesn't show me the details on
how this is done - I mean I can't seem to see it or grasp how this
works?

I see the tag for the image and I assume I need a form get or post
line but how are the two connected so the clicking on the image button
activates the post method?

Thanks...


I hope this will work for you:

<a href="javascrip t:document.form name.submit()">
<img src='button.gif ' alt='button' border=0></a>

-
Kindest Regards,
Olexiy Merenkov
http://www.merenkov.com/olexiy
Jul 16 '05 #3
I don't understand what this js code does:

<a href="javascrip t:document.form name.submit()">

Don't I need a method post statement in my form?
I have several graphical image 'buttons' - when the form is submitted
how will the called .php script know which 'button' was clicked on?
On Tue, 5 Aug 2003 13:04:27 +0300, "???????? ??????? ???????"
<al**@zaporizhs tal.com> wrote:

"Ralph Freshour" <ra***@primemai l.com> wrote in message:
news:ek******* *************** **********@4ax. com...
I'm trying to use an image as a submit button - I'm reading Sams Teach
Yourself HTML and the chapter on this doesn't show me the details on
how this is done - I mean I can't seem to see it or grasp how this
works?

I see the tag for the image and I assume I need a form get or post
line but how are the two connected so the clicking on the image button
activates the post method?

Thanks...


I hope this will work for you:

<a href="javascrip t:document.form name.submit()">
<img src='button.gif ' alt='button' border=0></a>

-
Kindest Regards,
Olexiy Merenkov
http://www.merenkov.com/olexiy


Jul 16 '05 #4
Ralph Freshour <ra***@primemai l.com> writes:
<al**@zaporizhs tal.com> wrote:
"Ralph Freshour" <ra***@primemai l.com> wrote in message:
I'm trying to use an image as a submit button - I'm reading Sams Teach
I hope this will work for you:
It doesn't work for me.
<a href="javascrip t:document.form name.submit()">
<img src='button.gif ' alt='button' border=0></a>


I don't understand what this js code does:

<a href="javascrip t:document.form name.submit()">


It, in browsers with Javascript enabled, possibly submits the form
where the opening <form> tag has the name attribute name="formname" .

In browsers with Javascript disabled it does absolutely nothing, apart
from really winding up the user when they discover the form won't
submit. This is a bigger problem with longer forms.

For a better solution, you should read
http://www.cs.tut.fi/~jkorpela/forms/index.html
and especially
http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html
Don't I need a method post statement in my form?
<form method="post" action="submitt othis.php">

You don't necessarily need it, forms *can* be submitted with 'get'
instead, though whether you *should* or not depends on what the form does.
I have several graphical image 'buttons' - when the form is submitted
how will the called .php script know which 'button' was clicked on?


http://ppewww.ph.gla.ac.uk/%7eflavell/www/trysub.html

--
Chris
Jul 16 '05 #5
OK, I got it to work and now when I click on one of my image 'buttons'
I can detect which one - however, now I'm reading and trying to see
how to call the correct php script based on what was clicked on.

On my home page I call via post method a dispatch.php script and in
that script I detect which button was clicked on - how do I just call
another php script? For example, if I click on Create I would need to
call the create.php script, if I click on Delete I need to call
delete.php

Thanks...
On Tue, 5 Aug 2003 08:46:32 -0700, "RG" <Me@NotTellingY a.com> wrote:

"Ralph Freshour" <ra***@primemai l.com> wrote in message
news:ek******* *************** **********@4ax. com...
I'm trying to use an image as a submit button - I'm reading Sams Teach
Yourself HTML and the chapter on this doesn't show me the details on
how this is done - I mean I can't seem to see it or grasp how this
works?

I see the tag for the image and I assume I need a form get or post
line but how are the two connected so the clicking on the image button
activates the post method?

Thanks...

<input type="image" border="0" src="images/login.gif" alt="Trade Login">
RG


Jul 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3488
by: Matt | last post by:
In the following code, I have 2 questions regarding submit button with image. 1) Does this code <input type="image" name="populate" src="populate.gif"> behave the same as an HTML submit button with image populate.gif? When I click p1 or p2 button, it will post the page to process.asp. 2) When I check the checkbox, I want the image in...
15
31776
by: Anand Ganesh | last post by:
HI All, I have an Image. I want to clip a portion of it and copy to another image. How to do this? I know the bounding rectangle to clip. Any suggestions please. Thanks for your time and help. Regards
4
2838
by: David W. Simmonds | last post by:
Is there a way I can have a button on a ASP.NET form that when clicked will allow the user to save the image to a file on the client side? I know that the user can simply rclick the image and select Save Target as..., but the button might be a more intuitive way.
7
11606
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard is proving to be more difficult. These pictureboxes are bound to an AccessDB. If the user wants to add an image, they select an image using an...
1
3400
by: Chuck Anderson | last post by:
I'm using a simple, pseudo progress bar. Very simply, I display a still image next to a form submit button until the user clicks on it, and then I change the image source to an animated version of the still image. Like so (I use php a lot) ... -- the submit button and still image -- <input type=submit name="update _stats" value="Update...
16
2842
by: browntown | last post by:
so I have this application I'm nearly finished with. The only thing the client has requested is the ability to submit the form by pressing "enter". I didn't think this would be a huge pain in the ass and the app will be used internally so I'm not too worried about users who aren't using javascript. I'm using the following javascript to detect...
2
2354
by: Poppa Pimp | last post by:
ImageResizer.php Image Resizer PLEASE HELP The URL of the page this is on in my site is http://poppa-pimps-wallpapers.com//ImageResizer.php You can click on browse and get image,but when you upload image it will go to another page and says ]((unable to create emp directory)) Here is a site to be able to see script actually work...
2
8785
by: smokeyd | last post by:
i am trying to create a simple image button rollover.. i have searched this forum and found a number of solutions but none seem to work. i am just trying to get the onmouseover to swap the image then restore when rolled out on a web page in vb.net. please can someone help?
1
4073
by: sourcie | last post by:
I am changing an existing quiz found on "JavaScriptKit.com Multiple Choice Quiz" I have an image. Instead of using the radio buttons with the normal true/false question, I want to place two hotspots on the image. One being correct(a) and the other incorrect(b). When the user clicks on the correct hotspot or place on the image, it should score...
0
7465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7752
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5969
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5325
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1878
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
701
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.