Quotes within quotes 
Author Message
 Quotes within quotes

Hi all,

    I'm wondering how to do:

    variable = ""hello""

    type of assignment.  I can't seem to use '"hello"', as the ' becomes the
beginning of a rem statement, and any attempts at using either
""hello"" or ""hello"" have not worked.

    Basically, what I'm trying to do is write a link into a page that has an
onClick behavior added to it, so I need to mix and match my quotes so that
the parameters get passed properly.  Take the example below:

<a href="#"
onClick="MM_openBrWindow('anemia_main.htm','','width=788,height=569')"> 12
</a>

    I need to be able to wrap that into a variable somehow, but the double
and single quotes are messing me up.

    Any ideas would be greatly appreciated :)

    Dennis T.



Tue, 27 Jul 2004 07:07:28 GMT  
 Quotes within quotes
variable = """hello"""

variable = Chr(34) & "hello" & Chr(34)

q = Chr(34) '==> or q = """"
variable = q & "hello" & q

variable = quote("hello")

function quote(str)
  quote = Chr(34) & str & Chr(34)
end function

--
Michael Harris
Microsoft.MVP.Scripting
--

Quote:

> Hi all,

>     I'm wondering how to do:

>     variable = ""hello""

>     type of assignment.  I can't seem to use '"hello"', as the ' becomes the
> beginning of a rem statement, and any attempts at using either
> "&quot;hello&quot;" or "&#34;hello&#34;" have not worked.

>     Basically, what I'm trying to do is write a link into a page that has an
> onClick behavior added to it, so I need to mix and match my quotes so that
> the parameters get passed properly.  Take the example below:

> <a href="#"
> onClick="MM_openBrWindow('anemia_main.htm','','width=788,height=569')"> 12
> </a>

>     I need to be able to wrap that into a variable somehow, but the double
> and single quotes are messing me up.

>     Any ideas would be greatly appreciated :)

>     Dennis T.



Tue, 27 Jul 2004 09:35:39 GMT  
 Quotes within quotes
variable = unescape("%22hello%22")    ' ;-)

--
A full cup must be carried steadily. -English proverb

=-=-=
Steve
-=-=-



variable = """hello"""

variable = Chr(34) & "hello" & Chr(34)

q = Chr(34) '==> or q = """"
variable = q & "hello" & q

variable = quote("hello")

function quote(str)
  quote = Chr(34) & str & Chr(34)
end function

--
Michael Harris
Microsoft.MVP.Scripting
--

Quote:
> Hi all,

>     I'm wondering how to do:

>     variable = ""hello""



Tue, 27 Jul 2004 19:46:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. TDBGrid vs Oracle

2. DB Library Network - PROBLEMS!?

3. Quotes within Quotes

4. Help with quotes within quotes please

5. Shell function syntax - Quotes within quotes?

6. How to print quotes within quotes

7. Quotes within quotes

8. Quote within a quote

9. Double Quotes, Then Single Quotes, what comes next?

10. Double Quotes, Then Single Quotes, what comes next?

11. Double Quotes, Then Single Quotes, what comes next?

12. Double Quotes, Then Single Quotes, what comes next?

 

 
Powered by phpBB® Forum Software