HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

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 ASP Free Forums Sponsor:
  #1  
Old July 22nd, 2004, 02:46 PM
lkw lkw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 46 lkw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 45 m 44 sec
Reputation Power: 5
passing value through form

I have this button named "strUpdate" for updating cart, i am trying to pass the value of the button strUpdate to my new page so that i can perform an if/else test.... here is my code for the form, but somehow it just doens't read it when i am on the other page.

<input type="image" src="images/update_cart.gif" name="strUpdate" value="Update Cart" onClick="document.form1.submit();"> on the original page

when i try to call it on the other page
strTest = request.form("strUpdate")
response.write (strTest)
nothing shows up
and this code works for netscape and not IE...
anyhelp would be great! thanks

Reply With Quote
  #2  
Old July 22nd, 2004, 03:45 PM
mathew_conte's Avatar
mathew_conte mathew_conte is offline
this time, it's not kitty
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Ontario, Canada
Posts: 435 mathew_conte User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 2 h 23 m 25 sec
Reputation Power: 5
<form action="newPage.asp" Method="POST">

make sure your input object is in <form> tags
make sure your form tags look soemthing like this...

Reply With Quote
  #3  
Old July 23rd, 2004, 11:20 AM
lkw lkw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 46 lkw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 45 m 44 sec
Reputation Power: 5
it is...

any other suggestions?

Reply With Quote
  #4  
Old July 23rd, 2004, 11:28 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
Hi

Wouldn't an INPUT image send a coordinate? Try:

Code:
request.form("strUpdate.x")
MK

Reply With Quote
  #5  
Old July 23rd, 2004, 05:18 PM
lkw lkw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 46 lkw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 45 m 44 sec
Reputation Power: 5
it was sending the coordinates using .x but i want to submit the preset value that i gave for that button... is this possible using an image button in the form ?

basically what i am trying to get at is sending the preset value of the image button to a different page so that when they click that button, i can do a test on the preset value of the image button and NOT the value of the inputted values....

Reply With Quote
  #6  
Old July 27th, 2004, 08:58 AM
HelpingHand HelpingHand is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 1 HelpingHand User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool An answer to your question:

Quote:
Originally Posted by lkw
it was sending the coordinates using .x but i want to submit the preset value that i gave for that button... is this possible using an image button in the form ?

basically what i am trying to get at is sending the preset value of the image button to a different page so that when they click that button, i can do a test on the preset value of the image button and NOT the value of the inputted values....
Probably the easiest way to get around this is to use a workaround - use a href

<a href="myfile.asp ? myvalue = VALUE" ><img src="../myimage"></a>

Then (usually the top of your target page) use:

request.querystring("myvalue" )

Hope thats helps. HH.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > passing value through form


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT