473,667 Members | 2,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

multiple image submit buttons in one form

Hi all
I have the following code:
I am trying to use the value of the image button to evaluate what plan the
user has chosen, i.e. it request("submit 1")="Basic", then the user chose
basic plan ...
But when I click one of the image button, the thing is different from what I
thought.

it seems that it has field name like submit1.x=24&su bmit1.y=10, looks like
the form submit swith the image button position values instead of the value
of the submit button itself. Am I crazy of doing this way? what should I do?
Thank you

<tr>
<td valign="bottom" style="height:2 60px;width:200p x;
background-image:url(image/select1_bg.png) ; background-position:bottom ;
background-repeat:no-repeat"><div align="center"
style="padding-bottom:15px;col or: #333333; font-weight:bold">To tal Rate
<%=FormatCurren cy(iBTotalDue)% ><br>
<input type="image" src="image/buynow_voyager. jpg" name="BasicPlan "
value="Basic" >
</div></td>
<td valign="bottom" style="height:2 60px;width:200p x;
background-image:url(image/select2_bg.png) ; background-position:bottom ;
background-repeat:no-repeat"><div align="center"
style="padding-bottom:15px;col or: #333333; font-weight:bold">To tal Rate
<%=FormatCurren cy(iPTotalDue)% ><br>
<input type="image" src="image/buynow_voyager. jpg" name="PlusPlan"
value="Plus"
</div></td>
<td valign="bottom" style="height:2 60px;width:200p x;
background-image:url(image/select3_bg.png) ; background-position:bottom ;
background-repeat:no-repeat"><div align="center"
style="padding-bottom:15px;col or: #333333; font-weight:bold">To tal Rate
<%=FormatCurren cy(iETotalDue)% ><br>
<input type="image" src="image/buynow_voyager. jpg" name="ElitePlan "
value="Elite" >
</div></td>
</tr>
--
Betty
Mar 20 '07 #1
4 6668
Hi Betty,

How are you doing.

As for the <input type="image" .../button, I think the value that will be
submited (related to each image button) is specific to browser. Based on my
test ,for IE7, it will submit the x, y position of the button, for firefox,
it will submit x,y postion in as well as the "value" attribute.

Therefore, for your scenario, I think you may consider a more flexible way
to distinct the submit from different image(or submit) button. For example,
you can use a hidden field to mark the clicked submit button and check at
server-side. Here is a FAQ article that demonstrate the similar approach:

#When I have multiple submit buttons, how do I tell which was clicked?
http://classicasp.aspfaq.com/forms/w...-buttons-how-d
o-i-tell-which-was-clicked.html

Hope this helps. If you have any other concerns or questions, please feel
free to let me know.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

=============== =============== =============== =====

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 20 '07 #2
Steven,
Thanks for the late reply and thank you so much for the help.
Yes, I did use some hidden fields to solve a similar problem in aother
program. But somehow this Javascript doesn't work in a Mac OS 9.0 with IE 5.x
installed as I noticed in my monitoring program, somehow customers with this
system and using IE 5.x fail to submit the request and I cannot figure out
why(but if firefox is installed or Mac OS 10.0 is installed, everything seems
fine.) I still cannot figure out what is the best way yet.
--
Betty
"Steven Cheng[MSFT]" wrote:
Hi Betty,

How are you doing.

As for the <input type="image" .../button, I think the value that will be
submited (related to each image button) is specific to browser. Based on my
test ,for IE7, it will submit the x, y position of the button, for firefox,
it will submit x,y postion in as well as the "value" attribute.

Therefore, for your scenario, I think you may consider a more flexible way
to distinct the submit from different image(or submit) button. For example,
you can use a hidden field to mark the clicked submit button and check at
server-side. Here is a FAQ article that demonstrate the similar approach:

#When I have multiple submit buttons, how do I tell which was clicked?
http://classicasp.aspfaq.com/forms/w...-buttons-how-d
o-i-tell-which-was-clicked.html

Hope this helps. If you have any other concerns or questions, please feel
free to let me know.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

=============== =============== =============== =====

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 9 '07 #3
Thanks for your followup Betty,

So the problem seems specific to that certain client box. Anyway, if you
need any help on ASP side programing, please feel free to post here.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 11 '07 #4
Steven,
Sorry for the type, what I was trying to say is "Sorry for the late reply
and ..."

