Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    New Window via Javascript working, have question...

    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.
    Code:
    <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.
    Code:
    <a href="/images/striph.html" onClick="profilepop('/images/striph.html');return false;"></a>

    username.html
    Heres the code that calls the 'java info window'
    Code:
    <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.
    Last edited by Striph; 12-15-2004 at 08:32 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •