Jump to content

help with popup win


mikaint

Recommended Posts

I have a popup window and i need to apply navigation in this window...this is my script:

 

function win10(IMG,TITLE,DESCR,IMG2)
{
  var win = new Window({className: "alphacube", title: TITLE, width:785, height:500}); 
  win.getContent().innerHTML = "<img src='pressimg/" + IMG + "' /><br><div align='center' class='gold'><a href=\"javascript:win10('" + IMG +"','TITLE','DESCRIPTION','" + IMG2 +"')\" target='_self'>image 1</a> | <a href=\"javascript:win10('" + IMG2 +"','TITLE','DESCRIPTION','" + IMG +"')\" target='_self'>image 2</a></div><br>" + DESCR + "<br>"; 

  win.setDestroyOnClose(); 
  win.showCenter();
  win.setConstraint(true, {left:20, right:20, top: 30, bottom:10})
  win.toFront();
}

 

There are two pictures and two links to those pictures. The way i made it, it opens a new popup every time a link is clicked. This is normal as the script contains the following command: var win = new Window({className: "alphacube", title: TITLE, width:785, height:500});

 

What i want to do is to add an if statement that will somehow display the picture in the same window, but unfortunately i'm not that good with javascript so i'll need some help...

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.