The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Applications (http://hintsforums.macworld.com/forumdisplay.php?f=5)
-   -   Can anyone help with some Javascript? (http://hintsforums.macworld.com/showthread.php?t=36834)

Daily 03-21-2005 11:37 AM

Can anyone help with some Javascript?
 
Sorry if this is the wrong forum to post this question in, but I couldn't see an obvious alternative, and it does, in a round about way relate to an application. (any browser)

Im trying to pop a window off of one of the pages on my site and I would like the window to be fullscreen, and as plain as possible ie; no nav, no scroll bars etc... I do not know any Javascript, but have managed to piece this together from various sites, it kind of works but is not full screen, can someone tell me what i'm doing wrong.

Code:

var newwindow;
function popup(url)
{newwindow=window.open(url,'name','screen.availHeight,screen.availWidth');if (window.focus) {newwindow.focus()}}
</script>



Maybe there is a better way of doing this? Also Will I have problems with this in different browsers and on different platforms?

Thankyou for any help

+Daily

PS: Its not for spamming purposes

cwtnospam 03-21-2005 11:47 AM

Please, please, please: NO POP UPS!

djhayn 03-21-2005 12:32 PM

Full screen windows are generally not very well received by many people unless they are specifically looking for a full screen window. Personally I hate it when somebody else controls the size of the window I am looking at. If you really have a reason for it, make sure that the visitor knows its going to pop up and that they have to click on a link to do it (not automatically). If it's automatic safari will block it anyways.

That said, I'm not very good with javascript but when I need help this site is:

http://developer.irt.org/script/window.htm

there are a couple different questions on that page about full screen windows, just do a search on the page.

voldenuit 03-21-2005 12:32 PM

I am afraid, your request might damage your reputation here more than you think.

Like cwtnospam said, you should probably even forget how you managed to want to do something like that in the first place.

I am unable to stretch my imagination enough to come up with a legit use of such a function by a respectable website.

Added: 2005-03-21 18:51 Uhr

Well, I can see valid reasons to do so now.

However, counting myself in on the net.police rant, I will refrain from contributing on the subject.

Answers here are not due, but offered to those who ask in a way that encourages a reply.

Daily 03-21-2005 12:42 PM

Yeah thanks cwtnospam, thats just the kind of narrow minded response I need, Not that I should have to justify to YOU or anyone my purposes for the need to use a popup, I will in this case since I do need help and I do understand that people abuse Javascript in this way for bullshit advertising...

I am an art/graphic student and have sections on my site where I need the veiwer to open a new page, containing large format layouts and photography, the reason for "fullscreen" is that I want my work to be viewed in as near as I can get to a "controlled environment" which is extremely difficult to do in the world of the web. Here is an example page:

http://trustyeight.com/trustyeight/i...p?idcatside=93

+Daily

Daily 03-21-2005 12:48 PM

Id also like to point out that my site is for prospective clients and people who need/would like to preview my work, these people will want to see my work, how I intend it to be seen, if that happens to be on a medium grey backround without any obtrusive nav/scroll bars then I feel that is legitimate, if people are that against it then they should switch off Javascript in their browser prefs and not look at my work, I do not appreciate the "Police the Web" Mentality, although I do understand that *if* you know how to do something you reserve the right to keep it to yourself if you feel it may be abused.

+daily

www.trustyeight.com

DeltaMac 03-21-2005 12:53 PM

Wouldn't 'fullscreen' to create a 'controlled environment' vary a lot depending on the local video capability? (Think 12" iBook, then a 30" LCD...)

Daily 03-21-2005 01:02 PM

yes, I understand what you are saying, but im afraid you dont understand me, the "controlled environment" refers to covering up any lary / coloured background, and customised browser nav and scroll bars, I did say that a "controlled environment" is extremely difficult to reproduce accross the web, but it is allot better than nothing, with fullscreen I get to position my work in clear veiw, centered at the correct height etc... I could argue this all day, and am surprised at the agitated response I have insighted, but I do appreciate the discussion on the topic and appreciate people taking the time to reply to me.

thankyou

+daily www.trustyeight.com

PS: notice how I do not inflict my fullscreen preference anywhere other than where I feel it is required, in fact I even offer it as a "serving suggestion on the main page"

Daily 03-21-2005 01:15 PM

voldenuit, I understand and appreciate your response, I have somewhere in the region of 30ish posts here more often than not requesting some help with something, I do not feel that I have a problem asking for help in a way that encourages respose, I have never seen anyone here react to a help request like this, thats pretty patronising on your part, since it would seem that the error was on your part, instantly jumping to negative conclusions, perhaps there should be some guidelines on what exactly you can ask for help with and what you can't > many many requests and answers here can be used in a negative way, maybe most of the Unix section should be censored?

+nice one mate, you're right, I am unlikely to get any help, and proberly have "damaged my reputation here"

cwtnospam 03-21-2005 02:01 PM

Daily,

You've got to understand that popups leave such a bad taste and are so overused and abused that even for legitimate uses they're not well received. Essentially, they've become bad design.

A better method would be to use the html code used by this site (view source, search for links to your site) to create links that people could click. If the resulting page would best be viewed full screen, the user can easily choose to expand the window. Of course, it's your site, and you can do what you want, but if people believe that your site attempts to control their systems, they won't be back.

Daily 03-21-2005 04:17 PM

EDIT: [cwtnospam, have a look at this page, this is where the window pops off from, it is entirely of the users own accord, I will consider putting a note warning the visitor that a new window will open. http://trustyeight.com/trustyeight/i...p?idcatside=38

Is this really unreasonable?]

That's right, I do understand. I myself have unsolicited pop-ups blocked, it's interesting that you mentioned bad design, because in this case it is in name of good design. Perhaps it's the term "pop-up" that has caused all the fuss, sure I could use HTML and just link and create a new page, but I require the ability to position that page and control how that page looks. I am definitely in agreement about not using "my system to control their system," but what I am doing is creating a NEW window on top of the existing site window, when a user chooses, in the specifications that suit both my work and most likely the viewers needs, it is the designers job to create a suitable environment for their work to be viewed in and know what is best for the end user, I also see it to be my right to show my work in any way I see fit. The problem here is the negative over reaction to a genuine post asking for help. I would say that the majority of posters here are very intelligent people, and yet not ONE single person bothered to ask what my need for resizing a browser window would be. Just because pop-ups are abused does not mean that those that need them for legitimate reasons should be put down. If that were the case then we should apply that logic everywhere and see how well it works... Hmm Cars, Alcohol, Guns, Governments, headache pills, knives... etc. etc., these are just a few random things I can think of off the top of my head, that get used and abused in a negative way and if you put your mind to it, almost everything is used in ways that are considered to be negative... No hard feelings anyone, this is certainly an interesting debate, the suggestion that all kinds of pop-ups used for any reason what so ever all over the entire planet on hundreds of thousands of web-sites, should be banned, strikes me as small minded, and I suspect that the people who seek this perspective exercise this control freakism over other facets of peoples lives.

+daily

cwtnospam 03-21-2005 04:37 PM

[QUOTE=Daily]EDIT: [cwtnospam, have a look at this page, this is where the window pops off from, it is entirely of the users own accord, I will consider putting a note warning the visitor that a new window will open. http://trustyeight.com/trustyeight/i...p?idcatside=38

Is this really unreasonable?]

In a word, yes. It's bad enough that the page pops up full screen, but then it doesn't let the user adjust (at least on my work PC, maybe my Mac can?) the size! That's almost certain to be closed immediately.

You're forgetting that beauty is in the eye of the beholder. It's the user who determines whether or not your web page looks better in full screen or not. You certainly can't, because you don't know what size screen they've got or what else they're using it for. If you force a full screen popup on them, they'll close the window and go away. The reason pop-ups are so hated is that EVERY web designer thinks that his/her page should be shown in front of all others and at full screen size.

If you want to do something really good, try using frames. Make one within your web page where new "pages" appear. You can make the frame any size you like and then the user can decide if they want to see the entire frame or scroll through it.

Daily 03-21-2005 05:03 PM

This is unreasonable? My page IS opening full screen? The whole reason I was posting was that it wasn't... About the not being able to re-size the window, you can on a mac, I was unaware that you couldn't on a PC, yes that IS unreasonable and I will look into that. Frames are ugly even if you are careful to hide them, and cause all sorts of other problems, I hate frames proberly as much as you hate Pop-Ups, I don't care what other designers do (I am not a web designer) and consider nothing off limits just because others act like dicks. My point is: Know your target audience... and I do. My site is only designed for those that atually need/want to view my work... not for anyone that comes accross it through a bit of googling, this sounds pretentious I'm sure, but there is good reasoning behind this. Try not to look at all things with every day eyes.

Thankyou for taking the time to debate this, you have made some valid points, (despite whether I agree or not) my site is still in extremely early stages, and although I will not compromise on the javascript window, I will most likely not pursue full screen.

+Daily Delight

fat elvis 03-21-2005 05:48 PM

hey daily---FWIW, I posed this same question to a friend of mine when i was first learning web design...and the answer was the same. he basically didn't help me becuase he didn't agree with my methods. I think this is one of the rare cases where assilimation is good.

Resistance Is Futile

voldenuit 03-21-2005 06:41 PM

Quote:

Originally Posted by Daily
voldenuit, I understand and appreciate your response, I have somewhere in the region of 30ish posts here more often than not requesting some help with something, I do not feel that I have a problem asking for help in a way that encourages respose, I have never seen anyone here react to a help request like this, thats pretty patronising on your part, since it would seem that the error was on your part, instantly jumping to negative conclusions, perhaps there should be some guidelines on what exactly you can ask for help with and what you can't > many many requests and answers here can be used in a negative way, maybe most of the Unix section should be censored?

+nice one mate, you're right, I am unlikely to get any help, and proberly have "damaged my reputation here"

I have indeed lacked imagination and what you are trying to do definitely is respectable.
Whether it is a good design/human interface decision has been debated and my point of view on the subject does not need further development.

As you turn out to be aware of the problem, asking your question in a way prominently showing your awareness of common abuse of that function would probably have helped to start a thoughtful debate immediately without three posts pointing out you were trying to do a Bad Thing first.

Calling people narrow-minded, even if you think they are, will probably not further their willingness to maintain a conversation neither.

My assumption was wrong, however you want useful answers, so looking out for ways to avoid this kind of misunderstanding is probably helpful.

Questions are often asked in a how can I do A using program B rather than how do I solve problem C.

Given the fact that the question that really needs to be solved is the second one, it is often a good idea to state what you're up to.
That provides at least a bit of context to come up with the most helpful answer.

Which is basically what this whole forum is all about.

cwtnospam 03-21-2005 07:53 PM

Quote:

Originally Posted by Daily
This is unreasonable? My page IS opening full screen? The whole reason I was posting was that it wasn't... About the not being able to re-size the window, you can on a mac, I was unaware that you couldn't on a PC, yes that IS unreasonable and I will look into that.

It opened full screen on the PC and full screen height on my Mac, not full width. :) You're right, it can resize on the Mac. As long as you don't care if people use the site, I guess you'll be happy with it your way. My personal feeling is that if it works well on the Mac, then who cares about PC users? They're used to things not working right anyway. :D

Daily 03-22-2005 06:25 AM

what can I say? Volenuit, I have no idea what your problem is, your argument over and over is that I was unreasonable with my request, go back and read my first post, then read it again. (and I did explain what I was trying to do, and placed it within a context, I admit though I didn't put my hand up and say that it was for good not evil) I was perfectly polite, did not demand an answer, and only asked if someone with a bit of javascript knowhow could POINT OUT WHERE I MAY HAVE GONE WRONG, not decide that what I choose to do on my site is un-ethical, the fact is you jumped to the wrong conclusion, you're the prat not me. Don't tell me how I should ask a question you mini-hitler, yeah I did not think think about ill-use issues when I posed the question, because I am an easy going person who rarely thinks on the negative, next time you want to take a few stabs at someone ask them a few questions first, here's a quote from Bill Hicks: "why don't you take a look at the world around you... and shut the hell up" it's only a god damn extra page opening up, it can be closed with a short cut in seconds! Take a leaf from cwtnospams book, engage in some intelligent conversation and move the subject forward instead of dictating to people what they should and should not do, answer me this, can ALLOT of the stuff in the unix forum be ill-used?? yes it can, so go and bark up that tree too.

Resistance is Not Futile, hoho +daily

cwtnospam 03-22-2005 09:50 AM

I think you're over reacting to volenuit's point. Basically, volenuit is right in pointing out that anything you do involving people requires that you consider their point of view. That includes design of any type and especially asking for help.

The most important rule of design is that the users dictate what is good. Like it or not, they are the ones who know best. The fact that they don't know how to, or can't easily create it is what gives the designer a job.

vancenase 03-22-2005 10:02 AM

just a shout out to Daily ... i like your site. and, if i maximize it and want to make it smaller, i can hit the green 'dot' in Safari.

hayne 03-22-2005 10:31 AM

Daily:
The language and tone you have used in some of the above posts is verging on the unacceptable for these forums. I don't care how much you feel insulted or frustrated - you still need to keep it civil.

And please try to break up your posts into smaller paragraphs - or at least use a few carriage returns for their visual effect!

ibroughton 03-22-2005 10:32 AM

Just add a to your page giving people the option to view it full screen?

Quote:

<a href="javascript:self.moveTo(0,0);self.resizeTo(screen.availWidth,screen.availHeight);"><font color="#000000" face="Arial, Helvetica, sans-serif">View Full Screen</a>
or is you want to specify a set window size

Quote:

<a href="javascript:function%20rsz(s,i,w,h,m){if(i.screenX0||i.outerWidth%3Ew||i.outerHeight%3Eh){s.moveTo(0,0);s.resizeTo( w,h)};if(m){s.moveTo(m==1?0:screen.availWidth-w,0);};s.resizeTo(w,h);};rsz(self,window,1024,768,1);"><font color="#000000" face="Arial, Helvetica, sans-serif">View Optimum Size</a>
and replace the 1024,768 bit with your desired resolution

Daily 03-22-2005 02:54 PM

Hey vanacenase, thanks for the compliment, the site is nowhere near finished, I have a lot of graphic work to upload, it should be cool when that's done.

ibroughton, thankyou thats what I'd settled on doing, I have something similar on the main page.

Hey Hayne....... You think I care what you think? Lets be adults about this and lock this thread. There is more to life than telling

People

What

They

Should and...

Should not

DO.

Look at my initial post, I was perfectly polite, and reasonable. Then look at my post history, not one problem...

LMAO...LOL...LOL...LOL... Carriage

Returns for

Effect... Good One......AHHHHHHHhahahahaha :D

+Daily

fat elvis 03-22-2005 03:37 PM

Quote:

Yeah thanks cwtnospam, thats just the kind of narrow minded response I need, Not that I should have to justify to YOU or anyone my purposes for the need to use a popup, I will in this case since I do need help and I do understand that people abuse Javascript in this way for bullshit advertising...
yeah, IBTL :D

very classy Daily...good show

Daily 03-22-2005 04:28 PM

Cheers dude, this thread is waaaaaay out of control, ITBL... ahahahaha I'd never heard that before... brilliant!

+daily

voldenuit 03-22-2005 04:39 PM

Given the fact that this thread also promotes your website, perhaps we should feed google some more interesting details that will enable potential clients to admire your perfectly polite and reasonable postings:

[edit by moderator to remove personal details]

May your exquisite manners accompany your in your brilliant career to come.

hayne 03-22-2005 04:52 PM

Quote:

Originally Posted by voldenuit
Given the fact that this thread also promotes your website, perhaps we should feed google some more interesting details that will enable potential clients to admire your perfectly polite and reasonable postings

voldenuit:
Your seemingly vindictive post with personal details about a user was way out of line and brings you very close to being banned from these forums.
Such things will not be tolerated.

Daily 03-22-2005 04:52 PM

Oh thats real good that is, you forgot my mobile number, 07985677805... You think thats clever? You think that's exceptable?

And what? What exactly has got you so wound up to the point of wasting your time looking up personal information? I'd put that stuff on my site anyway...

+daily

Daily 03-22-2005 04:55 PM

Hayne this thread is getting waay out of control and should be locked, I have a genuine respect for the fact that you removed that information, even though it didn't bother me, you definatley are the bigger man. This is my last post on the matter.

+daily

Craig R. Arko 03-22-2005 05:03 PM

Quote:

Originally Posted by Daily
Hey Hayne....... You think I care what you think? Lets be adults about this and lock this thread. There is more to life than telling

People

What

They

Should and...

Should not

DO.

+Daily


You may not care what the staff here thinks, but we do. Your posting privileges are suspended for one week.


All times are GMT -5. The time now is 09:54 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.