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!

" " Problem

Status
Not open for further replies.

fatmbk

Technical User
Jul 11, 2002
29
0
0
GB
I have the following code (JavaScript):

Response.Write("<option value=&quot;(((tblCategory.Category)="+rs(x)+"))&quot;>"+rs(x)+"</option>");

Basically, it puts a query string into a HTML form <option> tag when the page is run. This is required to make the drop down box dynamic. However, its returns the correct data but puts " " around it:

<OPTION value='"(((tblCategory.Category)=Keyboard))"'>Keyboard</OPTION>

Is there anyway of getting rid of the 2 " " and the 2 ' '?
 
You want it to look like this:
Code:
<OPTION value=(((tblCategory.Category)=Keyboard))>Keyboard</OPTION>

???
 
I think i misunderstood what i wrote! I need to get rid of the 2 ' ' at the beginning and end of this:

<OPTION value='"(((tblCategory.Category)=Keyboard))"'>Keyboard</OPTION>

How do i do this because i havent put the 2 ' ' in the Javascript code?
 
&quot is within the Resonse.Write string so it's included...try replacing with double quotes...not too sure w/ javascript if it's going to require 2 or 3, but this is where the problem is....just work w/ the "" around the value=""


Response.Write("<option value=""(((tblCategory.Category)="+rs(x)+"))"";>"+rs(x)+"</option>");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top