473,569 Members | 2,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request.Form(va r) empty with IE, works fine with Firefox. Help please.

Hi,

I've been trawling the web for answer to my problem with no luck
although I'm hardly alone it seems!

Below is the generated source for an ASP page that posts a value called
'album' to another ASP page. The other page retrieves the value with
Request.Form('a lbum'); On Firefox this works fine every time. On IE6, I
always get nothing. I'm pretty sure it's the posting side that is at
fault, so that's what I've shown here. Oh, I tried Request.QuerySt ring
too and again, fine on Firefox, nothing on IE6.

Any help would be much appreciated.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>Galler y</title>
<!--mstheme-->
<link rel="stylesheet " type="text/css"
href="_themes/poetic2/poet1011.css">
<meta name="Microsoft Theme" content="poetic 2 1011, default">
</head>
<body>
<form name='albumsele ct' action="gallery _intro.asp" method="post"
target="intro">
<CENTER><h2>ALB UMS</h2></CENTER><hr><br>
<CENTER><inpu t name='album' type=image src='photogalle ry/Test
One/Title.jpg' value='photogal lery/Test One'
onClick='submit ();'></CENTER>
<CENTER>Test One Photos</CENTER><br><hr> <br>
<CENTER><inpu t name='album' type=image src='photogalle ry/Test
Two/Title.jpg' value='photogal lery/Test Two'
onClick='submit ();'></CENTER>
<CENTER>Test Two Photos</CENTER><br><hr> <br>
<CENTER><inpu t name='album' type=image src='photogalle ry/Test
Three/Title.jpg' value='photogal lery/Test Three'
onClick='submit ();'></CENTER>
<CENTER>Test Three Photos</CENTER><br><hr> <br>
</form>
</body>
</html>

Regards,

Dave

Sep 1 '06 #1
9 7016
Can you give your ASP code? Also, what's "submit()?" An <input
type="image"wil l submit the form when clicked already.

Ray at work

"Dave" <da**@seafarete ch.co.ukwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Hi,

I've been trawling the web for answer to my problem with no luck
although I'm hardly alone it seems!

Below is the generated source for an ASP page that posts a value called
'album' to another ASP page. The other page retrieves the value with
Request.Form('a lbum'); On Firefox this works fine every time. On IE6, I
always get nothing. I'm pretty sure it's the posting side that is at
fault, so that's what I've shown here. Oh, I tried Request.QuerySt ring
too and again, fine on Firefox, nothing on IE6.

Any help would be much appreciated.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>Galler y</title>
<!--mstheme-->
<link rel="stylesheet " type="text/css"
href="_themes/poetic2/poet1011.css">
<meta name="Microsoft Theme" content="poetic 2 1011, default">
</head>
<body>
<form name='albumsele ct' action="gallery _intro.asp" method="post"
target="intro">
<CENTER><h2>ALB UMS</h2></CENTER><hr><br>
<CENTER><inpu t name='album' type=image src='photogalle ry/Test
One/Title.jpg' value='photogal lery/Test One'
onClick='submit ();'></CENTER>
<CENTER>Test One Photos</CENTER><br><hr> <br>
<CENTER><inpu t name='album' type=image src='photogalle ry/Test
Two/Title.jpg' value='photogal lery/Test Two'
onClick='submit ();'></CENTER>
<CENTER>Test Two Photos</CENTER><br><hr> <br>
<CENTER><inpu t name='album' type=image src='photogalle ry/Test
Three/Title.jpg' value='photogal lery/Test Three'
onClick='submit ();'></CENTER>
<CENTER>Test Three Photos</CENTER><br><hr> <br>
</form>
</body>
</html>

Regards,

Dave

Sep 1 '06 #2
Dave wrote:
Hi,

I've been trawling the web for answer to my problem with no luck
although I'm hardly alone it seems!

Below is the generated source for an ASP page that posts a value
called 'album' to another ASP page. The other page retrieves the
value with Request.Form('a lbum'); On Firefox this works fine every
time. On IE6, I always get nothing. I'm pretty sure it's the posting
side that is at fault, so that's what I've shown here.
If so, a client-side newsgroup would have been more appropriate (ASP only
concerns server-side activity). But, read on ...
Oh, I tried
Request.QuerySt ring too and again, fine on Firefox, nothing on IE6.

