Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Targets now opening new windows?

Posted by: Craz1000 Nov 21 2017, 12:06 PM

i have a site that uses <frameset> on index, and it worked fine for months, now however every link that uses target opens in a new window except when using IE.

index.html

CODE

<html>

<head>
<title>Main Page</title>
</head>

<frameset rows="15%,85%" noresize>
<frame src="top.html?name=Dr Whiley Stage 2&file=music/Dr%20Whiley.mp3" name="top">
<frame src="main.html" name="main">
</frameset>

</html>


random page
CODE

<html>
<head>
<link rel="stylesheet" type="text/css" href="../css/main.css">

<center>
<table border=1>
<tr><td valign="top">
    Dj Sets:<br><br>
    2010:<br>
        <a href="top.html?name=Deadmau5 Mix 2010&file=music/Deadmau5Mix.mp3" target="top">Deadmau5 Mix</a><br>
    <br>2011:<br>
        <a href="top.html?name=House Mix 3 2011&file=music/House3.mp3" target="top">House 3</a><br>
        <a href="top.html?name=House Mix 4 2011&file=music/House4.mp3" target="top">House 4</a><br>
        <a href="top.html?name=House Mix 5 2011&file=music/House5.mp3" target="top">House 5</a><br>
    <br>2012:<br>
        <a href="top.html?name=House Mix 6 2012&file=music/House6.mp3" target="top">House 6</a><br>
        <a href="top.html?name=House Mix 7 (Rejected) 2012&file=music/House7-1.mp3" target="top">House 7 (Reject 1)</a><br>
        <a href="top.html?name=House Mix 7 (Rejected) 2012&file=music/House7-2.mp3" target="top">House 7 (Reject 2)</a><br>
        <a href="top.html?name=House Mix 7 2012&file=music/House7-3.mp3" target="top">House 7 (Final)</a><br>
        <a href="top.html?name=Classic House Mix 2012&file=music/Classics.mp3" target="top">Classics</a> Favorite Tracks<br>
        <a href="top.html?name=House Mix 8 2012&file=music/House8.mp3" target="top">House 8</a><br>
        <a href="top.html?name=House Mix 9 2012&file=music/HouseIX.mp3 target="top">House 9</a><br>
        House L (Ongoing)<br>
    <br>2013:<br>
        <a href="top.html?name=House Mix 10 (Rejected) 2013&file=music/HouseX-2.mp3" target="top">House 10 (Rejected)</a><br>
        <a href="top.html?name=House Mix 10 2013&file=music/HouseX.mp3" target="top">House 10 (Final)</a><br>
    <br>2014:<br>
        <a href="top.html?name=House Mix 11 2014&file=music/HouseXI.mp3" target="top">House 11</a><br>
        <a href="top.html?name=House Mix 12 2014&file=music/HouseXII.mp3" target="top">House 12</a><br>
    <br>2015:<br>
        <a href="top.html?name=House Mix 13 2015&file=music/HouseXIII.m4a" target="top">House 13</a><br>
        <a href="top.html?name=Trance Mix 2015&file=music/Trance Mix 2015.mp3" target="top">Trance Mix 2015 (All tracks were made before 2001)</a><br>
        <a href="top.html?name=Trance Mix 2015 Part 2&file=music/Trance 15-2.m4a" target="top">Trance Mix 2015 II (Tracks before 2003 and alot more powerful)</a><br>
    <br>2016:<br>
        <a href="top.html?name=Trance Mix 2016&file=music/Trance 2016.m4a" target="top">Trance Mix 2016</a><br>
        <a href="top.html?name=Trance Mix 2016 Part 2&file=music/Trance 2016-2.mp3" target="top">Trance Mix 2016 II</a><br>
                <a href="top.html?name=Trance Mix 2017&file=music/Trance 17-2.mp3" target="top">Trance Mix 2017</a><br>
</td><td valign="top">
    Original work:<br><br>
    2016:<br>
        <a href="top.html?name=Blade Runner Blues Mashup&file=music/BRB_PL.mp3" target="top">Blade Runner Blues Mashup</a><br>
        <a href="top.html?name=Skyrim/Oblivion/Morowind Mashup&file=music/ESM.mp3" target="top">Skyrim/Oblivion/Morowind Mashup</a><br>
        <a href="top.html?name=Song 1&file=music/Song 1.mp3" target="top">Song 1 (My First Song and Ableton Test)</a><br>
    <br>2017:<br>
        <a href="top.html?name=Life Cycle&file=music/Life_Cycle.mp3" target="top">Life Cycle (Instrumental)</a><br>
        <a href="top.html?name=Track 2&file=music/Track2.mp3" target="top">Track 2</a><br>
        <a href="top.html?name=Current Project&file=music/3.mp3" target="top">Track 3 (Unfinished)</a><br>

</tr></td></table>
</center>
</html>

Posted by: Christian J Nov 21 2017, 02:06 PM

The NAME and TARGET attributes look correct to me. Could you link to a real page showing this behavior?

Posted by: Craz1000 Nov 21 2017, 06:12 PM

QUOTE(Christian J @ Nov 21 2017, 02:06 PM) *

The NAME and TARGET attributes look correct to me. Could you link to a real page showing this behavior?


http://craz1000.net

under Past Sets and Expirements

Posted by: Christian J Nov 21 2017, 06:33 PM

Now I realized those links go directly to mp3 files, not actual web pages. Audio files will not run in a frame unless the browser supports it (and is configured to allow it). Afraid I have no idea what support is like these days.

Posted by: Craz1000 Nov 21 2017, 08:03 PM

QUOTE(Christian J @ Nov 21 2017, 06:33 PM) *

Now I realized those links go directly to mp3 files, not actual web pages. Audio files will not run in a frame unless the browser supports it (and is configured to allow it). Afraid I have no idea what support is like these days.

it goes to top.html passing the variables of the song title and file location. here is the code

top.html
CODE

<html>

<head>
  <link rel="stylesheet" href="css/main.css">
</head>
<center>
<script type="text/javascript">
var file = location.search.split('file=')[1]
var name = location.search.split('&')[0]
name = name.substring(6);
name = decodeURI(name);

document.write( name + '<br>')
document.write('<embed src="'+file+'" volume=1 height=50 width=465 bgcolor="#000000">')

</script>

</html>

Posted by: Craz1000 Dec 19 2017, 05:28 PM

so changed the code to link to a test html instead of an mp3 file and also tried an iframe instead and still opens a new window and not in the frame itself.
even tried to rename the frame still no change.

Posted by: Craz1000 Dec 19 2017, 05:55 PM

QUOTE(Craz1000 @ Dec 19 2017, 05:28 PM) *

so changed the code to link to a test html instead of an mp3 file and also tried an iframe instead and still opens a new window and not in the frame itself.
even tried to rename the frame still no change.


found the problem, changed the "name" variable to "track" apparently you cant use "name" it will confuse the browser and open a new window.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)