473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Problem with "escaped characters" not all double quotes show up?

$tdsubclass=<<<bumelum
<td><a href="http://www.ygabel.php/$artnr[$arayartnrcounter]"
="" onmouseout="
function onmouseout(event) {
window.status = "Done";
return true;
}
" onmouseover="
function onmouseover(event) {
window.status = "http://www.fup.dk";
return true;
}
"> <!--target="_Self"-->
bumelum;

When I print this the double quotes after Done" and after dk" are
missing???

I have also tried with escaped characters in double quotes

Any suggestions?

Jul 17 '05 #1
9 2648
I have also treid

$tdsubclass="
<td><a
href=\"http://d1995732.u48.surftown.dk/andersen/bygtabel.php/".$artnr[$arayartnrcounter]."\"
=\"\" onmouseout=\"
function onmouseout(event) {
window.status = \"Done\";
return true;
}
\" onmouseover=\"
function onmouseover(event) {
window.status = \"http://www.watski.dk/andersensk\xF8despil\";
return true;
}
\"> <!--target=\"_Self\"-->
";

same result

Jul 17 '05 #2


ma************@gmail.com wrote:
$tdsubclass=<<<bumelum
<td><a href="http://www.ygabel.php/$artnr[$arayartnrcounter]"
="" onmouseout="
function onmouseout(event) {
window.status = "Done";
return true;
}
" onmouseover="
function onmouseover(event) {
window.status = "http://www.fup.dk";
return true;
}
"> <!--target="_Self"-->
bumelum;

When I print this the double quotes after Done" and after dk" are
missing???


Think about how you're quoting.

You have onmouseout <double quote to start string>. The double quote
before the word Done closes that quote. I'm surprised you didn't get
any errors with this construct. Does it work if you write a test HTML
page?

Here's a test script that I wrote that seems to fix you're problem:

<?
$artnr = array('testing123');
$arayartnrcounter = 0;

$tdsubclass="
<td><a
href=\"http://www.ygabel.php/$artnr[$arayartnrcounter]\"
=\"\" onmouseout=\"
function onmouseout(event) {
window.status = 'Done';
return true;
}

\" onmouseover=\"
function onmouseover(event) {
window.status = 'http://www.fup.dk';
return true;
}

\"> <!--target=\"_Self\"-->
";
echo '<pre>'.htmlentities($tdsubclass,ENT_QUOTES).'</pre>';

?>

I got rid of the heredoc syntax and just made it into a string with
escaped double quotes and some single quotes.

Ken

Jul 17 '05 #3
Many thanks for the suggestion, but jave apperently need the double
qutes to work. I don't understand why it takes the double qute on start
of mouse out as start of string, they are all escaped.

Mads

Jul 17 '05 #4
ma************@gmail.com wrote:
Many thanks for the suggestion, but jave apperently need the double
qutes to work. I don't understand why it takes the double qute on start
of mouse out as start of string, they are all escaped.

Mads


Mads,

Did you try Ken's suggestion? It's correct and it works.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 17 '05 #5
Hi

Ok, what I need for the java to do is to hide the real link, when I
treid the suggestion of Ken it just showed the real link. Why that is I
do not know.

However I got it to work with this code, and I am now facing a new
problem, how to make it xhtml 1.0 validate. - all suggestions are
welcome.

But if anybody had anymore insight as to why it did not work, and why
Kens does, I am very interrested because I woul like to understand what
I did wrong.

$tdsubclass="<td class=\"sup\"><a
href=\"http://bygtabel.php/$artnr[$arayartnrcounter]\"
onMouseOver=\"window.status =
'http://www.fup.dk/$artnr[$arayartnrcounter]';
return true;\"
onMouseOut=\"window.status =\"; return
true;\"><!--target=\"_Self\"-->";

Jul 17 '05 #6
ma************@gmail.com wrote:
Hi

Ok, what I need for the java to do is to hide the real link, when I
treid the suggestion of Ken it just showed the real link. Why that is I
do not know.

First of all, this isn't java - it's PHP.

I saw nothing earlier about you wanting to hide a link. Why hide it? It just
makes things more difficult for your users.

As to making XML validate - try one of the XML newsgroups.
However I got it to work with this code, and I am now facing a new
problem, how to make it xhtml 1.0 validate. - all suggestions are
welcome.