Any help would be much appreciated.
In the future, when posting html, remove everything that's not related to
reproducing the problem, please. For example, we have no access to your
style sheets, etc. so there's no need to show us those tags. Further: you
have three image inputs with the same name. Does the problem only occur when
you have more than one input with the same name?

Here is my attempt to reproduce your problem (and yes, I did test the
difference between one and more than one input):
<%@ Language=VBScri pt %>
<%
if Request.Form.Co unt0 then
Response.Write "Request.Form(" "album.x"") contains<br>"
Response.Write Request.Form("a lbum.x") & "<br>"
Response.Write "Request.Form(" "album.y"") contains<br>"
Response.Write Request.Form("a lbum.y") & "<br>"
else
Response.Write "No Form variables"
end if
%>
<HTML>
<BODY>
<form name='albumsele ct' method="post">
<CENTER><h2>ALB UMS</h2></CENTER><hr><br>
<CENTER><inpu t name='album' type=image src='images/vba3626.gif'
value='photogal lery/Test One'
onClick='albums elect.submit(); '></CENTER>
<CENTER>Test One Photos</CENTER><br><hr> <br>
<CENTER><inpu t name='album' type=image
src='images/vba3626_2.gif' value='photogal lery/Test Two'
onClick='albums elect.submit(); '></CENTER>
<CENTER>Test Two Photos</CENTER><br><hr> <br>
<CENTER><inpu t name='album' type=image
src='images/vba3626.gif' value='photogal lery/Test Three'
onClick='albums elect.submit(); '></CENTER>
<CENTER>Test Three Photos</CENTER><br><hr> <br>
</form>
</BODY>
</HTML>
Everything works as expected. What are you doing differently? Are you
attempting to get the value propert? If so, the online docs at msdn state:

The x-coordinate is submitted under the name of the control with .x
appended, and the y-coordinate is submitted under the name of the control
with .y appended. Any value property is ignored.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Sep 1 '06 #3
"Dave" <da**@seafarete ch.co.ukwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Hi,

I've been trawling the web for answer to my problem with no luck
although I'm hardly alone it seems!

Below is the generated source for an ASP page that posts a value called
'album' to another ASP page. The other page retrieves the value with
Request.Form('a lbum'); On Firefox this works fine every time. On IE6, I
always get nothing. I'm pretty sure it's the posting side that is at
fault, so that's what I've shown here. Oh, I tried Request.QuerySt ring
too and again, fine on Firefox, nothing on IE6.

Any help would be much appreciated.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>Galler y</title>
<!--mstheme-->
<link rel="stylesheet " type="text/css"
href="_themes/poetic2/poet1011.css">
<meta name="Microsoft Theme" content="poetic 2 1011, default">
</head>
<body>
<form name='albumsele ct' action="gallery _intro.asp" method="post"
target="intro">
<CENTER><h2>ALB UMS</h2></CENTER><hr><br>
<CENTER><inpu t name='album' type=image src='photogalle ry/Test
One/Title.jpg' value='photogal lery/Test One'
onClick='submit ();'></CENTER>
<CENTER>Test One Photos</CENTER><br><hr> <br>
<CENTER><inpu t name='album' type=image src='photogalle ry/Test
Two/Title.jpg' value='photogal lery/Test Two'
onClick='submit ();'></CENTER>
<CENTER>Test Two Photos</CENTER><br><hr> <br>
<CENTER><inpu t name='album' type=image src='photogalle ry/Test
Three/Title.jpg' value='photogal lery/Test Three'
onClick='submit ();'></CENTER>
<CENTER>Test Three Photos</CENTER><br><hr> <br>
</form>
</body>
</html>
Strip it down and you have:
<input name='album' type=image
three times!

Which is your
Request.Form('a lbum');
supposed to reference?

Of course, were seeing the generated code not the ASP page...

Strip the calling and called pages down to the minimum
then test them; if there's still a problem then post them.
Sep 1 '06 #4
Hi Ray,

Thanks for responding. The ASP is below. As another exercise I did a
view source from both firefox and IE6 to compare them. Whether this is
merely a difference in the two "view source" implementations I don't
know but in the Firefox one, the single quotes around 'album' had been
changed to double quotes ("album") and the strings for img src had been
'translated', ie the spaces changed to %20.

