|
Author |
Message |
Gary
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
![](http://www.dontstop.co.uk/inside/images/avatars/1427194620400455310c362.jpg)
Joined: 30 Apr 2003
Posts: 21
Location: the UK, Devon
|
Posted:
Wed Mar 03, 2004 11:18 pm (20 years, 3 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Hey all, i want this code to open a window of a certain size... so i was told to do this:
Quote: | <SCRIPT language=JavaScript>
<!--
function click()
{
window.open("http://www.dontstop.co.uk/v2/atb/html_files/lyrics-music-inlovewiththedj.htm","click1","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=550,height=500");
}
//-->
<!--
function click()
{
window.open("http://www.dontstop.co.uk/v2/atb/html_files/lyrics-melodies-9pmtillicome[134].htm","click2","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=550,height=136");
}
//-->
<!--
function click()
{
window.open("http://www.dontstop.co.uk/v2/atb/html_files/lyrics-melodies-dontstop[134].htm","click3","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=550,height=136");
}
//-->
</SCRIPT> |
great, i link as javascript:click(1); javascript:click(2); javascript:click(3); and so on, but the problem is - the same window ALWAYS opens... same size and everything??? what am i doing wrong? please help ![Sad](/forums/images/smilies/icon_sad.gif) |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Gary Find all posts by Gary](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) ![MSN Messenger MSN Messenger](templates/4WebHelp2/images/lang_english/icon_msnm.gif) |
![](images/spacer.gif) |
php4ever
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
![](images/avatars/gallery/artistic/LH_95.gif)
Joined: 10 Oct 2002
Posts: 49
|
Posted:
Thu Mar 04, 2004 3:40 am (20 years, 3 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
The function just needed a little tweaking so here's the revised code and it works. Put the following javascript in the HEAD section or alternatively at the end of the BODY -- your choice.
<SCRIPT LANGUAGE="JavaScript">
<!--
function click(num)
{
var features = "width=550,height=136,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no";
var theurl = "";
var hostetc = "http://www.dontstop.co.uk/v2/atb/html_files";
var thepath = new Array(3);
thepath[0] = "/lyrics-music-inlovewiththedj.htm";
thepath[1] = "/lyrics-melodies-9pmtillicome[134].htm";
thepath[2] = "/lyrics-melodies-dontstop[134].htm";
num--; // adjust num so will index into array properly
theurl = hostetc + thepath[num];
window.open(theurl,"nuwin",features);
}
//-->
</script>
Then in the BODY section you would call the function like this:
<a href="javascript: click(1);">click 1</a><BR>
<a href="javascript: click(2);">click 2</a><br>
<a href="javascript: click(3);">click 3</a><br>
Hope this helps. |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by php4ever Find all posts by php4ever](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
Gary
Junior WebHelper
![Junior WebHelper Junior WebHelper](images/rank_1.gif)
![](http://www.dontstop.co.uk/inside/images/avatars/1427194620400455310c362.jpg)
Joined: 30 Apr 2003
Posts: 21
Location: the UK, Devon
|
Posted:
Thu Mar 04, 2004 9:03 pm (20 years, 3 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
you guys are geniuses!!!
cheers guys!!! ![Cool](/forums/images/smilies/icon_cool.gif) |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Gary Find all posts by Gary](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) ![MSN Messenger MSN Messenger](templates/4WebHelp2/images/lang_english/icon_msnm.gif) |
![](images/spacer.gif) |
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.13466 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
|