472,982 Members | 2,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,982 software developers and data experts.

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 1760
> 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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.