DOWNLOADS EXAMPLES SKINS DOCS SUPPORT
 
 

Understanding Quotes

You can wrap the URL in 'single quotes' or "double quotes" -- The reason to use one over the other is dependant on whether the stuff inbetween the wrapping quotes contains a single or double quote.

For example, if you wanted to use a URL such as:

http://www.yoursite.com/bob's files/bob.jpg

... then you'd have to wrap the URL with double quotes because "bob's files" contains a single quote. If we wrapped the URL with single quotes, then the code would "breaK" because the apostrophe within "bob's files" would act as the last (or ending) quote:

Bad:
'http://www.yoursite.com/bob's files/bob.jpg'
Good:
"http://www.yoursite.com/bob's files/bob.jpg"

Likewise, if we wanted to use a double quote in the URL, we would have to wrap the URL with single quotes:

Bad:
"http://www.yoursite.com/bob said "hi"/ hello.jpg"
Good:
'http://www.yoursite.com/bob said "hi"/ hello.jpg'

I do not recommend ever using weirdo characters in any file name or folder name. Try and use only alpha-numeric characters.

The reason I went off on this long explanation is because sooner or later you are going to want to use a file with an apostrophe in your wasp code -- like when you try and reference an FLV video such as:

Bad:
waspPopup('bob's video.flv', 320, 240)
Good:
waspPopup("bob's video.flv", 320, 240)

It will invariably happen, and now you know why.

 

 

 

 

 

  ©Copyright Plaino LLC. All rights reserved.