Page 1 of 11
Archive - read only
uCoz Community » Archives » Archive » Tutorial - Creating blue pop-up window (How to create Ajax windows in uCoz system)
Tutorial - Creating blue pop-up window
Igor-Sousa
Posts: 93
Reputation: 18

Message # 1 | 10:10 AM
Can I use the blue pop-up window of uCoz on my site?

Several things come with that kind of window, for example, when someone misses a password and a warning appears in the corner saying that the password is wrong, or when someone clicks on "confirm e-mail" link, "Login" link and many other things including submenus.

I would like to use that style of window on my site to give some tips and hints for my users, so the whole site will have only 1 style of pop-up window.

If this it is allowed, what is the code for that type of pop-up window?

If you didn't understand what I'm talking about, is that same kind of window when someone clicks on [?], and a blue window appears.

Thanks in advance. smile


I've made grammar mistakes ?? Google's fault !!

Time is the most valuable thing a man can spend.

Sunny
Posts: 9296
Reputation: 456

Message # 2 | 12:34 PM
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: 2138039.png(2Kb) · 3366896.png(2Kb)

I'm not active on the forum anymore. Please contact other forum staff.
Igor-Sousa
Posts: 93
Reputation: 18

Message # 3 | 2:22 AM
Sunny, this tutorial really helped me a lot!

But I have some doubts, you said that the place where content goes, HTML code can be used, but when I use the codes:

<span style="blue">ANY_WORD</span> or <a href="ANY_SITE">ANY_WORD</a>

the contents of the window appears as plain text and as a link, but the link does not work, I can only use the codes:

<br /> and <b> and other "simple" tags.

And one more question, the text appears centered, how do I make it appear justified?

Just to point out, I'm using this code:

Code
<a href="javascript://" onclick="new _uWnd('Dica','Dica/Ajuda',500,200,{autosize:1,maxh:300,minh:100},'O site é desenvolvido em um sistema estrangeiro, da empresa <a href="http://www.ucoz.com/">uCoz</a>, portanto, as regras de escrita da língua portuguesa não se aplicam no momento do registro.<br /><br />Apenas caracteres de <b><span style="blue">A-Z</span></b>, <b><span style="blue">números</span></b>, <b><span style="blue">hifens</span></b> e <b><span style="blue">underlines</span></b> são aceitos.<br /><br />Não é permitido espaços, letras com acentos, Ç ou qualquer outro tipo de caractere especial.<br /><br />Qualquer dúvida que você tiver, clique no ícone <b>[<span style="blue">?</span>]</b> que se encontra perto de cada campo, para mostrar uma dica de como preenchê-lo.<br /><br />Se ainda assim estiver com dificuldades para se registrar, entre em <a href="MY_SITE_URL/index/0-3">contato</a> com a administração.');">Porque não consigo me registrar no site?</a>

Many thanks for your help. happy

Added (2009-10-15, 8:22 Pm)
---------------------------------------------
I also can not use quotes "ANY_WORD".

Are there any limitations of tags or characters that can be used?


I've made grammar mistakes ?? Google's fault !!

Time is the most valuable thing a man can spend.

Post edited by Igor-Sousa - Friday, 2009-10-16, 2:26 AM
Sunny
Posts: 9296
Reputation: 456

Message # 4 | 10:40 AM
Igor-Sousa, probably there are some limitations. Sorry, I can't help you more.
I'm not active on the forum anymore. Please contact other forum staff.
Igor-Sousa
Posts: 93
Reputation: 18

Message # 5 | 11:02 AM
No problem, I will "explore" a little more. cool

I appreciate all your help. happy

Can close this thread. happy


I've made grammar mistakes ?? Google's fault !!

Time is the most valuable thing a man can spend.

Hybrid4525
Posts: 47
Reputation: -4

Message # 6 | 2:53 AM
Quote (Sunny)
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');

Connecting the code? Gimme an example where u have the body and head and stuff thx

drunkenbird
Posts: 28
Reputation: 0

Message # 7 | 2:58 AM
Quote (Hybrid4525)
Quote (Sunny)
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'); <--- This is a part of the above Codeline...

Connecting the code? Gimme an example where u have the body and head and stuff thx

Body Head and stuff? What are you talking about? Sunny explained all about it, its a Single Line you can put every where you want.

Hybrid4525
Posts: 47
Reputation: -4

Message # 8 | 3:16 AM
Well, u seem to know a little so how do u integregate the code with say the profile page
Igor-Sousa
Posts: 93
Reputation: 18

Message # 9 | 6:38 AM
Hybrid4525, you do not need to put this code anywhere in your template.

This code is to be used as a link when someone clicks on it, a pop-up Ajax window will appear.

A simple example:
You are adding an entry about a game, and want to give some tips about this game to your users, you can use this code this way:

Quote
<a href="javascript://" onclick="new _uWnd('myName','Window title',500,200,{autosize:1,maxh:300,minh:100},'If you press two times up arrow key of your keyboard, your character will make a super jump.');">TIP</a>

Where:
in blue - content of the window.
in red - the word that will appear as a link.

Your users will see a text like this: TIP and when they click on it, the window will appear showing your tip.


I've made grammar mistakes ?? Google's fault !!

Time is the most valuable thing a man can spend.

Post edited by Igor-Sousa - Saturday, 2009-10-17, 6:38 AM
uCoz Community » Archives » Archive » Tutorial - Creating blue pop-up window (How to create Ajax windows in uCoz system)
Page 1 of 11
Search: