User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 375,174 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,091 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 5813 | Replies: 2
Reply
Join Date: Nov 2004
Posts: 16
Reputation: Secret Agent is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
Secret Agent Secret Agent is offline Offline
Newbie Poster

new popup window, chromeless / no scrolls?

  #1  
Apr 4th, 2005
Got everything set except dont' know where to put the no scrollbar (scrollbars=0 or scrollbars=no) command.

<html>

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Eric King (eric_andrew_king@hotmail.com) -->
<!-- Web Site:  http://redrival.com/eak/ -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//  End -->
</script>
</HEAD>

<body>
<a href="http://mydomain.com/tour/master.htm" onclick="NewWindow(this.href,'name','550','400','yes');return false;">Site Name Flash Tour<br>
<IMG SRC="http://mydomain.com/tour/getFlash.gif" border="0"></a>

</body>

</html>
Can someone please explain?

Thank you.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,589
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 34
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: new popup window, chromeless / no scrolls?

  #2  
Apr 5th, 2005
In your above code snippet, you're building a string called "winprops" that is used in the window.open() command.

That string is built from hard-coded strings and variables that are passed into the function.

When you call the NewWindow() function, you pass in the values:

NewWindow("www.tgreer.com","500","400","no")

would create a new window, 500x400, with no scrollbars, containing my website as content.

If you want it to NOT be resizable, you need to change the winprops string to:

winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'

I would recommend you not do this. When you take away the ability for a user to do something they expect to be able to do (such as resize a window), it creates a "negative user experience".
Reply With Quote  
Join Date: Nov 2004
Posts: 16
Reputation: Secret Agent is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
Secret Agent Secret Agent is offline Offline
Newbie Poster

Re: new popup window, chromeless / no scrolls?

  #3  
Apr 5th, 2005
Thank you
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 12:19 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC