Click here to Skip to main content
15,913,773 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: online billing for students !!! Pin
TigerNinja_22-Aug-02 11:55
TigerNinja_22-Aug-02 11:55 
GeneralForce At Bottom Of Page Pin
Nick Parker21-Aug-02 6:34
protectorNick Parker21-Aug-02 6:34 
GeneralRe: Force At Bottom Of Page Pin
Maciej Pirog21-Aug-02 7:43
Maciej Pirog21-Aug-02 7:43 
GeneralRe: Force At Bottom Of Page Pin
Jeremy Falcon21-Aug-02 8:02
professionalJeremy Falcon21-Aug-02 8:02 
GeneralRe: Force At Bottom Of Page Pin
Paul Watson25-Aug-02 7:16
sitebuilderPaul Watson25-Aug-02 7:16 
GeneralRe: Force At Bottom Of Page Pin
WebRavi25-Sep-02 2:20
WebRavi25-Sep-02 2:20 
GeneralRe: Force At Bottom Of Page Pin
Paul Watson25-Sep-02 2:27
sitebuilderPaul Watson25-Sep-02 2:27 
GeneralEmbedded quotes in HTML Pin
dandy7221-Aug-02 4:33
dandy7221-Aug-02 4:33 
I'm using VBScript to generate some formatting code in an HTML page. When I
MouseOver an area of the screen, I want to change some caption somewhere
(enclosed in a SPAN tag) in order to provide a description of what clicking
on that area will cause to happen (kinda like the text on a Windows app's
status bar). I'm displaying a GIF (strGIF) and a string (strDesc) in a
table (for proper formatting):

strOnMouseOver = "idDesc.innerHTML=" + chr(34) + _
"" + _
"" + _
"" + _
"" + _
"" + _
"" + _
"
" + strDesc + "
" + chr(34)

This string, in turn, is used in a table cell:

strCell = "" + _
"Click me" + _
""

[...]
Document.Write( strCell )
[...]


Here's the problem--I generally surround all attribute values by quotes
(either single or double, as it's generally good practice), however in this
case I had to remove them all in the strOnMouseOver string, because that
string itself eventually gets embedded within single quotes
(onmouseover='[whatever]' in strCell). If I add them back, the parser ends
up "seeing" something like:

onmouseover='idDesc.innerHTML=""'

...then of course the first quote surrounding the 0 above is paired up with
the very first quote (just before idDesc--it's intrepreted as the closing
quote).

I'm fortunate enough (for now) that this works simply by leaving out the
quotes, but that's just dumb luck. What if the path to the IMG above
contained a space? That'd throw everything off; whatever came after the
space would be interpreted as the next attribute. I *need* to have the IMG
tag's SRC attribute using quotes.

How can I do this? I've tried using ", chr(34) and chr(39) in various
combinations, to no avail. Is there any way in VBScript to escape single or
double quotes so it'd work in this context?

(the code pasted above might be a bit difficult to read using a
proportional-spaced font, so you might want to paste it back in something
like Notepad using a fixed-sized font)

GeneralRe: Embedded quotes in HTML Pin
Uritsukidoji22-Aug-02 6:29
Uritsukidoji22-Aug-02 6:29 
GeneralRe: Embedded quotes in HTML Pin
Richard Deeming22-Aug-02 8:03
mveRichard Deeming22-Aug-02 8:03 
General.msg problem with jmail Pin
TommyKnocker21-Aug-02 0:18
TommyKnocker21-Aug-02 0:18 
GeneralUser Control vs Custom Control Pin
MS le Roux20-Aug-02 23:09
MS le Roux20-Aug-02 23:09 
GeneralRe: User Control vs Custom Control Pin
Andy Smith21-Aug-02 9:15
Andy Smith21-Aug-02 9:15 
GeneralRe: User Control vs Custom Control Pin
MS le Roux21-Aug-02 20:05
MS le Roux21-Aug-02 20:05 
GeneralASP.NET & ASP Together Pin
Nick Parker20-Aug-02 5:56
protectorNick Parker20-Aug-02 5:56 
GeneralRe: ASP.NET & ASP Together Pin
Uritsukidoji22-Aug-02 6:39
Uritsukidoji22-Aug-02 6:39 
GeneralRe: ASP.NET & ASP Together Pin
TigerNinja_22-Aug-02 12:00
TigerNinja_22-Aug-02 12:00 
GeneralWeb based ftp or file editor Pin
benjymous20-Aug-02 5:05
benjymous20-Aug-02 5:05 
GeneralPassing Arrays Pin
Fayez Al-Naddaf20-Aug-02 3:06
Fayez Al-Naddaf20-Aug-02 3:06 
Generalget the selected text in the textarea Pin
rezaabsh19-Aug-02 6:02
rezaabsh19-Aug-02 6:02 
GeneralRe: get the selected text in the textarea Pin
Ryan Johnston19-Aug-02 9:08
Ryan Johnston19-Aug-02 9:08 
GeneralASP Graph Component Pin
Paul Watson19-Aug-02 5:29
sitebuilderPaul Watson19-Aug-02 5:29 
GeneralRe: ASP Graph Component Pin
Daniel Turini20-Aug-02 6:41
Daniel Turini20-Aug-02 6:41 
GeneralRe: ASP Graph Component Pin
Paul Watson20-Aug-02 6:54
sitebuilderPaul Watson20-Aug-02 6:54 
GeneralAutoComplete and the <asp:TextBox> tag Pin
Paul Riley19-Aug-02 3:00
Paul Riley19-Aug-02 3:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.