Javascript - popup window

  • Impreza
  • Beginner
  • Beginner
  • Impreza
  • Posts: 43

Post 3+ Months Ago

Does anyone know of a code that when you click on a link..it willl come out as new window. Only thing that the window have no toolbars..no scrollers...and also have the ability to size the windows to your specifications..thanks.. 8)
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Hacker007
  • Proficient
  • Proficient
  • User avatar
  • Posts: 371
  • Loc: Riverside, CA

Post 3+ Months Ago

http://javascript.internet.com/generato ... indow.html
the easy way ;)
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

that's terrible code... you don't need all that.



Code: [ Select ]
<script LANGUAGE="JavaScript" TYPE="text/javascript">
function open_window(path,name,w,h){
 params = "width="+w+",height="+h;
 WH = window.open(path,name,params)
 return false;
}
</script>

<a HREF="#" onClick="open_window('file.html','newWin',150,300)">Open</a>
  1. <script LANGUAGE="JavaScript" TYPE="text/javascript">
  2. function open_window(path,name,w,h){
  3.  params = "width="+w+",height="+h;
  4.  WH = window.open(path,name,params)
  5.  return false;
  6. }
  7. </script>
  8. <a HREF="#" onClick="open_window('file.html','newWin',150,300)">Open</a>


.c
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

Carnix wrote:
that's terrible code...

So's yours if the user has js disabled :wink:

Code: [ Select ]
<script type="text/javascript">
function open_window(path,name,w,h){
 params = "width="+w+",height="+h;
 WH = window.open(path,name,params)
 return false;
}
</script>

<a href="file.html" onclick="open_window(this.href,'newWin',150,300);return false;">Open</a>
  1. <script type="text/javascript">
  2. function open_window(path,name,w,h){
  3.  params = "width="+w+",height="+h;
  4.  WH = window.open(path,name,params)
  5.  return false;
  6. }
  7. </script>
  8. <a href="file.html" onclick="open_window(this.href,'newWin',150,300);return false;">Open</a>


Think that's right. Not tested though
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

rtm223 wrote:
So's yours if the user has js disabled :wink:


Yeah yeah :P

It would be impossible for the requirements of this post to be met without using JavaScript. so there! nyaaaa! :wink:

.c
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

Yes but my version will still show <i>something</i> to non-js type people, rather than a dead link.
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5149
  • Loc: SC-USA

Post 3+ Months Ago

Alright guys, the question got answered.

;)
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

Just a little professional rival *edit (er...rivalry that is) dM, all in good fun =]
.c
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5149
  • Loc: SC-USA

Post 3+ Months Ago

I know, I know. It is.

I just don't want it to go further. :D
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

digitalMedia wrote:
I just don't want it to go further. :D


Well it won't, as long as everyone accepts that my way is the best way! :lol: only joking guys :D
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

8)
  • Hacker007
  • Proficient
  • Proficient
  • User avatar
  • Posts: 371
  • Loc: Riverside, CA

Post 3+ Months Ago

Code: [ Select ]
that's terrible code... you don't need all that.


Thats was the best I could do :oops:

@rtm223- Good point, I just cant belive some people wont support java in their browsers.. Its so commonly used these days. :(
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

accurate browser stats are hard to come by, but what I've seen all points to about 10% of users. Many of them are on networks where the sys admin has kindly switched it off for them!

Bear in mind that in addition to this, there are also things like mobile phones and other portable devices that don't support JS

It's widely used and often badly used. Rule of thumb is to make the feature <i>useable</i> without JS. Same with images and anything else that might not be available / supported by certain people / browsers / devices / whatever.
  • jlknauff
  • Expert
  • Expert
  • User avatar
  • Posts: 502
  • Loc: Florida

Post 3+ Months Ago

Interesting, do you really think it is that low though? How about CSS then, is that affected?
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

jlknauff wrote:
Interesting, do you really think it is that low though? How about CSS then, is that affected?


are you talking about the javascript thing?

If so then I am quite suprised, as there are so few security exploits for javascript, and security is the main excuse.

As for CSS, very few people turn that off. I'm not even sure how to turn it off in anything but opera! You just need to do loads of testing in as many browsers as possible.
  • jlknauff
  • Expert
  • Expert
  • User avatar
  • Posts: 502
  • Loc: Florida

Post 3+ Months Ago

Yes, I was talking about JS. I didn't think it was only 10%.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

Really? I was suprised that many people would bother to switch it of. I personally don't know anyone who doesn't have it enabled.

Anyway figures vary. I have seen 5% - 20%, the problem is that browser stats are never, and will never be, accurate. You just have to use them as indication.

It comes down to the fact that a significant number of the internet population is not using javascript.
  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

rtm223 wrote:
It's widely used and often badly used. Rule of thumb is to make the feature <i>useable</i> without JS. Same with images and anything else that might not be available / supported by certain people / browsers / devices / whatever.


Often referred to as Graceful Degradation, or sometimes Failing Gracefully. Basically, you make it the way you want it, then you figure out the exception problems that will occur rarely, and put in stopgaps so your whole app won't fall apart. The more common a given rare problem might be, the more effort you put into the stopgap.
.c
  • xlaxmat
  • Newbie
  • Newbie
  • User avatar
  • Posts: 12
  • Loc: Phoenix, Arizona

Post 3+ Months Ago

hey guys i'am wondering if anyone here is real familiar with Microsoft Front Page 2002, even if your not you might be able to help me. i saw all the javascript that you guys put up to make a pop up window. every time i try to paste that into my paragraph of text it erases it all for some reason. I don't know if its because i put it in wrong or what? Please help me if you have an answer.
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Posts: 524
  • Loc: NC, USA

Post 3+ Months Ago

the portion between the script tags goes between your head tags...the portion in the a href tags goes in your paragraph...does that help?
  • xlaxmat
  • Newbie
  • Newbie
  • User avatar
  • Posts: 12
  • Loc: Phoenix, Arizona

Post 3+ Months Ago

Thanks, That answered my question.

Post Information

  • Total Posts in this topic: 21 posts
  • Users browsing this forum: No registered users and 35 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.