You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "simon.s" <si...@gmx.de> on 2007/03/09 11:08:08 UTC

automatically open modalDialog

Hello!

I have a s:moadalDialog, that I want to be opened when the page is loaded.
OnLoad does not function.

Simon
-- 
View this message in context: http://www.nabble.com/automatically-open-modalDialog-tf3374844.html#a9391689
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Solved] automatically open modalDialog

Posted by "simon.s" <si...@gmx.de>.
> alternatively to the timed notifier, you can gain access
> to the generated javascript var, set a simple javascript
> which uses a timeout to initialize the dialog after 500 miliseconds or so.

Great idea!
Works fine. Thanks Werner!

Simon
-- 
View this message in context: http://www.nabble.com/automatically-open-modalDialog-tf3374844.html#a9393222
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: automatically open modalDialog

Posted by Werner Punz <we...@gmail.com>.
simon.s schrieb:
> Hello!
> 
> I have a s:moadalDialog, that I want to be opened when the page is loaded.
> OnLoad does not function.
> 
alternatively to the timed notifier, you can gain access
to the generated javascript var, set a simple javascript
which uses a timeout to initialize the dialog after 500 miliseconds or so.

you can then display the dialog viar dialogVar.show();....


Onload is inherently problematic, most javascript related browsercrashes
and rendering lockups I have seen so far were (and all of them in ie)
related to onloads.

Alternatively you can use dojos onload function, but I assume internally
 dojo pushes critical code as well just into timeouts.


Re: [Solved] automatically open modalDialog

Posted by "simon.s" <si...@gmx.de>.
Hi Gerald!

How can I do that?
The thing is: I can open the dialog from _any_ JS-Event (onFocus,
onMouseOver...) except onLoad. In the sandbox tag reference is mentioned "is
not working with overridden 'onload'".

Simon



Gerald Müllan wrote:
> 
> Hi,
> 
> you have to make sure that the dialog is instantiated before you call
> dialogVar.show();
> 
> I guess that the reference points to null.
> 
> cheers,
> 
> Gerald
> 
> On 3/9/07, simon.s <si...@gmx.de> wrote:
>>
>> Hello!
>>
>> I have a s:moadalDialog, that I want to be opened when the page is
>> loaded.
>> OnLoad does not function.
>>
>> Simon
>> --
>> View this message in context:
>> http://www.nabble.com/automatically-open-modalDialog-tf3374844.html#a9391689
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://www.irian.at
> 
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 
> 

-- 
View this message in context: http://www.nabble.com/automatically-open-modalDialog-tf3374844.html#a9392336
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: automatically open modalDialog

Posted by Gerald Müllan <bi...@gmail.com>.
Hi,

you have to make sure that the dialog is instantiated before you call
dialogVar.show();

I guess that the reference points to null.

cheers,

Gerald

On 3/9/07, simon.s <si...@gmx.de> wrote:
>
> Hello!
>
> I have a s:moadalDialog, that I want to be opened when the page is loaded.
> OnLoad does not function.
>
> Simon
> --
> View this message in context: http://www.nabble.com/automatically-open-modalDialog-tf3374844.html#a9391689
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: automatically open modalDialog

Posted by Werner Punz <we...@gmail.com>.
simon.s schrieb:
> Hello!
> 
> I have a s:moadalDialog, that I want to be opened when the page is loaded.
> OnLoad does not function.
> 
try the timed notifier that does the trick...