SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    fulham
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question tiltes in popup windows

    I have a site (www.site1.com) that pulls a popup page from another website URL (www.site2.com). But in the title it shows the "www.site2.com - pagetitle" is there any way I can get it to show just "pagetitle" ?

    any help on this matter would be very much appreciated

    Cheers

    Coup

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please search next time. This was asked in this forum just a few days ago.

    http://www.sitepoint.com/forums/showthread.php?t=246841
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    fulham
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face

    I very sorry but don't undersatnd what was really said in that thread using the
    PHP Code:
    gPicWin.document.title 'MyTitle'
    i'm not sure want to do with it

    the code I'm using is
    PHP Code:
    function popup(mypage,myname,w,h,s,r){
                                 var 
    winl = (screen.width-w)/2;
                                 var 
    wint = (screen.height-h)/3;
                                 var 
    settings  ='height='+h+',';
                                     
    settings +='width='+w+',';
                                     
    settings +='top='+wint+',';
                                     
    settings +='left='+winl+',';
                                     
    settings +='scrollbars='+s+',';
                                     
    settings +='resizable='+r+',';
                                 
    win=window.open(mypage,myname,settings);
                                 if(
    parseInt(navigator.appVersion) >= 4){win.window.focus();}

    and the link code is
    PHP Code:
    javascript:popup('http://site1.co.uk/page.html/','launch','400','400','no','no'
    where would I add
    PHP Code:
    gPicWin.document.title 'MyTitle'
    ?

  4. #4
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In your function, right after

    win=window.open(mypage,myname,settings);

    put

    win.document.title = "this is a title";

  5. #5
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In your function, right after

    win=window.open(mypage,myname,settings);

    put

    win.document.title = "this is a title";
    In FF1.0, that doesn't work for me when I run it locally--the title is preceded by some of the opener's page info. Does it work in FF1.0 if you run it remotely?

  6. #6
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    fulham
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that doesn't work for me ether

  7. #7
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    fulham
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is there an onload function that I can use to change the title?
    Cheers

    Coup

  8. #8
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <body ... onload="document.title='My Title';">
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  9. #9
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    fulham
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you again

    That worked but not quite how I wanted.

    It changed the title but it didn't remove the url before the title in the popup title bar.

    Sorry if this is getting a little tiresome I don't mean it too
    Cheers

    Coup

  10. #10
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you have <title>...</title> in the page that is loaded into the popup?
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  11. #11
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    fulham
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes
    Cheers

    Coup

  12. #12
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then it's just a feature of the browser, that you can't do anything about.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  13. #13
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    fulham
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh well thank so much for trying anyway
    Cheers

    Coup


Bookmarks

Posting Permissions

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