Closed Thread Icon

Preserved Topic: Question about target="" (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18487" title="Pages that link to Preserved Topic: Question about target=&amp;quot;&amp;quot; (Page 1 of 1)" rel="nofollow" >Preserved Topic: Question about target=&quot;&quot; <span class="small">(Page 1 of 1)</span>\

 
kretsminky
Maniac (V) Inmate

From: A little lower... lower... ahhhhhh, thats the spot
Insane since: Jun 2000

posted posted 10-16-2001 13:51

I had someone in a class I was teaching ask me about the target="" attribute within the <a> tag. He was wanting to create a "remote control" for a pictures page so that he could click buttons on the remote and a picture would appear in another window.

He asked me if he could just put a target="picturewindow" in all the links on the remote so that when he clicked on a button on the remote the corresponding picture would open in the picture window. He thinks it would work and that when the first button was clicked it would just open a new window that could be used over and over. I've never tried anything like that so I had no idea how it would work.

Would there be any issues with that method?

kretsminky
Maniac (V) Inmate

From: A little lower... lower... ahhhhhh, thats the spot
Insane since: Jun 2000

posted posted 10-16-2001 13:58

Ahhh, I see, I was playing with that method and without any JS the "controlled" window doesn't focus itself when you click the links.

How do you deal with that in JS?

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 10-16-2001 19:38

If you want to stick with that method (using the same TARGET for different links), you should modify all files that you're opening like that, so that they have ONLOAD="this.focus();" added to the <BODY> tag...

On the other hand, if you want to use JS to open windows, you can use timer to focus window after some period of time, like this:

<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!-- ;

// Written by mr.maX, http://www.maxworld.co.yu/

function _window(fileURL, windowName, winWidth, winHeight) {
var top = (screen.availheight - winHeight)/2;
var left = (screen.availwidth - winWidth)/2;
newWin = window.open(fileURL, windowName, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+winWidth+",height="+winHeight+",left="+left+",top="+top);
newWin.moveTo(left, top);
setTimeout("newWin.focus()", 2500);
}

// -->
</SCRIPT>


« BackwardsOnwards »

Show Forum Drop Down Menu