| Index
» Projects
» phpMyEdit
» Forum
» iframe inside a TAB |
 |
guiro
Joined: 07 Jan 2004
Posts: 5
Posted: 2006-02-20 14:18
Back to top
Reply with quote
|
I'm testing a special configuration for a virtual field, see code:
| Code: |
$opts['fdd']['virtual3'] = array(
'name' => '',
'tab' => 'Files',
'select' => 'V',
'options' => 'CV',
'escape' => false,
'sql' => 'CONCAT("<iframe NAME=files src=files.php?ID=",id," width=100% height=300px scrolling=yes FRAMEBORDER=0 marginwidth=0 marginheight=0></iframe>")',
'maxlen' => 10
);
|
When Files tab is selected p.e.'files.php?ID=123456' is loadded in the iframe, this allow to create any content linked to ID field. Works nice, but when you click twice on the tab, iframe contens disappear.
Something on javascript function PME_js_show_tab(tab_name) is causing the problem.
Can any javascript specialist, give me a workarround or solution?
GUIRO
|
ajh
Joined: 17 Dec 2003
Posts: 236
Posted: 2006-02-20 16:55
Back to top
Reply with quote
|
Any particular browser a problem? Or all of them?
The TinyMCE embedded editor uses IFrames (see the mce_cal extension), and there is a special option that you have to set to get it to work properly in tabs (which are essentially implemented as HTML DIVs that are hidden and displayed as appropriate).
|
guiro
Joined: 07 Jan 2004
Posts: 5
Posted: 2006-02-20 23:35
Back to top
Reply with quote
|
IE5.5 fails, but IE6 works OK, so it's a browser issue
|
ajh
Joined: 17 Dec 2003
Posts: 236
Posted: 2006-02-21 14:10
Back to top
Reply with quote
|
I'm willing to bet that Mozilla fails as well. I think that it is a browser bug, but that you will need to code round it. I think that you will need to set design mode in the IFrame on everytime you display it.
|
guiro
Joined: 07 Jan 2004
Posts: 5
Posted: 2006-02-22 12:14
Back to top
Reply with quote
|
I found a dirty code workarround, adding to phpMyEdit.class.php in function PME_js_show_tab(tab_name) definition the following line, to force reload of iframe
| Code: |
document.getElementById("iframename").src=document.getElementById("iframename").src; |
|
|
Post new topic
Reply to topic
|
|
|
|