Here is the HTML that is being output by my asp page:
<a href='Files/category/computers/bigimages/computers-sub-monitors.jpg'
target='_blank' onMouseOver="wi ndow.status='Cl ick for a larger image of
MONITOR, 19\" CODAR EAGLE.';return true;"
onMouseOut="win dow.status='';r eturn true;">
<img width='98' height='96' border='0'
src='Files/category/computers/bigimages/computers-sub-monitors.jpg'
alt='MONITOR, 19" CODAR EAGLE'></a>
Notice the \" . AFAIK this escape character is what I am supposed to do to
use a double quote in a string in javascript. But my browser (IE 6.0)
doesn't like it - it says it is an "unterminat ed string constant".
If I change the double quote to a single quote - \' - then the browser works
as expected: it shows 19' in the status bar. But the monitor I am
describing is really only 19 inches, not 19 feet, so that's not a real
option.
So am I using the escape character wrong, or have I just run into a bug in
IE6? 4 21412
Alden Streeter wrote: Here is the HTML that is being output by my asp page:
<a href='Files/category/computers/bigimages/computers-sub-monitors.jpg' target='_blank' onMouseOver="wi ndow.status='Cl ick for a larger image of MONITOR, 19\" CODAR EAGLE.';return true;" onMouseOut="win dow.status='';r eturn true;"> <img width='98' height='96' border='0' src='Files/category/computers/bigimages/computers-sub-monitors.jpg' alt='MONITOR, 19" CODAR EAGLE'></a>
Notice the \" . AFAIK this escape character is what I am supposed to do to use a double quote in a string in javascript. But my browser (IE 6.0) doesn't like it - it says it is an "unterminat ed string constant".
If I change the double quote to a single quote - \' - then the browser works as expected: it shows 19' in the status bar. But the monitor I am describing is really only 19 inches, not 19 feet, so that's not a real option.
So am I using the escape character wrong, or have I just run into a bug in IE6?
I got it working by doing this:
<script type="text/javascript">
<!--
var msg='Click for a larger image of MONITOR, 19" CODAR EAGLE.'
-->
</script>
<a href='Files/category/computers/bigimages/computers-sub-monitors.jpg'
target='_blank'
onMouseOver="wi ndow.status=msg ;return true;"
onMouseOut="win dow.status='';r eturn true;">
<img width='98' height='96' border='0'
src='Files/category/computers/bigimages/computers-sub-monitors.jpg'
alt='MONITOR, 19" CODAR EAGLE'></a>
HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Thanks! That worked.
I still think it is a bug in IE6 though that the double quote escape
character didn't work, because it does work with the single quote.
"Bob Barrows" <re******@NOyah oo.SPAMcom> wrote in message
news:ug******** ******@TK2MSFTN GP09.phx.gbl... Alden Streeter wrote: Here is the HTML that is being output by my asp page:
<a href='Files/category/computers/bigimages/computers-sub-monitors.jpg' target='_blank' onMouseOver="wi ndow.status='Cl ick for a larger image of MONITOR, 19\" CODAR EAGLE.';return true;" onMouseOut="win dow.status='';r eturn true;"> <img width='98' height='96' border='0' src='Files/category/computers/bigimages/computers-sub-monitors.jpg' alt='MONITOR, 19" CODAR EAGLE'></a>
Notice the \" . AFAIK this escape character is what I am supposed to do to use a double quote in a string in javascript. But my browser (IE 6.0) doesn't like it - it says it is an "unterminat ed string constant".
If I change the double quote to a single quote - \' - then the browser works as expected: it shows 19' in the status bar. But the monitor I am describing is really only 19 inches, not 19 feet, so that's not a real option.
So am I using the escape character wrong, or have I just run into a bug in IE6?
I got it working by doing this:
<script type="text/javascript"> <!-- var msg='Click for a larger image of MONITOR, 19" CODAR EAGLE.' --> </script> <a href='Files/category/computers/bigimages/computers-sub-monitors.jpg' target='_blank' onMouseOver="wi ndow.status=msg ;return true;" onMouseOut="win dow.status='';r eturn true;"> <img width='98' height='96' border='0' src='Files/category/computers/bigimages/computers-sub-monitors.jpg' alt='MONITOR, 19" CODAR EAGLE'></a>
HTH, Bob Barrows
-- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
"Alden Streeter" <as************ ****@srca.net> wrote in message
news:es******** ******@TK2MSFTN GP12.phx.gbl... Here is the HTML that is being output by my asp page:
<a href='Files/category/computers/bigimages/computers-sub-monitors.jpg' target='_blank' onMouseOver="wi ndow.status='Cl ick for a larger image of MONITOR, 19\" CODAR EAGLE.';return true;" onMouseOut="win dow.status='';r eturn true;"> <img width='98' height='96' border='0' src='Files/category/computers/bigimages/computers-sub-monitors.jpg' alt='MONITOR, 19" CODAR EAGLE'></a>
Notice the \" . AFAIK this escape character is what I am supposed to do
to use a double quote in a string in javascript. But my browser (IE 6.0) doesn't like it - it says it is an "unterminat ed string constant".
If I change the double quote to a single quote - \' - then the browser
works as expected: it shows 19' in the status bar. But the monitor I am describing is really only 19 inches, not 19 feet, so that's not a real option.
So am I using the escape character wrong, or have I just run into a bug in IE6?
You are using the escape character wrong. This is not a bug. You need to
use " instead. As in:
....
MONITOR, 19" CODAR EAGLE';return true;"
See this portion of the HTML spec for more info on this: http://www.w3.org/TR/html4/appendix/...html#h-B.3.2.1
Regards,
Peter Foti
"Peter Foti" <pe****@systoli cnetworks.com> wrote in message
news:vs******** ****@corp.super news.com... "Alden Streeter" <as************ ****@srca.net> wrote in message news:es******** ******@TK2MSFTN GP12.phx.gbl... Here is the HTML that is being output by my asp page:
<a href='Files/category/computers/bigimages/computers-sub-monitors.jpg' target='_blank' onMouseOver="wi ndow.status='Cl ick for a larger image of MONITOR, 19\" CODAR EAGLE.';return true;" onMouseOut="win dow.status='';r eturn true;"> <img width='98' height='96' border='0' src='Files/category/computers/bigimages/computers-sub-monitors.jpg' alt='MONITOR, 19" CODAR EAGLE'></a>
Notice the \" . AFAIK this escape character is what I am supposed to do to use a double quote in a string in javascript. But my browser (IE 6.0) doesn't like it - it says it is an "unterminat ed string constant".
If I change the double quote to a single quote - \' - then the browser works as expected: it shows 19' in the status bar. But the monitor I am describing is really only 19 inches, not 19 feet, so that's not a real option.
So am I using the escape character wrong, or have I just run into a bug
in IE6?
You are using the escape character wrong. This is not a bug. You need to use " instead. As in:
... MONITOR, 19" CODAR EAGLE';return true;"
See this portion of the HTML spec for more info on this: http://www.w3.org/TR/html4/appendix/...html#h-B.3.2.1
Regards, Peter Foti
Thanks! That works without the hack. I knew it couldn't have been a bug in
IE ;-) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: sinister |
last post by:
The examples in the online manual all seem to use double quotes, e.g. at
http://us3.php.net/preg_replace
Why? (The behavior is different with single quotes, and presumably simpler
to understand.)
|
by: JZ |
last post by:
I hope there is someone out there that can suggest a solution to my
problem.
So here we go:
$command="myapp.exe -P d:\mydir\mySubDir";
echo "<td><a href=\"javascript:LaunchApp('$command')\">blah</a></td>";
This works fine. But when 'mySubDir' becomes 'my Sub Dir' myapp
requires quotes:
myapp.exe -P "d:\mydir\my Sub Dir"
|
by: Gary Mayor |
last post by:
Hi,
If I have the ' character within the javascript:pick command it doesn't
work. Is there some sort of way of escaping these characters like in
server side languages.
function pick(symbol) {
if (window.opener && !window.opener.closed)
window.opener.document.create.text1.value = symbol;
window.close();
}
|
by: Denis |
last post by:
I am trying to launch an .mdb file via javascript. I do not need to
do anything but open the application. It is able to open the
application but for some reason it opens and then closes. At first I
thought it may be a permission problem as far as writing the .ldb file
to disk, but I added every single user and gave them write permissions
to the folder and there is still no change.
Has anyone been able to get this to work?
Thanks in...
|
by: Lucian Sandor |
last post by:
Hello everyone,
While I'm a newbie here, I a not new to google, so please don't send
me back, it would be useless.
First of all I have to specify I am working on a Blogger.com template,
therefore anything I'll write should be stuck on a single file.
I thought about creating a funny pop-up.
<a href="javascript:myFunction();"...
that's because, as you will see, the code for the popup is pretty
complex.
I've insterted myFunction somewhere...
| |
by: Jeff S |
last post by:
In a VB.NET code behind module, I build a string for a link that points to a
JavaScript function. The two lines of code below show what is relevant.
PopupLink = "javascript:PopUpWindow(" & Chr(34) & PopUpWindowTitle & Chr(34)
& ", " & Chr(34) & CurrentEventDetails & ")"
strTemp += "<BR><A HREF='#' onClick='" & PopupLink & "'>" & EventName &
"</A><BR>"
The problem I have is that when the string variables or
contain a string with an...
|
by: korund |
last post by:
We can use special characters ('\n') to add line breaks in text in
JavaScript popup Alert boxes.
there is also few additional special characters:
\' single quote
\" double quote
\& ampersand
\\ backslash
\n new line
|
by: Peter Michaux |
last post by:
Hi,
I'm thinking about code minimization. I can think of a few places where
whitespace matters
a + ++b
a++ + b
a - --b
a-- -b
when a line ends without a semi-colon in which case the new line
|
by: JohnF |
last post by:
I have a function textag($expression){...}
whose $expression argument is a string that
can contain substrings like \alpha with one
backslash or like a&b\\c&d with two backslashes.
If I write <?php textag('\alpha'); ?with the
expression argument in single quotes, then that
works fine, and the single backslash isn't
interpreted or changed, which is what I want.
But if I write <?php textag('a&b\\c&d'); ?>
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |