Hi,
I got a question about nested quotes. At least, that's what I think the problem is. I'm trying to solve this problem a few days now, but I can't find a sollution.
I'm using a combination of javascript and php. I want to get a kind of dropdown menu where the settings of a user are shown. The content of this dropdown menu is generated by php (settings.php). It contains a table, text and a few images.
In my file I've written this code:
[tab][green]<div id="settings" onmouseover="show_settings(event,'<? include("settings.php");?>')" onmouseout="delay_hide_settings()">[/green]
The settings.php-file generates text like:
[tab][green]<table width=\"320\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
[tab] <tr>
[tab] <td>sort</td>
[tab] <td><img src=\"./images/arrow_sort.gif\">
[tab] <a href=\"index.php?order_by=name&order_how=DESC\" class=\"controlpanel\">alphabetical</a>
[tab] </td>
[tab] </tr>
[tab] <tr><td>...</td></tr>
[tab]</table>[/green]
The javascript-function show_settings() places this text in some kind of dropdown menu.
I've tried to backslash, double backslash ",',... the text php generates, but every time he breaks out on 'sort'.
When I look to the source code of my generated html-file in IE, I get this:
[tab][green]<div id="settings" onmouseover="show_settings(event,'<table width=\"320\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
[tab] <tr>
[tab] <td>sort</td>
[tab] <td><img src=\"./images/arrow_sort.gif\">
[tab] <a href=\"index.php?order_by=name&order_how=DESC\" class=\"controlpanel\">alphabetical</a>
[tab] </td>
[tab] </tr>
[tab] <tr><td>...</td></tr>
[tab]</table>
[tab]')" onmouseout="delay_hide_settings()">[/green]
Can anybody give me a clue of what I'm doing wrong?
Thanks a lot,
Herr Vredy
I got a question about nested quotes. At least, that's what I think the problem is. I'm trying to solve this problem a few days now, but I can't find a sollution.
I'm using a combination of javascript and php. I want to get a kind of dropdown menu where the settings of a user are shown. The content of this dropdown menu is generated by php (settings.php). It contains a table, text and a few images.
In my file I've written this code:
[tab][green]<div id="settings" onmouseover="show_settings(event,'<? include("settings.php");?>')" onmouseout="delay_hide_settings()">[/green]
The settings.php-file generates text like:
[tab][green]<table width=\"320\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
[tab] <tr>
[tab] <td>sort</td>
[tab] <td><img src=\"./images/arrow_sort.gif\">
[tab] <a href=\"index.php?order_by=name&order_how=DESC\" class=\"controlpanel\">alphabetical</a>
[tab] </td>
[tab] </tr>
[tab] <tr><td>...</td></tr>
[tab]</table>[/green]
The javascript-function show_settings() places this text in some kind of dropdown menu.
I've tried to backslash, double backslash ",',... the text php generates, but every time he breaks out on 'sort'.
When I look to the source code of my generated html-file in IE, I get this:
[tab][green]<div id="settings" onmouseover="show_settings(event,'<table width=\"320\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
[tab] <tr>
[tab] <td>sort</td>
[tab] <td><img src=\"./images/arrow_sort.gif\">
[tab] <a href=\"index.php?order_by=name&order_how=DESC\" class=\"controlpanel\">alphabetical</a>
[tab] </td>
[tab] </tr>
[tab] <tr><td>...</td></tr>
[tab]</table>
[tab]')" onmouseout="delay_hide_settings()">[/green]
Can anybody give me a clue of what I'm doing wrong?
Thanks a lot,
Herr Vredy