Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2008-01-18 13:09:26

Soulfly2111
New member
Registered: 2008-01-18
Posts: 1

Startup: Hide Xinha

Hello
I tried to hide the xinha at the startup and used javascript to show the editor later - code is similar to this:


function  alternateDisplay(element) {
    if (element.style.display == 'block') {
        element.style.display = 'none';
    } else {
        element.style.display = 'block';
    }
}

I hide a table with further information like with:
<table style="display:none;>

ok, it works to hide but i cant use the editor. It occurs this error:

Error: doc has no properties
Source File: http://localhost:8080/Project/xinha/XinhaCore.js
Line: 1414
doc.open("text/html","replace");


It works when i use instead of style.display  ->  style.visibility with the attributes (hide, visible)
but unfortunatley the xinha element is only invisible and is still using the space on the site. This is not excatly what i am searching for...
thanks for any suggestion.

cheers,
Soulfly

Last edited by Soulfly2111 (2008-01-18 13:10:04)

Offline

#2 2008-01-21 17:02:37

Chuck
Xinha Community Member
Registered: 2005-02-25
Posts: 29

Re: Startup: Hide Xinha

As of now, Xinha cannot be correctly used if it initializes while display is set to none.

To overcome this problem, I code it as visible in my html and then poll xinha_editors[i]._iframeLoadDone in javascript until they're all loaded and then I hide them. As far as I know, it's the only fix.

Offline

#3 2008-01-22 10:02:21

wymsy
Xinha Community Member
From: Massachusetts, USA
Registered: 2005-04-01
Posts: 44
Website

Re: Startup: Hide Xinha

Another approach that I have used is to use css positioning to place the editor outside the window during loading, i.e.

style="position:absolute; left: -2000px"

and then move it back into the window with a script when needed. This avoids having the editor appear briefly during loading before you hide it.

Offline

#4 2008-01-24 00:31:09

beanstalk
Xinha Community Member
Registered: 2007-02-06
Posts: 13

Re: Startup: Hide Xinha

i initialize it when i call the function to show the editor.  you have to use a variable to only initialize it once, though.

Offline

#5 2008-01-31 12:49:53

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Startup: Hide Xinha

i agree with beanstalk's method - that's the one I use


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

Board footer

Powered by FluxBB