What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

Honestly I still believe this is a legitimate and useful question that got put on hold. I ended up answering it myself, though.

How can I detect if the computer power is suspended in javascript?

It would be good to know how the question could have been better worded to avoid this.

share|improve this question
1  
<small>It seems perfectly fine to me</small> –  minitech Jul 31 '13 at 0:33
    
How that question can be off-topic. Off-topic of what? It's properly headed and tagged. Also the answer looks interesting. It has to be resurrected. –  Miroslav Popov Jul 31 '13 at 0:45
    
@MiroslavPopov Please read my answer for the explanation. –  Andrew Barber Jul 31 '13 at 0:46
    
I may agree whit you for "not minimal efforts" and "no understanding", but the reason for holding is "off-topic"?? –  Miroslav Popov Jul 31 '13 at 0:48
1  
@MiroslavPopov Again... please read my explanation, and read the off-topic box on the question fully. It's off-topic because our topic is to answer programming questions which show prior research effort. –  Andrew Barber Jul 31 '13 at 0:49
    
Andrew you must be right. About 52K total ranks voted for that. SO is a mystery. –  Miroslav Popov Jul 31 '13 at 0:55
1  
@MiroslavPopov "off-topic" means "this type of question doesn't belong here <for reason x>" not "this question isn't about programming." –  Aaron Bertrand Jul 31 '13 at 1:25
    
This is why I don't like tenuously related close reasons being grouped under "off topic". This isn't the first user who's been confused by it. –  Asad Jul 31 '13 at 1:57
    
@Asad I agree there; I can see why "Off-Topic" makes sense, but it definitely has confused a number of people. –  Andrew Barber Jul 31 '13 at 2:53

1 Answer 1

Edit:

I've marked the question as a duplicate now, instead of it being on hold. Given that the answer you found is essentially the same as that in another question I found here, and the questions were basically the same, though worded a bit differently and coming from different angles, the essence of them is pretty much exactly the same.


I'll start by explain why it was put on hold, in all likelihood:

Read the On-Hold reason closely, specifically, the details:

Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results

Here's your question, in its entirety:

Is there a reliable way to check from an open webpage with javascript if a laptop has been suspended (laptop lid closed/opened)?

Your question did not demonstrate a minimal understanding of the problem being solved, and you included no attempted solutions (therefore, could not have provided the rest).

Due to the simplicity of the question (at its essence, it's a "yes" or "no" question by its wording), it's hard to do such a question that shows research effort. Perhaps many assumed you simply had not done that research. For example, a really quick Google search Generally speaking, such simple questions tend to get put on-hold for this reason. That was not always true in the past, but it tends to be, now. The exceptions I see are when something truly unique and interesting is asked; but this topic is quite old (look at this Stack Overflow question from nearly three years ago)

If you do ask such a question, though; be prepared to really show/describe what you did. If you did Google searches - maybe link to them, as I did above. I still don't guarantee the question would not be put on hold, but maybe someone would try a better Google for you.

In the end, though... you seem to have found your answer.

share|improve this answer
    
@lnafziger That's the thing, though; a really quick Google search turned up a lot of information on this - including a Stack Overflow post which I'm guessing is where the OP here found his answer. –  Andrew Barber Jul 31 '13 at 0:57
    
@lnafziger You do have a point there, granted. It is a semantic point - because my answer to that would be "don't post a question that does this", but it is still a good point, anyway. I'm going to adjust my answer accordingly. –  Andrew Barber Jul 31 '13 at 1:07
    
I actually did search for quite a while - posting on SO is generally a last ditch resort. I was searching more for laptop lid closing than resuming from sleep though (google.com/search?q=detect+if+laptop+lid+is+closed+javascript) unfortunately. This answer is now there for anyone who searches with similar terms. –  Tom Jul 31 '13 at 1:27
    
Wouldn't it be better to close it as a duplicate since it is a duplicate? –  Asad Jul 31 '13 at 1:58
    
@Asad I'm not opposed to that, actually. I'll do that now. Though I don't know if the OP will be any happier with that solution. –  Andrew Barber Jul 31 '13 at 2:03
1  
@AndrewBarber Since the OP ultimately ended up using the same approach as in the answer to the duplicate, I doubt he'd be too unhappy about it. My only reservation is that the question as it stands isn't technically a duplicate (for the reason mentioned in your comment). We only found out through OP's answer that he was looking for a way to find out when the computer resumes from sleep. –  Asad Jul 31 '13 at 2:07
    
Dupe makes sense now that a similar answer has been found, it was just unfortunate/misguided that I used completely different phrasing in my original searches. cheers! –  Tom Jul 31 '13 at 3:10
    
Can't I ask for an advice regarding a new thing that I am working on.. some times a tiny clue can help you find the right path and then you can go along, doing whatever research or efforts it takes. What if I am working on a new topic and just wanted to have some insight. Questions like "When to use what design patterns" might not meet the criteria but still some small help/advice can be really helpful as a start .. after-all we all are to share our thoughts and help each other. isn't it ?? –  user2720864 Sep 11 '13 at 13:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .