Can someone help with bring-to-front code for pop-up windows?

Hello there, I have any music site, and on one particular page surfers can visit song titles also it opens up any pop-up window that contain the lyrics.

While you click onto the principle window again, the actual pop-up then relegates to help underneath it, just in case you click around the same link once more, you get nothing – if you don’t closed the pop-up very first.

How can i modify my javascript so clicking to the pop-up link will bring an already open window for the front

This is the popup computer code currently:

< your href=" javascript: void(window. open('rpages/poar/dragofsloth. html', 'The Move of Sloth', 'resizable=1, width=585, height=420, top=60, left=60'))" > JUST ONE. The Drag of Sloth< /a> 

It’s important to focus() the eye-port. Try something like this (untested). Would be superior to slap the code in the function and call taht out of your link.

< your href=" javascript: var times = window. open(‘rpages/poar/dragofsloth. html’, ‘The Move of Sloth’, ‘resizable=1, width=585, height=420, top=60, left=60’); times. focus(); " > JUST ONE. The Drag of Sloth< /a>

That works! Thanks Smoseley, really appreciate it. So you’re telling (I’m a j. script newbie, excuse me) I should squeeze bulk of which code inside < script> < /script> tags inside the head of that document

Someone on another forum gave me something like of which, which applied itself for the specific div the fact that links appeared within, but I had to lose the individual code for every link, which meant losing the unique sizing attributes for every one – any kind of idea how you’d bypass that

I got thinking something less complicated, like:

< script type=" text/javascript" >
job popWindow(url, title, thicker, height, top, left)
attrs = 'resizable=1, width=' + thicker + ', height=' + peak + ', top=' + prime + ', left=' + remaining;
var x = windows. open(url, title, attrs);
times. focus();

< /script>

B... rest of the page... /B

< your href=" javascript: popWindow('rpages/poar/dragofsloth. html', 'The Move of Sloth', 585, 420, SIXTY, 60); " > JUST ONE. The Drag of Sloth< /a>

I’m sure you should try this

var newwindow;
job poptastic(url)

newwindow=window. open(url, ‘name’, ‘height=400, width=200’);
in the event that (window. focus) newwindow. focus()

It will do rudimentary page to pop up off your key page on command originating from a link, you’ll need the following JavaScript code along with JavaScript link.

That works like no bodies business, cheers smoseley, thanks too joomlads07.

This entry was posted in Web Design and tagged , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *