...

View Full Version : New Window via Javascript working, have question...



Striph
12-09-2004, 06:15 PM
I have a roster page for our site that at the moment is a java thing that opens a new window, set size and whatnot. The window it calls open is a simple html page that has some java in it, and this all works. But it requires me to have one main page and a page for every user.

Heres the actual page so you can see it working.
http://www.darktalisman.com/forums/roster.php

I was wondering if there was a way to incorporate the extra html page into the main one and then call the value someway instead of having it hardcoded into the secondary html.

Roster.php

This is the code to open the new window.


<script type="text/javascript">
var newwindow;
function profilepop(url)
{
newwindow=window.open(url,null,'height=450,width=340');
if (window.focus) {newwindow.focus()}
}
</script>


Heres the code for the link.


<a href="/images/striph.html" onClick="profilepop('/images/striph.html');return false;"></a>



username.html
Heres the code that calls the 'java info window'


<SCRIPT language="JavaScript1.2" src="http://www.thottbot.com/?eprofile=Striph.Icecrown" type="text/javascript"></SCRIPT>


I'd like to be able to just specify a link that calls like say "Striph" and creates the new window without having to call that second html file, I tried hardcoding in the url and Icecrown name since those are static, only the name changes, but nothing ended up working. If anyone has any ideas or could offer a hand I'd appreciate it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum