|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Assignment doesnt assign???
My ASP page contains the following VBScript code:
<% zipCode = Request.Form("zip") %> <br>zip: <%= zipCode %>, rf: <%= Request.Form("zip") %> When I enter "abc" into the "zip" field on the form, I get the following output: zip: , rf: abc Why doesn't the first statement assign the "abc" string to the variable "zipCode"? What am I not seeing? -- Tim Slattery MS MVP(DTS) Slatter***@bls.gov Tim Slattery wrote:
Show quote > My ASP page contains the following VBScript code: Works fine for me. I get> <% > zipCode = Request.Form("zip") > %> <br>zip: <%= zipCode %>, rf: <%= Request.Form("zip") %> > > When I enter "abc" into the "zip" field on the form, I get the > following output: > > zip: , rf: abc > > Why doesn't the first statement assign the "abc" string to the > variable "zipCode"? What am I not seeing? > > -- > Tim Slattery > MS MVP(DTS) > Slatter***@bls.gov zip: abc, rf: abc using Windows XP Pro SP2, IIS 5, Firefox 1.5.0.5, IE6 and Opera. 8.51. How odd! -- Mike Brind
Show quote
"Tim Slattery" <Slatter***@bls.gov> wrote in message Is this all you have on the page and did you type it here or copy/paste?news:5h8h0297eima25agf0sdvf0g0ndddj2idq@4ax.com... : My ASP page contains the following VBScript code: : <% : zipCode = Request.Form("zip") : %> <br>zip: <%= zipCode %>, rf: <%= Request.Form("zip") %> : : When I enter "abc" into the "zip" field on the form, I get the : following output: : : zip: , rf: abc : : Why doesn't the first statement assign the "abc" string to the : variable "zipCode"? What am I not seeing? -- Roland Hall /* This information is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. */ Technet Script Center - http://www.microsoft.com/technet/scriptcenter/ WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp
Show quote
"Roland Hall" <nobody@nowhere> wrote: There's lots on the page, so *something* there must be non-kosher I>"Tim Slattery" <Slatter***@bls.gov> wrote in message >news:5h8h0297eima25agf0sdvf0g0ndddj2idq@4ax.com... >: My ASP page contains the following VBScript code: >: <% >: zipCode = Request.Form("zip") >: %> <br>zip: <%= zipCode %>, rf: <%= Request.Form("zip") %> >: >: When I enter "abc" into the "zip" field on the form, I get the >: following output: >: >: zip: , rf: abc >: >: Why doesn't the first statement assign the "abc" string to the >: variable "zipCode"? What am I not seeing? > >Is this all you have on the page and did you type it here or copy/paste? suppose, even though everything looks OK. Yes, I did copy and past this. The line that dumps the values on the page starts with "%>" and ends with "<%" because its a debug line that I stuck in the middle of server-side code. Regardless of what is going on elsewhere, I can't figure out why the assignment (apparently) doesn't happen. -- Tim Slattery Slatter***@bls.gov Tim Slattery wrote:
> Your best course of action is to create a small test page containing only > There's lots on the page, so *something* there must be non-kosher I > suppose, even though everything looks OK. Yes, I did copy and past > this. The line that dumps the values on the page starts with "%>" and > ends with "<%" because its a debug line that I stuck in the middle of > server-side code. > > Regardless of what is going on elsewhere, I can't figure out why the > assignment (apparently) doesn't happen. the bits needed to reproduce this particular symptom and post it here. -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" Bob Barrows [MVP] wrote:
Show quote > Tim Slattery wrote: I should have added:>> >> There's lots on the page, so *something* there must be non-kosher I >> suppose, even though everything looks OK. Yes, I did copy and past >> this. The line that dumps the values on the page starts with "%>" and >> ends with "<%" because its a debug line that I stuck in the middle of >> server-side code. >> >> Regardless of what is going on elsewhere, I can't figure out why the >> assignment (apparently) doesn't happen. > > Your best course of action is to create a small test page containing > only the bits needed to reproduce this particular symptom and post it > here. If you cannot reproduce your symptoms in the small test page, add stuff from your problem page until the symptom appears. -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" Tim Slattery <Slatter***@bls.gov> wrote:
Show quote >"Roland Hall" <nobody@nowhere> wrote: Found it. There was a tried-and-true, guaranteed to work ASP file> >>"Tim Slattery" <Slatter***@bls.gov> wrote in message >>news:5h8h0297eima25agf0sdvf0g0ndddj2idq@4ax.com... >>: My ASP page contains the following VBScript code: >>: <% >>: zipCode = Request.Form("zip") >>: %> <br>zip: <%= zipCode %>, rf: <%= Request.Form("zip") %> >>: >>: When I enter "abc" into the "zip" field on the form, I get the >>: following output: >>: >>: zip: , rf: abc >>: >>: Why doesn't the first statement assign the "abc" string to the >>: variable "zipCode"? What am I not seeing? being included at the top of this thing. The first statement in that file was "option explicit". So if I simply "dim" the variable "zipCode", it works fine. The server admins apparently have some option set - or not set - so that I get just about no ASP error messages, and I had *no* error message for this thing. -- Tim Slattery Slatter***@bls.gov
Show quote
"Tim Slattery" <Slatter***@bls.gov> wrote in message Good catch.news:hiuo021ggosbnguhovhc74n3c1gpsl3qtj@4ax.com... : Tim Slattery <Slatter***@bls.gov> wrote: : : >"Roland Hall" <nobody@nowhere> wrote: : > : >>"Tim Slattery" <Slatter***@bls.gov> wrote in message : >>news:5h8h0297eima25agf0sdvf0g0ndddj2idq@4ax.com... : >>: My ASP page contains the following VBScript code: : >>: <% : >>: zipCode = Request.Form("zip") : >>: %> <br>zip: <%= zipCode %>, rf: <%= Request.Form("zip") %> : >>: : >>: When I enter "abc" into the "zip" field on the form, I get the : >>: following output: : >>: : >>: zip: , rf: abc : >>: : >>: Why doesn't the first statement assign the "abc" string to the : >>: variable "zipCode"? What am I not seeing? : : Found it. There was a tried-and-true, guaranteed to work ASP file : being included at the top of this thing. The first statement in that : file was "option explicit". : : So if I simply "dim" the variable "zipCode", it works fine. The : server admins apparently have some option set - or not set - so that I : get just about no ASP error messages, and I had *no* error message for : this thing. -- Roland Hall /* This information is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. */ Technet Script Center - http://www.microsoft.com/technet/scriptcenter/ WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp |
|||||||||||||||||||||||