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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change Title bar

    Hi all,

    I'm new to JavaScript but know some Actionscript so please bear with me.

    I'm trying to figure out how to change the title in a popup window when a user clicks on a link. Right now the title bar displays the path to the file loading in the title bar. What am I missing?

    Heres the code i'm using on a picture to open the new window... its an automatic script created by Dreamweaver. Maybe I should change it to something else?

    <a href="javascript:;" onClick="MM_openBrWindow('case1/521_1_home.swf','','resizable=yes,width=700,height=600')">

    Thanks for any help

    G

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    in the javascript somewhere, i dont know the exact details but it may have like a window.open function somewhere, and before that it may have something like newwin=window.open or something like that, if it doesn't make it say that, so an example of the same script that dreamweaver makes would be, hmm that document.title may work but i think its IE only
    Code:
    <script type="text/javascript">
    function openWin(url,resize,wid,hgt){
    newwin=window.open(''+url+'','','resizable='+resize+',width='+wid+',height='+hgt+'');
    newwin.document.title='blah';
    }
    </script>
    <a href="#" onclick="openWin('somepage.html','yes','500','600');return false;">blah</a>
    Last edited by _Aerospace_Eng_; 02-13-2005 at 01:43 AM.

  • #3
    New Coder
    Join Date
    Jan 2005
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In the properties for the popup window (resizable=yes,width=xx,height=xx) add this qualifier--location=no . This will prevent the URL from showing. I think you change the caption in the title bar with
    title=your title

    Ron
    Last edited by rgn1703; 02-13-2005 at 06:58 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
    •