Not "thanks for the late reply and ..." :+(
--
Betty
"c676228" wrote:
Steven,
Thanks for the late reply and thank you so much for the help.
Yes, I did use some hidden fields to solve a similar problem in aother
program. But somehow this Javascript doesn't work in a Mac OS 9.0 with IE 5.x
installed as I noticed in my monitoring program, somehow customers with this
system and using IE 5.x fail to submit the request and I cannot figure out
why(but if firefox is installed or Mac OS 10.0 is installed, everything seems
fine.) I still cannot figure out what is the best way yet.
--
Betty
"Steven Cheng[MSFT]" wrote:
Hi Betty,

How are you doing.

As for the <input type="image" .../button, I think the value that will be
submited (related to each image button) is specific to browser. Based on my
test ,for IE7, it will submit the x, y position of the button, for firefox,
it will submit x,y postion in as well as the "value" attribute.

Therefore, for your scenario, I think you may consider a more flexible way
to distinct the submit from different image(or submit) button. For example,
you can use a hidden field to mark the clicked submit button and check at
server-side. Here is a FAQ article that demonstrate the similar approach:

#When I have multiple submit buttons, how do I tell which was clicked?
http://classicasp.aspfaq.com/forms/w...-buttons-how-d
o-i-tell-which-was-clicked.html

Hope this helps. If you have any other concerns or questions, please feel
free to let me know.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

=============== =============== =============== =====

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.


Apr 13 '07 #5

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

Similar topics

5
4420
by: Matt | last post by:
How can I implement multiple buttons for a form like - submit, cancel, logout etc. Thanks. Matt
2
2282
by: Colin Steadman | last post by:
I have two buttons on my form and need to know which was clicked. If I setup the buttons like this: <input type="submit" value="submit" name="submit_to_array"> <input type="submit" value="submit" name="submit_to_db"> I can look in the Request.Form collection to see if submit_to_array or submit_to_db appears to determine which button was clicked. This works fine.
3
10142
by: Adam | last post by:
Hey guys, I've decided to stop banging my head against the wall and just ask you guys for the answer. I can't seem to find it. I have a form in which I have multiple submit buttons; only, I'm using button tags, not input tags to do it. It seems that IE6 is treating all the button elements as being successful on submit. This is, to say the least, surprising since the Spec is pretty clear that it should.
3
2559
by: D. Shane Fowlkes | last post by:
Sorry for the length of this post. I have created a rather complex form which has a header/line item (parent and child records) structure. It's for an intranet. A screenshot can be seen here: http://www.drpt.virginia.gov/temp1.gif All the fields on this form have validation controls on them so they can not submit the form unless all fields are completed and some fall within a specified numeric range. When the form first is loaded,...
5
2111
by: Lau Lei Cheong | last post by:
Hello, Let's say that I have multiple submit buttons on a form (imagebuttons actually, but documentations say that <input type=image> which a called image buttons should behave like submit buttons). How could I determine which submit button do I invoked by calling form.submit() in javascript? Thanks a lot. Regards,
8
5725
by: Adam | last post by:
Hey, I'm using JS to submit a form with image submit buttons, using the following code... (Page is here... http://www.cards2do.co.uk/addcard.php?card_id=292 ) ************************************************************************************** <form action="https://www.cards2do.co.uk/addcard.php" method="post"
5
2450
by: mayur_hirpara | last post by:
Hi, I have been developing web applications for a while now. However, as I was thinking through the architecture I really don't understand the "How server can identify between which buttons has made the postback request.???" for e.g. I have a webpage default.aspx. I place TWO or more server buttons on it. Create server-side event handlers for each of the buttons.
16
2861
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 whether or not they've hit enter: if(document.layers) {
3
4012
by: printline | last post by:
Hello All I have a form with multiple submit buttons, where i would like to open in a new window when hitting one of the submit buttons. Can't seem to figure this out according to the code i'm using. Could someone perhaps tell me what to do...??? Here is the code i'm using: <SCRIPT> function submitFunction(i) { if (i==1) document.shopform.action="http://www.printline.dk/webshop/upload.php"; if (i==2)...
0
8457
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8883
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8788
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8646
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6203
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5675
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2776
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
2
2013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1778
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.