asp ?
- Started
- Last post
- 11 Responses
- CX
Im doing a small project in ASP but have never used it before. Noone else here knows it either.
Anyone know why my error still says:
Microsoft VBScript compilation (0x800A03F9)
Expected 'Then'Here is the line of code:
(I hope this works when I post it)
Why would it still say Expected 'Then'?
- CX0
Damn let me try again.
If response.write isObject((request.form("program... Then
- protoculture0
did you leave out an "End"
- CX0
No I have the code I posted wraped in the % signs a block of html code and then End If wrapped in the % signs.
- unformatted0
make a text file of your code and link that so we can see.
- unknown0
CX,
If isObject((request.form("p
rogram"))) Thenyour code...
End If
I don't know why you are using Response.Write in your IF statement..Response.Write is used to output your code vars, results and so on in the browser. The VBScript syntax for conditional statements is:
If 'something' Then
...code
End IfCheers.
- CX0
Here you go
- CX0
http://www.mindground.com/aspcod…
Sorry I only know CF and have only seen VB as of yesterday.
- CX0
Thanks Boz I took off the Response.Write and it works. I may have more ?s later thanks guys.
- iodine740
The If conditional doesnt' make sense.
Response.Write doesn't evaluate to TRUE or FALSE. If you just take out the Response.Write it should work. Now I'm not sure if it'll work the way you want it to, but it will work.
The way I read what you are doing is that if the the form field "Program" is an object then output the Paragraph and Form. Which I can see making sense... the only thing I'm not sure of is your use of isObject. The only reason I say that is because, in my 5 years of ASP, I've always seen the Form value either checked for an empty string or against NULL, to see if it has a value (or is there). The only time I can ever think of seeing an Object coming from a Form post would be if it was a file upload, in which case I've always seen an intermediary object being used (like ASPSoft's upload objects or SA Fileup) instead of the Request object.
- CX0
Oh OK someone on the net mentioned isObject being comparable to CFs isDefined.
Ill try that. I tried earlier but had the form variable syntax wrong.My first goal is to have them select the program type, refresh the page and have a case switch to customize one section of the form according to what they selected.
- CX0
Im using VBScript but I realized the action page that already done but needs to be modified is in Jscript. Can I use both in separate blocks on one page.
I dont even want to learn microsofts version of JavaScript. Whats the point.