[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
Forum moderator: Aloyasha, Vodka  
Gfx Syndicate » General uCoz » Coding Archive » Tutorial - Creating A Blue Pop-Up Window
Tutorial - Creating A Blue Pop-Up Window
Aloyasha
Messages: 274
Group: Head Admin
Title: Boo! Boo!
Reputation: 2
Status: Offline

Awards: 4Loading awards ...
:Date:
Thursday,
2010-11-18,
3:00 AM

Message # 1
How to create new pop-up Ajax windows, the same as uCoz ones.

Let's start with an example:

Its code

Code
<a href="javascript://" onclick="new _uWnd('myName','Window title',500,200,{autosize:1,maxh:300,minh:100},'Here goes window content');">Click me</a>

We need the following part which is the code of an Ajax window itself:

Code
new _uWnd('myName','Window title',500,200,{autosize:1,maxh:300,minh:100},''Here goes window content');

where:

myName – is a unique name of a window. This text is displayed nowhere but is used to work with such windows;

Window title – is a title that is displayed at the top of an Ajax window;

500
– width;

200 – height;

Here goes window content - is content of a window. Here HTML codes can be used.


And now let's add more features to the window.

Code
<a href="javascript://" onclick="new _uWnd('myName','Window title',500,200,{min:1,shadow:1,header:1,max:1,resize:0},'Here goes window content');">Click me</a>

The base of the code is the same. We have added the following part:

Code
{min:1,shadow:1,header:1,max:1,resize:0}

where:

Number 0 stands for "No"

Number 1 stands for "Yes"

min – displaying of 'minimize' button (we have '1' which means that the button is displayed);

shadow – adds shadow to the window;

header – displaying of the header (where the buttons 'minimize', 'maximize', 'close' and window title are located);

max
– displaying of 'maximize' button

resize – allows users to change window size (we gave '0' therefore the size can't be changed)


You can also add the following features:

modal[1/0] – a modal window. If this option is enabled all other space will be covered with a semitransparent layer.

nomove[1/0] – forbids to move a window.

Attachments: 1060063.jpg (4.8 Kb) · 1257711.jpg (4.3 Kb)


FAV:

LATEST:

Your worst nightmare is just to unfold. As your despair awakens your heart becomes more bear less.

People love there lives, If they don't then why are they living it?

Rules Forum Here:
Rules Thread READ EM OR ELSE

Gfx Syndicate » General uCoz » Coding Archive » Tutorial - Creating A Blue Pop-Up Window
  • Page 1 of 1
  • 1
Search: