473,789 Members | 2,740 Online
Bytes | Software Development & Data Engineering Community
+ 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.as p" 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=javasc ript>
document.write( '<form name="frmGaller y" 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:get Gallery("' + sGalFile + '")';
document.write( '<a href=' + sJava + '>' + sGalName + '</a><br>');
}

function getGallery ( SelectedGal ) {
document.frmGal lery.GalName.va lue = SelectedGal ;
document.frmGal lery.submit() ;
}

gallery.asp:
<script language=javasc ript>
document.write( 'Test');
var sName = request.form("G alName");
document.write( sName);
</script>

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

You realize this doesn't have a value, right?
gallery.asp:
<script language=javasc ript>
document.write( 'Test');
var sName = request.form("G alName");
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.For m("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
2458
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 appreciated.... Here is the asp file <HTML> <HEAD> <TITLE>File Upload Results</TITLE>
2
1524
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'>"); Response.Write("</form>"); If I type the following in the very next line, I get a value of
6
3807
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 one day): \\FFDS24\ASP.NET Applications(_LM_W3SVC_1_Root_ATV2004)\Errors During Execution: 7 \\FFDS24\ASP.NET Apps v1.1.4322(_LM_W3SVC_1_Root_ATV2004)\Compilations
10
3701
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
1282
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 search for the first time, everything works perfectly. If I make any changes to the controls in the form and resubmit the page, nothing changes. That is, viewing the querystring, not a single value is altered despite my doing so in the form itself....
8
1718
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 value="page1.htm" selected>Page 1</option> <option value="page2.htm">Page 2</option> <option value="page3.htm">Page 3</option> </select> and I want to use a button that then will take you to the page you
0
3396
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 within options. I have everything being dynamically named from the previously dynamically named element. (I hope this makes sense.) I am not able to retrieve any of the dynamically created values. I can view them on the source page but can't pull them...
2
1202
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 = New HttpCookie("CTUserName") ckUserName.Value = Trim(txt_unm.Text) ckUserName.Expires = System.DateTime.Now.AddYears(4)
3
2213
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 that are SELECT elements (javascript-- one named arrivalcity and one named returncity). Basically they ask for a departure and return city and another menu appears with options based on that city. I can't seem to get the input from these fields in the...
0
9666
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10410
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
10200
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...
1
10139
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9020
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, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
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
5418
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4093
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
3
2909
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.