View Full Version : New Window?


Kawaii Genki
06-30-2004, 07:00 PM
I'd like my manga pages to open up in a new window, not the center frame. Can anyone help me fix my code? (I have not uploaded my page to the internet yet,so...yeah :P)


<script language="javascript" type="text/javascript">
function jump(form) {
var myindex=form.menu.selectedIndex
if (form.menu.options[myindex].value != "0")
{
window.open(form.menu.options[myindex].value,
target="mainframe");
}
}
//-->
</script>

<form name="manga1" ACTION=URI>
<select name="menu" onchange="jump(this.form)">
<option value="0">Manga</option>
<option value="0"></option>
<option value="C:\Documents and Settings\Administrator\My Documents\Kawaii

Genki\DestinysKey\Manga\page01.html" target="new_page">Page 1</option>
<option value="DestinysKey\Manga\page02.html">Page 2 </option>
<option value="DestinysKey\Manga\page03.html">Page 3 </option>
<option value="DestinysKey\Manga\page04.html">Page 4 </option>
<option value="DestinysKey\Manga\page05.html">Page 5 </option>
<option value="DestinysKey\Manga\page6.html">Page 6 </option>
</select>
</form>

salomeyasobko
06-30-2004, 07:04 PM
<script language="javascript" type="text/javascript">
function jump(form) {
var myindex=form.menu.selectedIndex
if (form.menu.options[myindex].value != "0")
{
window.open(form.menu.options[myindex].value,
target="_blank");
}
}
//-->
</script>

i changed the bold part from "mainframe" to "_blank" :)

Kawaii Genki
06-30-2004, 07:21 PM
I tried it, and that doesn't work...it sill takes it to the mainframe...

smartie5602
06-30-2004, 08:19 PM
another part of your coding has target="new_page" in it, should that be "blank"? That link is also to a file on your computer (c:/...), when that code is put on the web i don't think it will work, parhaps make the file name like the others? Have you tride puting the target="blank" in all of your links?

xxLiz

Kawaii Genki
06-30-2004, 08:30 PM
Well, target="blank" does not work either.

And I know that the link with the C:blah blah will not work when I upload it. I'll have to change it to its internet link when I upload it. For some reason, the page won't show up without the whole location. It won't let me just put "DestinysKey/Manga/ >< That's a bit of a pain...

But yeah...I just can't get it to open in a new page which is bothering me...

salomeyasobko
06-30-2004, 08:32 PM
target="new_page" isn't valid.. and either is target="blank". it needs to be target="_blank"..

<option value="DestinysKey\Manga\page02.html" target="_blank">Page 2 </option>
<option value="DestinysKey\Manga\page03.html" target="_blank">Page 3 </option>
<option value="DestinysKey\Manga\page04.html" target="_blank">Page 4 </option>
<option value="DestinysKey\Manga\page05.html" target="_blank">Page 5 </option>
<option value="DestinysKey\Manga\page6.html" target="_blank">Page 6 </option>

try that..

Kawaii Genki
06-30-2004, 08:44 PM
Yes...but I had tried that as well, I think I forgot to mention that ^^;;

salomeyasobko
06-30-2004, 08:52 PM
did you try change target=mainframe to target=_blank and adding target=_blank to each option value tag? maybe both will work?

make sure you add target=_blank to the first option too.