Link to home
Start Free TrialLog in
Avatar of dba123
dba123

asked on

Quotes problem

 Response.Write("<form action=""chav.asp?action=aupdated?"" & PID & """ method=""post"" name=""upload"" enctype=""multipart/form-data"" OnSubmit=""return CheckNewRequest1(); return ShowProgress();"">" & vbCrLf)


can somone explain what is wrong with my quotage here for the action and why.  The PID is not showing in the URL.  I guess in some situations I still don't get the quotes and why I need more than 2 quotes in some situations.  I know if I am concatinating on a variable that I need to end the string, put in & var & but don't know how to end the quotage...do I use 3, 4, ???
ASKER CERTIFIED SOLUTION
Avatar of boblah
boblah

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lee W, MVP
You have double-quotes beside the PID - I don't think that's right.  Remove one from the left side, see:

Response.Write("<form action=""chav.asp?action=aupdated?" & PID & """ method=""post"" name=""upload"" enctype=""multipart/form-data"" OnSubmit=""return CheckNewRequest1(); return ShowProgress();"">" & vbCrLf)
Avatar of dba123
dba123

ASKER

but why...how are the quotes working in this situation....how is ASP interpreting this particular quote set?
Avatar of dba123

ASKER

Ok, tried this but the PID still isn't showing a number....and I know the PID has a value if I print it to the screen.

Response.Write("<form action=""chav.asp?action=aupdated?" & PID & """ method=""post"" name=""upload"" enctype=""multipart/form-data"" OnSubmit=""return CheckNewRequest1(); return ShowProgress();"">" & vbCrLf)
Avatar of dba123

ASKER

this is before the form...the PID is returning a value if I print it to the screen

Set UploadProgress = Server.CreateObject("Persits.UploadProgress")
PID = "PID=" & UploadProgress.CreateProgressID()
barref = "framebar.asp?to=10&" & PID
try using single quotes when inside a tag within an ASP tag:
%<

"<FORM name='name' action='...'>" & etc
Avatar of dba123

ASKER

we aren't using single quotes here.....I am keping to the standard.  I used to use single quotes also but now using double.
Avatar of dba123

ASKER

We are using Response.Write so we have to use double quotes...I'm sticking to Response.Write.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
dba123,

Add the following line before the form write, and post the source of the resulting document for the form and the bit before.

Response.Write(PID)
Avatar of dba123

ASKER

yea, that's what I was saying...I was printing PID to the screen and it returned a valid number...outside of my sub since the 3 lines below were outside my sub so I thought that PID would then be global.

but what I had to do is move the lines below to be inside my sub.  for some reason, my sub wasnt' recognizing PID.

Set UploadProgress = Server.CreateObject("Persits.UploadProgress")
PID = "PID=" & UploadProgress.CreateProgressID()
barref = "framebar.asp?to=10&" & PID
Avatar of dba123

ASKER

yea, I always understood that "" = " and knew that " was an escape character but I guess sometimes it gets confusing...even when you've done it a million times.