Unable to Display Data

H

HartSA

Here is the relevent part of my code. I am trying to learn ASP.


<body>
<table border="0" cellspacing="0" cellpadding="0">
<form name="frmSearch1a" method="get">
<tr>
<td align=center>
<font style="font: 12px;"><b>Enter any part of the
occupation</font></b></td><tr><td>
<input type="text" name="fo" style="FONT-SIZE: 12px; width: 185px"
onchange="parent.Search.location.href='Search.asp?fo=' + this.value + '' ;">
</select>
</td>
</table>
</form>
</body>

This is the page I am trying to display the data. The name of this page is
Search.ASP

<body>
<%@ LANGUAGE="VBSCRIPT" %>
<!-- METADATA TYPE="typelib" FILE="c:\program files\common
files\system\ado\msado15.dll" -->
<%
occFilt = Request.QueryString("fo")
response.write (occFilt)
%>
</body>


The response.write command is not displaying any data. Am I close?

Thank you for your time.
 
M

Morris

HartSA said:
Here is the relevent part of my code. I am trying to learn ASP.


<body>
<table border="0" cellspacing="0" cellpadding="0">
<form name="frmSearch1a" method="get">
<tr>
<td align=center>
<font style="font: 12px;"><b>Enter any part of the
occupation</font></b></td><tr><td>
<input type="text" name="fo" style="FONT-SIZE: 12px; width: 185px"
onchange="parent.Search.location.href='Search.asp?fo=' + this.value + '' ;">
</select>
</td>
</table>
</form>
</body>

This is the page I am trying to display the data. The name of this page is
Search.ASP

<body>
<%@ LANGUAGE="VBSCRIPT" %>
<!-- METADATA TYPE="typelib" FILE="c:\program files\common
files\system\ado\msado15.dll" -->
<%
occFilt = Request.QueryString("fo")
response.write (occFilt)
%>
</body>


The response.write command is not displaying any data. Am I close?

Thank you for your time.


Remove "parent.Search." from
onchange="parent.Search.location.href='Search.asp?fo=' + this.value + '' ;">

As an aside, your html is badly formed. Your <table> and <form> tags
overlap, as do your <font> and <b> tags.

Morris
 
H

HartSA

Thanks but that didn't work.
I still can't display the data on that page (Search.ASP). Anything else
that I can try?

Thanks for the info on the code being a little a skew, I normally don't
worry about cleaning it up until I am ready to post the site.
 
M

Morris

What happens instead? And why are you using a javascript onchange event
instead of a submit button?

Morris
 
H

HartSA

The text goes away and nothing is displayed. I believe I already tried the
submit button already and that didn't work either. I am at a loss. What do
you recommend.
 
H

HartSA

I am using the onchange event because I want to use the data "FO" in a
particular frame on my page.
 
M

Morris

HartSA said:
I am using the onchange event because I want to use the data "FO" in a
particular frame on my page.

Here's the code that works on my machine. Perhaps you can match it
against yours to see if there are any differences?

Page1.htm
<HTML>
<body>
<form name="frmSearch1a" method="get">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align=center>
<font style="size: 12px;"><b>Enter any part of the
occupation</b></font>
</td>
</tr>
<tr>
<td>
<input type="text" name="fo" style="FONT-SIZE: 12px; width: 185px"
onchange="location.href='Search.asp?fo=' + this.value + '' ;">
</td>
</tr>
</table>
</form>
</body>
</HTML>

Search.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<HTML>
<body>
<%
occFilt = Request.QueryString("fo")
response.write (occFilt)
%>
</body>
</HTML>

Morris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top