eg: Firefox says:

<center><inpu t name="album" src="photogalle ry/Test%20One/Title.jpg"
value="photogal lery/Test One" onclick="submit ();"
type="image"></center>

but IE6 says:

<center><inpu t name='album' src='photogalle ry/Test One/Title.jpg'
value='photogal lery/Test One' onclick=submit( );' type='image'></center>

Probably a red herring but I thought I'd mention it.

The ASP code for this is:

------------------------------------------------------------------
<%@ Language=JavaSc ript %>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>Galler y</title>
<meta name="Microsoft Theme" content="poetic 2 1011, default">
</head>

<body>

<form name='albumsele ct' action="gallery _intro.asp" method="post"
target="intro">
<CENTER><h2>ALB UMS</h2></CENTER><hr><br>

<SCRIPT LANGUAGE="JavaS cript" RUNAT="Server">

var fso, f, fc, fs, so, tl;
var fullpath, fsr;

fso = new ActiveXObject(" Scripting.FileS ystemObject");

fullpath = Server.MapPath( "photogallery") ;

f = fso.GetFolder(f ullpath);
fc = new Enumerator(f.Su bFolders);

for (; !fc.atEnd(); fc.moveNext())
{
fs = fc.item().Path;
so = fso.OpenTextFil e(fs + "/Title.txt", 1, 0);
tl = so.ReadLine();
so.Close();

fs = fc.item().Name;
fsr = "photogalle ry/" + fs.toString();
Response.Write( "<CENTER><i nput name='album' type=image src='" + fsr +
"/Title.jpg' value='" + fsr + "' onClick='submit ();'></CENTER>");
Response.Write( "<CENTER>" + tl + "</CENTER><br><hr> <br>");
}

Response.Write( "</form></body></html>");

</SCRIPT>
------------------------------------------------------------------

I'm now really hoping you look at this and go "Ah Ha!!!".

As for the submit(): According to my documentation, its required to
make the form submit when you click the pic. Perhaps it one of those
optional bits.

Dave

Ray Costanzo [MVP] wrote:
Can you give your ASP code? Also, what's "submit()?" An <input
type="image"wil l submit the form when clicked already.

Ray at work
Sep 1 '06 #5
I've posted the ASP now. I tried it with just one entry instead of
three. Same problem.

With Firefox, the Request.Form correctly references the instance of
'album' that was clicked.

Thanks for the thought though.

Dave

McKirahan wrote:
Strip it down and you have:
<input name='album' type=image
three times!

Which is your
Request.Form('a lbum');
supposed to reference?

Of course, were seeing the generated code not the ASP page...

Strip the calling and called pages down to the minimum
then test them; if there's still a problem then post them.
Sep 1 '06 #6
Dave wrote:
On Firefox this works fine every time. On IE6, I always
get nothing.

<input name='album' type=image ...>
If you simply tried this, you would understand the issue entirely:

Response.Write( Request.Form)

In short, INPUT TYPE="image" elements send .x and .y values. According to
MSDN, VALUE is not a valid property of this element:

http://msdn.microsoft.com/workshop/a...nput_image.asp
http://msdn.microsoft.com/workshop/a...es/value_1.asp

This appears to conflict somewhat with the HTML specification:
http://www.w3.org/TR/html401/interac...ef-value-INPUT

If you want to know which image input was clicked, you need unique names,
and then you can do this:

JScript:
if (Request.Form(" input_name.x"). Count) ...

vbscript:
If Request.Form("i nput_name.x").C ount 0 Then ...

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Sep 1 '06 #7
"Dave" <da**@seafarete ch.co.ukwrote in message
news:11******** **************@ 74g2000cwt.goog legroups.com...
I've posted the ASP now.
[snip]

Where?
Sep 1 '06 #8
I wrote:
According to MSDN, VALUE is not a valid property of this element:

http://msdn.microsoft.com/workshop/a...nput_image.asp
http://msdn.microsoft.com/workshop/a...es/value_1.asp

This appears to conflict somewhat with the HTML specification:
http://www.w3.org/TR/html401/interac...ef-value-INPUT
I should add that this behavior (not sending the name-value pair) remains
the same under IE7.

