On Mar 16, 2007, at 6:30 PM, Joy chakraverty wrote:
Hi,
One of my old questions Didnt show up because it had an attachment
and it was awating moderation.
Its quiet a bit of time so I thought I'd Post it again without the
attachment.
Sorry about that, I thought I had accepted it (there is a lot of
spam, so sometimes I kill good posts :( )
When we use a javawin with one of the control buttons (Close,
minimise , maximise) not visible. The others appear in the place
they would if the non active button was still there.
So Some times it shows 2 buttons with a gapbetween them or 2
buttons with gap at end etc.
How can we do any of the following?
[a] make the buttons align from the right.
By CSS it's "doable" change position:absolute to float:right for
example.
[b] show another image(disable state) when a certain button is
inactive
You cannot, but I think about it with also a rollover state
seb
---Jaideep Chakraverty
----- Original Message ----
From: Sébastien Gruhier <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, March 16, 2007 5:41:48 AM
Subject: Re: [Javawin] destroy window manually
Hi
Your code is not logical and does not use PWC convention.
You have to use PWC function to open and close window. In your
submitResolution you should only do win.close().
But as you have set destroyOnClose:true, your window will be destroy
(remove from the dom).
So I suggest you if you want to use only one window instance:
- remove destroyOnClose:true to keep the window in the DOM when you
hide it.
- change if( !$('resolutionPopup') ) to if (!win)
- just call win.hide in your function submitResolution
- and if you want have a your effect on hide/show set them in
window's constructor showEffect: and hideEffect:
HTH
Seb
On Mar 16, 2007, at 2:02 PM, Web Developer wrote:
> Hello all,
> hmmm I asked this question at the end of a couple other threads
so no
> responses yet, and i see some people get responses quickly. Maybe I
> shoulda included the main code instead of link to my webpage that I
> mayeb scared people off by calling it 'popup.html' in it :) hehe.
> Anyway not sure if this is PWC question or more javascript question.
> Thanks if anyone can help (my code listed at bottom of email):
>
>> Cant get the window to close manually in FF, and IE has a few
>> problems with it as well, so my procedure to duplicate problem:
>> Click on 'Click Here for Browser-Style Popup.', Enter some info,
>> and hit
>> the input button in that dialog window (it calls a function which
>> removes the popup).
>> Since the window is removed from DOM, you can click on the
hyperlink
>> again to recreate a brand-spanking new popup.
>> So I then Click on 'Click Here for Browser-Style Popup.' again,
>> and hit the
>> X to close the window. It doesnt close it though and gives a
>> javascript
>> error after a second: 'element.parentNode has no properties'.
>>
>
> //#####CODE
> //so here is the link tio start the popup...
>
> <a onclick="makeMacStylePopup();">Click Here</a> for Browser-Style
> Popup.
>
> //Now here is code to create the popup, and i want be able to
manually
> close it via scrpting, i thought removing it via DOM absolutely got
> rid of it. Yet it seems like it doesnt remove it if you follow
steps i
> mentioned above.
>
> var win;
> function makeMacStylePopup()
> {
>
> if( !$('resolutionPopup') ) //if not already up on the screen,
> create it
> {
> win = new Window({ id:"resolutionPopup", className:
"dialog",
> width:350, height:400, zIndex: 100, resizable: true, title: "Sample
> window", showEffect:Effect.BlindDown, hideEffect: Effect.BlindUp,
> draggable:true, wiredDrag: true ,destroyOnClose:true });
>
> win.getContent().innerHTML= "<div>Resolution:<br/><textarea
> id='resolution'></textarea><br/><input type='button' value='Submit'
> onclick='submitResolution(this);'/></div>"; //does some specialized
> coding, and then destroys the popup
> win.setStatusBar("Enter your text above and submit it.");
> win.showCenter();
> }
> else //remind user he has it already open
> {
> Effect.Pulsate(win.getId(), {duration: 2, pulses: 3,
from: .8} );
> win.showCenter();
> }
>
> }
> function submitResolution(popupObj)
> {
> //alert( 'resolution=' + $('resolution').value ); Use value
later to
> fill database
>
> //gets rid of and 'destroys' the popup manually by getting
its parent
> and removing the popup from that parent.
> Effect.BlindUp( win.getId() ,{afterFinish: function(){
> alert('Removing: '+win.getId()); var popup = $(win.getId()); var
> popupParent = popup.parentNode; popupParent.removeChild(popup);
win =
> null; } } );
> }
>
> _______________________________________________
> Javawin mailing list
> [email protected]
> http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at
Yahoo! Games.
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com