Click to See Complete Forum and Search --> : New window problems


satchmo
04-06-2003, 07:47 AM
Hi.

I was kind of hoping someone here could help me.

I'm having problems with a "pop-up"-like feature on my page. I have a script that would open up a new page on the click of a link. But I can't figure out how I can add another link but open another window with other settings.

And another question.
Is there any way to make a table or a cell in a table part-transparent or maybe an iframe part-transparent so only the background is a "see through" color?

Thanks.

khaki
04-06-2003, 10:13 AM
Hi satchmo (love your big puffy cheeks! lol)...

Your first question is a little confusing (and a bit general in nature), so maybe post the code that you have and try to further explain what you want.

As to your second question...
the background will be the same color as the document's background color UNLESS you specifically alter it .

;) k

satchmo
04-06-2003, 01:20 PM
here I'll write the whole code for you.

<script>

var windowW=800
var windowH=600

var windowX = (screen.width/2)-(windowW/2);
var windowY = (screen.height/2)-(windowH/2);

var urlPop = "http://the page that will come up"

var title = "Title of my page"

var autoclose = false

s = "width="+windowW+",height="+windowH;
var beIE = document.all?true:false

function openFrameless(){
if (beIE){
NFW = window.open("","popFrameless","fullscreen,"+s)
NFW.blur()
window.focus()
NFW.resizeTo(windowW,windowH)
NFW.moveTo(windowX,windowY)
var frameString=""+
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"</head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='"+urlPop+"' scrolling=no>"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>"
NFW.document.open();
NFW.document.write(frameString)
NFW.document.close()
} else {
NFW=window.open(urlPop,"popFrameless","scrollbars,"+s)
NFW.blur()
window.focus()
NFW.resizeTo(windowW,windowH)
NFW.moveTo(windowX,windowY)
}
NFW.focus()
if (autoclose){
window.onunload = function(){NFW.close()}
}
}

</script>

and this i got in the body

<A HREF="javascript:openFrameless()">click here</a>

do I have to make a totally new code or is there some way to just change the height and width for a new window.

khaki
04-06-2003, 04:01 PM
yikes satchmo....
you been blowin' the horn too long! LOL ;)

Do you really need the exact dynamic capabilities for a multi-resolution situation.... or are you just looking to open a new window of your own dimensions?

Dave already provided a means of creating a new window to "pop-up" by clicking on a link.
It's fully alterable, and you can put as many on the page as you need.

The script which you have now (unless truly needed for it's many abilities) is like using a sledgehammer to push-in a thumbtack.

Explain what you are trying to do, and then maybe we can offer the solution that best fits your specific needs.

;) k

satchmo
04-06-2003, 04:39 PM
well... i figured it the popup:ish thing already. And yes, the code i posted wass a little to much. I narrowed it down to about 10 lines.

To my other question though.

Is there any way you can put a scrolling window on a page with transparent background. Like if you have an IFRAME and want to be able to just see the text that loads in it and not the background color. Or is there any easier way to do that. The thing is that I got a page and i don't want it to reload everytime I want a new section of it loaded. So there for I though I could maybe use an IFRAME with a transparent background so you can see the actual background and not just the black, cuz that messes the page up. take a look at it @ http://www.puget-sound.org if you want. Click the logo to see what i mean. You see a blackened area taking up most of the page and there is where the text is going when I'm done. There must be some way to do it i hope =)

but hey, thanks with the other stuff though. it's nice knowing there a ppl out there willing to help. thanks a bunch

I'll be back.

khaki
04-06-2003, 07:21 PM
hey trumpet man...

i viewed your link in Netscape7.
No black.
No text.
Dead links.
Perfectly transparent background though (wink).

I also viewed it with my buggy IE5.0 and the page just threw errors.

:confused:

sorry...:rolleyes: but i guess that i am unable to help from this point forward.

;) k

khaki
04-06-2003, 10:57 PM
Dave wrote: That's why MS quickly came out with IE 5.01 and everybody was supposed to upgrade to it.Apparently you missed-out on the drama surrounding my PC crash (http://forums.webdeveloper.com/showthread.php?s=&threadid=6138)

I'm lucky to even have 5.0 running. As it is, I've been programming for over 2 weeks using nothing but Notepad and Netscape (hows that for an Editor/Viewer combo? lol). But... I talk to talk, and I walk the walk. Take that WYSIWYGers! :)

and by the way... no fair tacking-on those massive edits without making a reference to it :eek: . That's just cheating! lol

;) k

khaki
04-06-2003, 11:26 PM
even your Taz has a guilty look about him...

no further comment ;)

satchmo
04-07-2003, 02:30 AM
ok. so it seems like the code isn't compatible with netscape. that is why there is a temporary page for now. there will be a netscape section and an ie section.

but dave. i don't really understand what you mean with the 4 hostpital thingys. it is a picture of a hospital hallway but there should be four of them, only one, since the popup window is set to a width/height of 800x600.

none of the computers I've viewed the page from have shown any errors and none have posted any faults in the code. i'll download netscape when i get back home and code a new page for that one.

thanks for your comments and your replies