Skip to content
Advertisement

Tag: javascript

Check if JavaScript is enabled with PHP

Is there a way to check if JavaScript is enabled with PHP? If so, how? Answer No, that is not possible, because PHP is a server side language, it does not access the client’s browser in any way or form (the client requests from the PHP server). The client may provide some meta info through HTTP headers, but they don’t

Adding to browser context menu?

Is it possible to add item to the default browser right button click menu? Answer One option is to replace the context menu with your own JavaScript triggered equivalent. Firefox implemented the menu element where you can add to the existing context menu. It was also implemented in Chrome behind a flag. Unfortunately this feature has been removed from the

How can I write a simple JScript input/output program?

I’m planning on using JavaScript to enter an informatics competition (BIO) tomorrow. However, I can’t rely on the examiner having a browser with a decent JavaScript engine, so I was hoping to use Microsoft’s JScript instead. However, the documentation is, quite frankly, crap. Can someone post some example code that reads in a line of text, calls foo(string) on it,

What is the DOM and BOM in JavaScript?

What is the DOM and BOM in JavaScript? If someone could explain these in layman terms it would be great! I like to get a deeper understanding of these. Answer The BOM (Browser Object Model) consists of the objects navigator, history, screen, location and document which are children of window. In the document node is the DOM (Document Object Model),

CSS2 cursor not displaying “hand”

I’m following the standard of W3C here http://www.w3.org/TR/CSS2/ui.html and here http://www.quirksmode.org/css/cursor.html#note. However, the element isn’t displayed the hand when mouseover. Please help. When viewing with IE9 and mouseover, it doesn’t change the cursor into the “hand”, but it’s just the regular arrow instead. Please advise. Thanks! Answer It should be cursor: pointer; alone because hand is a proprietary value only

getElementById() wildcard

I got a div, and there i got some childnodes in undefined levels. Now I have to change the ID of every element into one div. How to realize? I thought, because they have upgoing IDs, so if the parent is id=’path_test_maindiv’ then the next downer would be ‘path_test_maindiv_child’, and therefore I thought, I’d solve that by wildcards, for example:

Advertisement