473,466 Members | 1,503 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Trouble retrieving value with request.form

I am trying to present a list of links on a page (Form) where each link
opens a different picture gallery. I have the Form page which contains the
links, a Gallery page, and several include files. Each include file displays
a different gallery.
Clicking on a link submits a value identifying the chosen gallery to the
Gallery page. The Gallery page accepts the value from the Form page and uses
it to call the appropriate include file.
The Post seems to have worked, the problem seems to be in retrieving the
value. The provided code for "gallery.asp" fails to execute properly- even
the line that displays "Test". I just can't seem to spot the error. Any
ideas?
TIA
Chris

FormPage:
<html>
<body>
<div id="Menu">
<script language=javascript>
document.write('<form name="frmGallery" method="post"
action="gallery.asp">');
document.write('<input type="hidden" name="GalName">');
tGall('Garden City', '2003REG-GrdnCity.inc');
tGall('River Hts', '2003REG-RvrHts.inc');
document.write('</form>');
</script>
</div>
</body>
</html>

function tGall(sGalName,sGalFile) {
var sJava = 'javascript:getGallery("' + sGalFile + '")';
document.write('<a href=' + sJava + '>' + sGalName + '</a><br>');
}

function getGallery ( SelectedGal ) {
document.frmGallery.GalName.value = SelectedGal ;
document.frmGallery.submit() ;
}

gallery.asp:
<script language=javascript>
document.write('Test');
var sName = request.form("GalName");
document.write(sName);
</script>

--
- -
Chris Shipley
==========================
Jul 19 '05 #1
1 1781
> document.write('<input type="hidden" name="GalName">');

You realize this doesn't have a value, right?
gallery.asp:
<script language=javascript>
document.write('Test');
var sName = request.form("GalName");
document.write(sName);
</script>


Client-side code doesn't know what Request.Form is. Aren't you getting an
error on this (object required or object expected)? Maybe you meant:

<script>
document.write('<%=Request.Form("GalName")%>');
</script>

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #2

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

Similar topics

2
by: Sean Dotson | last post by:
I have a form that passes variables to an asp file and then uploads a file. For some reason the request.form is not getting the info from the form. It's returning blanks. Any insight would be...
2
by: Chico | last post by:
Hi, I have the following code in my form: Response.Write("<form name='Testing'>"); Response.Write("<INPUT type=hidden id='Testing_txtbox' name='Testing_txtbox' value='a simple test'>");...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
10
by: Girish | last post by:
Hi Everyone, I am passing a form to a php script for further processing. I am able to retrieve the last value set for that given form variable using $variable=$_REQUEST;
2
by: Roshawn | last post by:
Hi, On my asp.net page I have an html form. I've set runat attribute to server and filled it with server controls. All settings are as I like them. So here's the problem: when I perform a...
8
by: Rabel | last post by:
I am new to asp and I am having a little trouble with the Request.form option. What I want to do is I have a dropdown box. <select name="selecter" class="text" id="selecter"> <option...
0
bmallett
by: bmallett | last post by:
First off, i would like to thank everyone for any and all help with this. That being said, I am having a problem retrieving/posting my dynamic form data. I have a form that has multiple options...
2
by: SV | last post by:
I have a login form with Remember me on this computer checkbox. I am creating cookie if checkbox is checked. My code is: If chk_remember.Checked = True Then Dim ckUserName As HttpCookie =...
3
by: ibeehbk | last post by:
Hi. I have a form made in xhtml. I test via vbscript to make sure none of the fields are empty and properly formatted (ie email). All the regular fields work. However, I have two drop down menus...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
1
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...
0
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...
0
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 projectplanning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.