Solved

Quotes problem

Posted on 2004-10-14
12
220 Views
Last Modified: 2008-02-01
 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, ???
0
Comment
Question by:dba123
12 Comments
 
LVL 6

Accepted Solution

by:
boblah earned 500 total points
ID: 12313236
Hi dba123,

you want:

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

Cheers!
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 12313250
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)
0
 
LVL 1

Author Comment

by:dba123
ID: 12313265
but why...how are the quotes working in this situation....how is ASP interpreting this particular quote set?
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 1

Author Comment

by:dba123
ID: 12313293
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)
0
 
LVL 1

Author Comment

by:dba123
ID: 12313299
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
0
 
LVL 23

Expert Comment

by:apresto
ID: 12313340
try using single quotes when inside a tag within an ASP tag:
%<

"<FORM name='name' action='...'>" & etc
0
 
LVL 1

Author Comment

by:dba123
ID: 12313347
we aren't using single quotes here.....I am keping to the standard.  I used to use single quotes also but now using double.
0
 
LVL 1

Author Comment

by:dba123
ID: 12313375
We are using Response.Write so we have to use double quotes...I'm sticking to Response.Write.
0
 
LVL 6

Assisted Solution

by:boblah
boblah earned 500 total points
ID: 12313376
dba123,

two sets of double quotes puts a single set of double quotes in the existing string.

One set of double quotes ends the string.

You have two sets to the left of the PID, when you actually need to close the string, and append the PID.

"<form action=""chav.asp?action=aupdated?" & PID & """ method=""post"" "

will produce

<form action="chav.asp?action=aupdated?XX" method="post"

(where PID = XX)

where

"<form action=""chav.asp?action=aupdated?"" & PID & """

will produce

<form action="chav.asp?action=aupdated?" & PID & "
0
 
LVL 6

Expert Comment

by:boblah
ID: 12313404
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)
0
 
LVL 1

Author Comment

by:dba123
ID: 12313436
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
0
 
LVL 1

Author Comment

by:dba123
ID: 12313531
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.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
An ASP query I cannot work out... 2 46
Auto Submit on dropdown box 3 74
Classic ASP application Will support SQL 2014 5 84
Question about ASP Including Files 6 58
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now