But if anybody had anymore insight as to why it did not work, and why
Kens does, I am very interrested because I woul like to understand what
I did wrong.

$tdsubclass="<td class=\"sup\"><a
href=\"http://bygtabel.php/$artnr[$arayartnrcounter]\"
onMouseOver=\"window.status =
'http://www.fup.dk/$artnr[$arayartnrcounter]';
return true;\"
onMouseOut=\"window.status =\"; return
true;\"><!--target=\"_Self\"-->";


Remember - PHP is server side. Javascript is client side. Two entirely different
things. For instance - javascript knows about DOM - because DOM is interpreted
by the browser, and javascript runs on the browser. The server doesn't know (or
care) about DOM, and neither does PHP.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 17 '05 #7
>>Why hide it?

The situation is this, my client has a CMS system that runs i asp, and
it uses frames. I am going to make a page that is going to run in a
frame on that page, but in PHP runing on a different server. - in order
to make the links short an meaningful for the user I am going to make
them myself. So instead of b7797977.com/lakj/kasdjfja/123.php it is
going to say product/123.php forexsampel.
First of all, this isn't java - it's PHP.
I figured the problem here is with PHP and not javascript, because the
problem is to get PHP to echo the java code. Because the java code
works just fine, but I could not get PHP to echo it with the double
quetes I need.

What does DOM stand for?

Thanks to both of you for taking time to answer my questions. And I
would still really like if somebody could sheed some light on what is
wrong with the escaped charaters in my own try.

Ken writesYou have onmouseout <double quote to start string>. The double quote

before the word Done closes that quote.

and there absolutly is a problem, but the double quotes are escaped, so
I just dont get it.

Jul 17 '05 #8
this works and validates

$tdsubclass="<td class=\"sup\"><a
href=\"http://d19952.u48.surown.dk/bbel.php/$artnr[$arayartnrcounter]\"
onmouseover=\"window.status =
'http://www.fup.dk/$artnr[$arayartnrcounter]';
return true;\"
onmouseout=\"window.status = return true;\"><!--target=\"_Self\"-->
";

Jul 17 '05 #9


ma************@gmail.com wrote (in part):

I figured the problem here is with PHP and not javascript, because the
problem is to get PHP to echo the java code. Because the java code
works just fine, but I could not get PHP to echo it with the double
quetes I need.


Please, when refering to Javascript, spell it out. Do not use "java",
since that is a completely different language.

Ken

Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: BenO | last post by:
Hi I'm new to python and need to write a function to replace certain characters in a string (html). The characters I need to replace come from MS Word copy & paste and are: ' (Left quote)...
3
by: Jonathan Mcdougall | last post by:
I started using boost's filesystem library a couple of days ago. In its FAQ, it states "Wide-character names would provide an illusion of portability where portability does not in fact exist....
5
by: Armand Karlsen | last post by:
On this page of my website: http://www.zen62775.zen.co.uk/rigs.html the W3C html validator claims that there are some bytes it cannot interpret in line 49 of the html source as UTF-8. If I force...
0
by: Dan | last post by:
Hi Friends: I create a Report (in ACCESS 2K) with Graph embeded on that, The Report and Graph are based on some fields of a query that have values with OPERATOR CHARACTERS set such as: "<= 1.007...
4
by: wob | last post by:
Many thanks for those who responded to my question of "putting greek char into C string". In searching for an solution, I noticed that there are more than one version of "Extended ASCII...
3
by: Petr Jakes | last post by:
Hi, I am trying to convert string to the "escaped string". example: from "0xf" I need "\0xf" I am able to do it like: a="0xf" escaped_a=("\%s" % a ).decode("string_escape") But it looks a...
7
by: Jonny | last post by:
Hi, I am trying to write a C function which will dequote the string in a char * variable, and unescape any escaped quotes, so that, for example: "hello" would become: hello
0
by: kuldeep singh sethi | last post by:
Hi all I am facing a problem that is when any body want to sign up in the site then i want a text box in which i want to put characters in the textbox which are displayed. So how these...
3
by: sophie_newbie | last post by:
Hi, I want to store python text strings that characters like "é" "Č" in a mysql varchar text field. Now my problem is that mysql does not seem to accept these characters. I'm wondering if there...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.