• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 141
  • Last Modified:

Form variable from Flash not being read on ASP page.

I've got a variable called "ProductKey" being passed to an ASP page from a Flash movie. When I write

if LTrim(RTrim(Request.Form("ProductKey"))) = "7747" then
response.write "Hello"
else
response.write Request.Form("ProductKey")
end if

The response I get is "7747" written in a huge font.

So while the response should be "Hello," it isn't, yet the form variable that's being read is "7747." What am I doing wrong?
0
brucegust
Asked:
brucegust
  • 3
  • 2
1 Solution
 
thirdCommented:
it only means that there's some other characters on your request.form variable. try it like,

response.write "*" & Request.Form("ProductKey") & "*"


maybe there's an extra linefeed from the string (vbCrLf)

if Replace(LTrim(RTrim(Request.Form("ProductKey"))), vbCrLf, "") = "7747" then
response.write "Hello"
else
response.write "*" & Request.Form("ProductKey") & "*"
end if
0
 
brucegustAuthor Commented:
This is what I'm getting when I use the "replace" statement you suggested:

*
7747
*

It seems like we're on the right track as far as there being some carriage returns, but I'm not able to eliminate them. What am I missing?
0
 
thirdCommented:
have you replaced the linefeed characters by using the replace function?

if Replace(LTrim(RTrim(Request.Form("ProductKey"))), vbCrLf, "") = "7747" then
0
 
brucegustAuthor Commented:
Here's where I'm at:

if Replace(LTrim(RTrim(Request.Form("ProductKey"))), vbCrLf, "")="7747" then
response.write "Hello"
end if

I get nothing...

The only thing that strikes me as bizarre is when I do a response.write Request.Form("ProductKey"), I get 7747, so it sees the content but it's written in a monster size font as opposed to the default TimesNew Roman.

What do you think?
0
 
brucegustAuthor Commented:
I got rid of "Auto Kern" and that seemed to make all the difference.

Thanks!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now