Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

response.write quotation mark

Status
Not open for further replies.

Damiona

Programmer
Mar 20, 2001
13
0
0
US
I am needing help. I am trying to use the response.write to write out a script on my page. here is the code
Response.write("document.postfrm.datacom" & temp1 & ".value ==" & data & vbcrlf) it is looping and writing the name of the control (temp1) this works fine, and the data variable is defined as a request. But when it writes it to the page the requested variable writes, but it says it is undefined because there are no quotes. how do i get it to also write the quotes?
 
i have done this but all it does is writes the & data & insted of the value
 
that's single quota then double quota & data double quota and single quota and double quota

also data is a variable
and temp 1 is also a variable

so you are trying to asp write
document.postfrm.datacom(some variable).value = 'some variable'

When you start a Response.Write you will start with a " then end with a "
Emagine Solutions, Inc.
 
well i fixed it here is the whole line of code
<%
Response.Write(vbcrlf & &quot;<script>&quot; & vbcrlf)
do until temp1 = datacomp+1
data = Request(&quot;datacom&quot; & temp1)
if data = &quot;&quot; then
data = &quot;Choose_Filters&quot;
end if
Response.write(&quot;document.postfrm.datacom&quot; & temp1 & &quot;.value =&quot; & chr(34) & data & chr(34) & &quot;;&quot; & vbcrlf)
temp1 = temp1+1
loop
Response.Write(&quot;</script>&quot; & vbcrlf)
%>

thank you for your help
 
try triple quotes like this:

Response.write(&quot;document.postfrm.datacom&quot; & temp1 & &quot;.value ==&quot;&quot;&quot; & data & &quot;&quot;&quot; & vbcrlf)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top