The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Open new window with cpanel code

Discussion in 'User Experience' started by casey, Apr 15, 2003.

  1. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Sorry for the ambiguous title. What I want to do is open up a new window for the subdomain stats program. The code in the skin says:
    <cpanel Stats="printsubwebalinks()">

    What do I need to do to this to make it pop up in a new window...or can I do that?
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Easiest way is to put the code in a new webpage, then where the code was change the tag to an href pointing to the new file with the target _new tag.

    Example:
    So put <cpanel Stats="printsubwebalinks()"> in a new file called subs.html

    In orginal file replace <cpanel Stats="printsubwebalinks()"> with <a href="subs.html" target="_new">
     
  3. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Well, it's not pretty, but it works. Thanks!!
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Casey - That was just a basic way to do it. You could do other things like adding headers and footers, window sizing and such.
     
  5. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    No, it's fine the way you described. I'm using frames, so I don't need any headers or footers. I was just hoping to get the awstats page to pop up automatically rather than having the user click two links to get there. No problem, though. Not many if any of my customers use subdomains, anyway.

    Thanks again for your help. I really appreciate it.
     
  6. serversonic

    serversonic Member

    Joined:
    Sep 1, 2002
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Do the following:
    Code:
    <base target="_blank"><cpanel Stats="printsubwebalinks()"><base target="_self">
    The first base tag changes the target to _blank which is a new window. Then the second one changes it back to _self so further links are processed in the current window.
     
  7. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Wow, thanks! Works like a charm.
     
Loading...
Similar Threads - Open window cpanel
  1. fdmsaraiva
    Replies:
    3
    Views:
    350

Share This Page