And to clarify my comment about a conflict with the specification, I think
Microsoft and Mozilla interpret the recommendation differently. There is
wriggle room, too, since the recommendation does not define image controls
as Control Types, which directly refutes the notion that they could be
Successful Controls:

http://www.w3.org/TR/html401/interac....html#h-17.2.1
http://www.w3.org/TR/html401/interac...html#h-17.13.2
FWIW, Opera behaves like IE on this matter.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Sep 1 '06 #9
Mr Anderson, you're a star. Many many thanks.

Dave

Dave Anderson wrote:
I wrote:
According to MSDN, VALUE is not a valid property of this element:

http://msdn.microsoft.com/workshop/a...nput_image.asp
http://msdn.microsoft.com/workshop/a...es/value_1.asp

This appears to conflict somewhat with the HTML specification:
http://www.w3.org/TR/html401/interac...ef-value-INPUT

I should add that this behavior (not sending the name-value pair) remains
the same under IE7.

And to clarify my comment about a conflict with the specification, I think
Microsoft and Mozilla interpret the recommendation differently. There is
wriggle room, too, since the recommendation does not define image controls
as Control Types, which directly refutes the notion that they could be
Successful Controls:

http://www.w3.org/TR/html401/interac....html#h-17.2.1
http://www.w3.org/TR/html401/interac...html#h-17.13.2
FWIW, Opera behaves like IE on this matter.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Sep 1 '06 #10

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

Similar topics

1
1769
by: Ralph Freshour | last post by:
I have two dropdown list: frm_cbo_top frm_cbo_bottom I have an OnChange="submit_form();" in each of these dropdown lists - the javascript does a form.submit() call
3
2343
by: NotGiven | last post by:
Page1 has a form that calls Page2. The beginning of Page2: <? php session_start(); $s=$_POST; session_register("s"); ?> in the middle of Page2 I have a form varaible: <?php echo $_POST; ?> <?php echo $_SESSION; ?> The form var displays the first time the page loads. The session var
12
1767
by: Matthew Crouch | last post by:
Please give this code a look. I'm not a JS programmer at all, but I can't figure out why identical lines in essentially the same context work in one place but in the other, it causes the entire interface to disappear. This is for a tabbed interface, and I'm just trying to pass the options_total value around among the JS fxns. I get no error...
4
6992
by: liizuka | last post by:
Hi... I have a problem with request.form and noticed that it works fine if the action references the localstart.asp page. It doesn't work if it references any other page. Even with a pretty simple code, I could not get it to work: <html> <body> <form action="testao.asp" method="post"> Your name: <input type="text" name="fname" size="20"...
1
1225
by: Samuel | last post by:
Why my Crystal Report form works on the machine I installed VB.NET, not works on the machine without VB.NET? Thanks.
3
1519
by: Bob | last post by:
I've got a fair amount of Javascript coding that works great in IE and Opera, but is completely ignore in Firefox and Netscape. See: www.bridgemate.net/BeachWatchers/Regis.htm Right after the <FORM NAME="Regis".....tag I have <div onClick='getRadios(document.Regis)'> which sends control to getRadios() when the user clicks anywhere on...
0
961
by: Mark Sandfox | last post by:
I have a simply email form using smtpmail.send. This form works on 99% of computers but does not work on my customers computer. He gets the generic runtime error. Again when tested on every other computer i can find it works perfectly. Could this be a user configuration issue (i.e. plugin conflict or option conflict)? Thank you in advnace...
3
2400
by: xred11 | last post by:
Hi, Just switched to a new server, code work fine for 2 years, now on Win2003sp2, OK in IE6, Firefox, but ONLY 1 of 2 IE7's. One works, one doesn't. Fussed for a long time - boils down to this- I seem to get empty request variables from the user: html (one of several variations): <html> <body> <form action="formsget.asp" method="post">...
2
1850
by: bredsblocker09 | last post by:
i have created this upload form that will upload an image file... this works fine in both IE and firefox. I then created an identical form that will upload mp3 files. however this will work in IE but not in Firefox. I have searched around and can not find a solution to why bigger files do not work with Firefox. here is the upload form: ...
0
7694
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
7609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8118
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...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6278
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...
0
5217
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
3651
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...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
936
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.