Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    191
    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,574
    Likes Received:
    3
    Trophy Points:
    193
    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">
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    191
    Well, it's not pretty, but it works. Thanks!!
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    193
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    191
    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:
    151
    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:
    191
    Wow, thanks! Works like a charm.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice