/    Sign up×
Community /Pin to ProfileBookmark

Is there a way to hide title bar on pop-up window?

I want images to open from links on my website in a separate pop-up window. Is there a way to either hide the title bar or to change the title bar so it doesn’t show the pages url when a separate window is opened? The code I’m using now is – with spaces removed – < a href=”pic.jpg” onclick=”window.open(this.href,’child’,’toolbar=no,height=768,width=1024,
resizable=yes,status=no’); return false” > < img src=”pic.jpg” ></a > . The code works fine except when I open the new window I can see the url in the titlebar area. What am I doing wrong?
BTW, I don’t want to use java script code at the beginning of my page in the event visitors have javascript disabled (I read the above way was best).

to post a comment
HTML

10 Comments(s)

Copy linkTweet thisAlerts:
@kenderJul 11.2005 — well, you can have the image page a html page with the image as the only line of code
[code=html]<html>
<head>
<title> </title>
</head>
<body>
<img src="image.jpg" />
</body>
</html>[/code]
Copy linkTweet thisAlerts:
@LeeUJul 11.2005 — Try this:

[CODE]< a href="pic.jpg" onclick="window.open(this.href,'child','[B]titlebar=no,[/B]toolbar=no,height=768,width=1024,
resizable=yes,status=no'); return false" > < img src="pic.jpg" ></a >[/CODE]
Copy linkTweet thisAlerts:
@bathurst_guyJul 11.2005 — thats still javascript your using though so if they have it disabled then it wont work
Copy linkTweet thisAlerts:
@sdk_fanauthorJul 11.2005 — well, you can have the image page a html page with the image as the only line of code
[code=html]<html>
<head>
<title> </title>
</head>
<body>
<img src="image.jpg" />
</body>
</html>[/code]
[/QUOTE]


Try this:

[CODE]< a href="pic.jpg" onclick="window.open(this.href,'child','[B]titlebar=no,[/B]toolbar=no,height=768,width=1024,
resizable=yes,status=no'); return false" > < img src="pic.jpg" ></a >[/CODE]
[/QUOTE]


Okay, I tried the code but the url still shows up in the titlebar. It looks like my only option is to make a separate .html page for each image (which I was hoping to avoid). Thanks to both of you for your help.
Copy linkTweet thisAlerts:
@sdk_fanauthorJul 11.2005 — thats still javascript your using though so if they have it disabled then it wont work[/QUOTE]
I understand it's still javascript but the site I got the code from said that if that code is used for each individual link, compared to one script for the whole page, then it will still work even if someone has javascript disabled. Guess the site is wrong (?). I'm still learning about javascript and how it works...one of the best ways to learn is by trial and error (and when I can't figure it out, get a little help from those in the know-how ? )
Copy linkTweet thisAlerts:
@felgallJul 11.2005 — What appears in the title bar depends on

  • 1. What appears in the title of the page

  • 2. The particular web browser being used

  • 3. Settings within the browser.


  • It is not posdsible to remove the title bar or completely control what appears in it.
    Copy linkTweet thisAlerts:
    @LeeUJul 11.2005 — My mistake. I saw titlebar and thought toolbar.

    It is, however, possible to change the title in the title bar:

    [CODE]
    <script type="text/javascript">
    <!--
    function changeTitle() {
    var newTitle=prompt("Please enter a new title", "");
    document.title=newTitle;
    }
    //-->
    </script>
    [/CODE]


    [CODE]
    <a href="javascript:changeTitle()">Change title</a>
    [/CODE]
    Copy linkTweet thisAlerts:
    @stymieJul 11.2005 — If your are going to use javascript then just create one page and send your pics to it.

    The page title will always be the same.

    select.htm&lt;html&gt;
    &lt;head&gt;
    &lt;title&gt;Select_Pic&lt;/title&gt;
    &lt;meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;a id="IMGtoSend" href="yourpic.jpg" onclick="window.open('display.htm','child','width=500,height=300'); return false;"&gt;yourpic_name&lt;/a&gt;
    &lt;/body&gt;
    &lt;/html&gt;

    display.htm&lt;html&gt;
    &lt;head&gt;
    &lt;title&gt;Display_Pic&lt;/title&gt;
    &lt;meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"&gt;
    &lt;script type="text/javascript"&gt;
    function getIt()
    { var newPic = parent.window.opener.document.getElementById("IMGtoSend").href;
    document.getElementById("myImg").src = newPic;
    }
    onload= function(){getIt();}
    &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;img id="myImg"&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    Copy linkTweet thisAlerts:
    @sdk_fanauthorJul 12.2005 — Okay, here's another question: if I'm already using a script on my page (I'm using javascript so link urls don't appear on the windows status line) can I also use another script (such as one of the above) on the same page without one script messing up the other? Or can I combine the two scripts? (I really appreciate all the help everyone is giving me)

    This is the script I'm currently using:

    <script>

    function hidestatus(){

    window.status=''

    return true

    }

    if (document.layers)

    document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

    document.onmouseover=hidestatus

    document.onmouseout=hidestatus

    </script>
    Copy linkTweet thisAlerts:
    @WoDJul 12.2005 — Two script blocks will co-exist peacefully in one HTML page in most cases- providing you don't have duplicate function/variable names.
    ×

    Success!

    Help @sdk_fan spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 4.24,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...