?
Solved

Quotes problem

Posted on 2004-10-14
12
Medium Priority
?
224 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 6

Accepted Solution

by:
boblah earned 2000 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 96

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

801 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