Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Quotes problem

Posted on 2004-10-14
12
Medium Priority
?
225 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

604 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