1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Quick Question

Discussion in 'Software Development' started by stretchgre, Aug 1, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. stretchgre

    stretchgre Thread Starter

    Joined:
    Dec 26, 2005
    Messages:
    34
    I have pictures on my website and I want to get them to open up without the toolbar. I want just the top border (Internet Explorer Bar) and nothing else to show uo but the picture in the box.

    Also I need the code to embed in my website that if people don't have java they will be prompted that they need if their images don't display.

    Thanks
     
  2. human.soul

    human.soul

    Joined:
    Jul 25, 2006
    Messages:
    5
    Assuming you are confortable with java script, here is a simple function you can use to open a pop up window with no toolbars, see feature below:

    function OpenNewWindow()
    {
    theURL = "pictureURL.html"
    winName = "Picture"
    features = "status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=300,height=300";
    window.open(theURL,winName,features);
    }
     
  3. human.soul

    human.soul

    Joined:
    Jul 25, 2006
    Messages:
    5
  4. stretchgre

    stretchgre Thread Starter

    Joined:
    Dec 26, 2005
    Messages:
    34
    I do not know anything about programming. I was hoping you could llok at the code and tell me where to stick these codes.



    /*
    CHROMELESS WINDOWS v.31.0 [ 4.50K ]
    (c) Gabriel Suchowolski,2000 | www.microbians.com
    Licensed under GNU LGPL (www.gnu.org)
    */

    function chromeless(u,n,W,H,X,Y,cD,cU,cO,cL,tH,tW,wB,wBs,wBG,wBGs,wNS,fSO){
    var c=(document.all&&navigator.userAgent.indexOf("Win")!=-1)?1:0
    var w=window.screen.width; var h=window.screen.height
    var W=W||w; W=(typeof(W)=='string'?Math.ceil(parseInt(W)*w/100):W); W+=2*c
    var H=H||h; H=(typeof(H)=='string'?Math.ceil(parseInt(H)*h/100):H); H+=23*c
    var X=X||Math.ceil((w-W)/2)
    var Y=Y||Math.ceil((h-H)/2)
    var s=",width="+W+",height="+H

    if(c){
    var cTIT='\n'+
    '<html><head><META HTTP-EQUIV="imagetoolbar" CONTENT="no">\n'+
    '<script>\n'+
    'var iclod=new Image();iclod.src="'+cD+'";var iclou=new Image();iclou.src="'+cU+'";var icloo=new Image();icloo.src="'+cO+'";var iload=new Image();iload.src="'+cL+'";\n'+
    'document.onselectstart=new Function("return false;");document.ondragstart=new Function("mWIN();return false;");document.oncontextmenu=new Function("return false;");document.onmousemove=mWIN\n'+
    'b=-1;\n'+
    'function wLoa(){if(top.loaded){bloa.style.visibility="hidden";sRes()}else setTimeout("wLoa()",500)}\n'+
    'function sRes(){bclo.style.pixelLeft=document.body.clientWidth-18;bloa.style.pixelLeft=document.body.clientWidth-38}\n'+
    'function mWIN(){\n'+
    'if(b==0){document.body.bgColor="'+wBG+'";parent.bM.document.body.bgColor="'+wB+'";parent.bT.document.body.bgColor="'+wB+'";parent.bB.document.body.bgColor="'+wB+'";parent.bL.document.body.bgColor="'+wB+'";parent.bR.document.body.bgColor="'+wB+'";b=-1}\n'+
    'if(b==2){px=event.screenX-ofx-1;py=event.screenY-ofy-1;top.window.moveTo(px,py);}\n'+
    'if(b==1){document.body.bgColor="'+wBGs+'";parent.bM.document.body.bgColor="'+wBs+'";parent.bT.document.body.bgColor="'+wBs+'";parent.bB.document.body.bgColor="'+wBs+'";parent.bL.document.body.bgColor="'+wBs+'";parent.bR.document.body.bgColor="'+wBs+'";ofx=event.x;ofy=event.y;b=2}\n'+
    '}</script></head>\n'+
    '<body onresize="sRes()" bgcolor='+wBG+'>\n'+
    '<div style="position:absolute;left:0px;top:4px">'+tH+'</div>\n'+
    '<img id=bmov style="position:absolute;left:-50px;top:-50px" onmousedown="b=1;mWIN()" onmouseup="b=0;mWIN()" border=0 src="" width=150% height=500>\n'+
    '<img id=bclo style="position:absolute;top:4px;left:'+(W-20)+'px;" src="'+cU+'" border=0 width=11 height=11 onmouseover="this.src=icloo.src" onmouseout="this.src=iclou.src" onmouseup="this.src=iclou.src" onmousedown="this.src=iclod.src" onclick="top.window.close()">\n'+
    '<img id=bloa style="position:absolute;top:4px;left:'+(W-40)+'px;" src="'+cL+'" border=0 width=11 height=11>\n'+
    '<script>wLoa()</script>\n'+
    '</body>\n'+
    '</html>'

    cTIT=cTIT.replace(/\//g,"\\\/").replace(/\"/g,"\\\"").replace(/\n/g,"\\n")

    var cFRM='<TITLE>'+tW+'</TITLE>\n'+
    '<script>\n'+
    'top.loaded=false\n'+
    'function mTIT(){\n'+
    ' if(frames.length>6){\n'+
    ' fT.document.bgColor="'+wBG+'";fT.document.write("'+cTIT+'");fT.document.close()\n'+
    ' bM.document.bgColor="'+wB+'";bL.document.bgColor="'+wB+'";bR.document.bgColor="'+wB+'";bB.document.bgColor="'+wB+'";bT.document.bgColor="'+wB+'"\n'+
    ' } else setTimeout("mTIT()",20)\n'+
    '}\n'+
    'mTIT()\n'+
    '</script>\n'+
    '<frameset onselectstart="return false" onload="top.loaded=true" border=0 framespacing=0 frameborder=0 cols="1,100%,1">\n'+
    ' <frame name=bL src="about:blank" scrolling=no noresize>\n'+
    ' <frameset border=0 framespacing=0 frameborder=0 rows="1,20,1,100%,1">\n'+
    ' <frame name=bT src="about:blank" scrolling=no noresize>\n'+
    ' <frame name=fT src="about:blank" scrolling=no noresize>\n'+
    ' <frame name=bM src="about:blank" scrolling=no noresize>\n'+
    ' <frame name=main src="'+u+'" '+fSO+'>\n'+
    ' <frame name=bB src="about:blank" scrolling=no noresize>\n'+
    ' </frameset>\n'+
    '<frame name=bR src="about:blank" scrolling=no noresize>\n'+
    '</frameset>\n'+
    '</HTML>'

    var CWIN=window.open("",n,"fullscreen=1"+s)
    CWIN.moveTo(5000,0)
    CWIN.resizeTo(W,H)
    CWIN.document.write(cFRM)
    CWIN.document.close()
    CWIN.moveTo(X,Y)
    } else {
    var CWIN=window.open(u,n,wNS+s,true)
    CWIN.moveTo(X,Y)
    }
    CWIN.focus()
    CWIN.setURL=function(u) { if (this && !this.closed) { if (this.frames.main) this.frames.main.location.href=u; else this.location.href=u } }
    CWIN.closeIT=function() { if (this && !this.closed) this.close() }
    return CWIN
     
  5. stretchgre

    stretchgre Thread Starter

    Joined:
    Dec 26, 2005
    Messages:
    34
    Can anyone decipher the code above to help me with my problem?
     
  6. thecoalman

    thecoalman

    Joined:
    Mar 6, 2006
    Messages:
    2,491
    Code:
    <html>
    <head>
    <SCRIPT type="text/javascript">
    <!--
    function ShowPopup(page,name,options)
    {
    Window = window.open(page,name,options);
    }
    // -->
    </SCRIPT>
    </head>
    <body>
    <a href="http://yoursite.com/yourpage.html" target="_blank" onclick="ShowPopup('http://yoursite.com/yourpage.html','popup','toolbar=no,resizable=no,menubar=no,width=*window width*,height=*Window height*'); return false;">Your Link Text</a>
    </body>
    </html>
    Works in both IE and Firefox whether JS is enabled or disabled. If JS is enabled they get the pop up like you want. If disabled they get a new normal window. Be sure to place the values between *'s, the *'s are to be deleted.
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/488384

  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