Bring out an some size window when click a link in an ajax

i want to ask you how to make an ajax call to bring out an some size
window when click a link.Just tell me the outline instead of detail
about how to.Thank you!

I use an unobtrusive approach, with this prototype library:
http://livepipe.net/projects/control_modal/ .

  1. Put a normal link in your view link.
  2. Then in the application.js just initialize it:

$$(‘a.someclass’).each(function(link){
new Control.Modal(link,{
[…]
});
});

On Apr 14, 12:02 pm, Guo Y. [email protected]

Thank you.I will try it.

Guo Y. wrote:

i want to ask you how to make an ajax call to bring out an some size
window when click a link.Just tell me the outline instead of detail
about how to.Thank you!

google for javascript popup ?

An wrote:

I use an unobtrusive approach, with this prototype library:
http://livepipe.net/projects/control_modal/ .

  1. Put a normal link in your view link.
  2. Then in the application.js just initialize it:

$$(‘a.someclass’).each(function(link){
new Control.Modal(link,{
[…]
});
});

hello:
I have downloaded the file “control.modal.2.2.3.js” and put it in
“public\javascripts” directory. Then in the application.js initialize
it:
$$(‘a.someclass’).each(function(link){
new Control.Modal(link,{
opacity: 0.8,
position: ‘relative’,
width: 300,
height: 50
});
});

I have an action named “more” and its view “more.rhtml”.In my product
view,there is a link:link.
But when i click the link,this link behaviors like a normal link,not
Pop-up a window.How do i manage it?

Dont’ know if still usefull.

If it behaves like a normal link there is an error in javascript or in
loading the javascript file.
Use a tool like firebug for firefox to check if everything is ok.

On 18 Apr, 04:18, Guo Y. [email protected]