/    Sign up×
Community /Pin to ProfileBookmark

Problem :Removing frame from popup

Hi all,
I’m new to the forum so if I break a rule let me know..

I have a alert popup that I want to remove the MS Frame from
I have tried a few things non of them work ..CAN it be done??

-Rebel

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@rebelauthorSep 03.2003 — ok ok ok silly me I forgot my script :

function customAlert(msg) {

var winHeight = 150;

var winWidth = 200;

var xPos = (screen.availWidth/2)-(winWidth/2);

var yPos = (screen.availHeight/2)-(winHeight/2);

modalwin = window.open("", "modalwin", "height="+winHeight+",width="+winWidth+",screenX="+xPos+",screenY="+yPos+",left="+xPos+",top="+yPos);

var content = "<html>

<head>

<title>Alert</title>

</head>

<body bgcolor='#ffffff' onblur='window.focus()'>

<center>

<form>

<table bgcolor='339999' border='0' cellpadding='0' cellspacing='0' class='solid_black'>

<tr>

<td>

<table width='"+(winWidth-20)+"' height='"+(winHeight-20)+"' border='0' class='solid_black'>

<tr>

<td height='5' width='200' valign='top' align='right' bgcolor='#339999' style='filter:progid?XImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr=#003333, EndColorStr=#99cccc);'>

<img src='images/alert.gif' />

<img src='images/spacer.gif' height='5' width='110'/>

<input type='image' src='images/close_a.gif' alt='Close' onclick='window.close()'>

<img src='images/spacer.gif' height='5' width='5'/>

</td>

</tr>

<tr>

<td height='"+(winHeight-80)+"' valign='middle' align='center' bgcolor='white'>

"+msg+"

</td>

</tr>

</table>

</td>

</tr>

</table>

</center>

</form>

</body>

</html>";

modalwin.document.write(content);

modalwin.document.close();

}
Copy linkTweet thisAlerts:
@Khalid_AliSep 03.2003 — 1 get reference to the popup window e.g

winRef = window,open("...","..","...");

  • 2. then presuming you only had one iframe in it


  • var iframeRef = winRef.document.getElementsByTagName("iframe")[0];

    noe you can use removeCHild and removeNode for NS and IE

    you can get DOM implementation for removeCHild from www.w3c.org and try somewhere at microsoft site for removeNode
    Copy linkTweet thisAlerts:
    @rebelauthorSep 03.2003 — Thanks Khalid Ali,

    Talking about fast replies this site is the best..

    I will check that out right now..
    Copy linkTweet thisAlerts:
    @rebelauthorSep 03.2003 — I found that info to be very interesting and useable on something else I'm working on..

    what I'm really trying to do is remove the standard tool bar frame from around the alert popup I'm trying to create

    I will also look back through the forum to see if some else has ever posed the same question
    Copy linkTweet thisAlerts:
    @Khalid_AliSep 03.2003 — [i]Originally posted by rebel [/i]

    [B]

    what I'm really trying to do is remove the standard tool bar [/B]
    [/QUOTE]


    that you have set in the code where youopen the new window.

    such as

    winRef = window.open("","","toolbar=no,location=no")

    and so on
    Copy linkTweet thisAlerts:
    @rebelauthorSep 05.2003 — this is what I ended up using and it works now I have another problem the window can't be moved is there aay to get around that???

    function customAlert(msg) {
    var NewWinHeight=200;
    var NewWinWidth=200;
    // Place the window
    var NewWinPutX=100;
    var NewWinPutY=100;
    TheNewWin =window.open("TheNewWin",'TheNewpop','fullscreen=yes,toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
    TheNewWin.resizeTo(NewWinHeight,NewWinWidth);
    TheNewWin.moveTo(NewWinPutX,NewWinPutY);
    var content = "<html>
    <head>
    <title>Alert</title>
    </head>
    <body background-color='transparent' onblur='window.focus()' style='overflow:hidden'>
    <center>
    <form>
    <table bgcolor='339999' border='0' cellpadding='0' cellspacing='0' class='solid_black' align='center'>
    <tr>
    <td>
    <table width='"+(NewWinWidth-20)+"' height='"+(NewWinHeight-20)+"' border='0' class='solid_black'>
    <tr>
    <td height='5' width='200' valign='top' align='right' bgcolor='#339999' style='filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr=#003333, EndColorStr=#99cccc);'>
    <img src='images/alert.gif' />
    <img src='images/spacer.gif' height='5' width='5'/>
    <img src='images/alerttitle.jpg' />
    <img src='images/spacer.gif' height='5' width='5'/>
    <input type='image' src='images/close_a.gif' alt='Close' onclick='window.close()'/>
    <img src='images/spacer.gif' height='5' width='5'/>
    </td>
    </tr>
    <tr>
    <td height='"+(NewWinHeight-80)+"' valign='middle' align='center' bgcolor='white'>
    "+msg+"
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </center>
    </form>
    </body>
    </html>";
    TheNewWin.document.write(content);
    TheNewWin.document.close();
    }</script>
    ×

    Success!

    Help @rebel 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 5.18,
    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: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

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