I have some simple JavaScript that determines where a click happens within a browser here: var clickDoc = (document.documentElement != undefined && document.documentElement.clientHeight != 0) ?…
Tag: javascript
Loading HTML dynamically using JavaScript and PHP
I have the following code: Some html… Other html…
How to encrypt data in javascript and decrypt in php?
Is there any javascript function that can encrypt data: For example i want to use encrypted data in my URL passed by ajax GET request, http://sample.com/mypage/TDjsavbuydksabjcbhgy where …
Is there an online code coloring service? [closed]
I would like to know if there is an online service where we paste the code and it generates back the colored HTML source code for that code. It could be PHP, HTML, CSS, JavaScript, C, and Java. The …
HTML coding and mixing of PHP or JavaScript code
I am assigned a task to revise a website and at present, I am working on index.html page. the previous coder has mixed a lot of JavaScript and CSS code in between and it is becoming difficult to read. …
regular expressions – same for all languages?
is the regexp the same between languages? for example. if i want to use it in javascript, would i have to search for regexp for javascript specifically. cause i got some cheat sheets. it just says regular expression. i wonder if i could use this on all languages, php, javascript and so on. Answer The basics are mostly the same
How to add anchor tag to a URL from text input
I want to be able to take user inputted text in a comment field and check for URL type expression, and if it exists, add an anchor tag (to url) when the comment is displayed. I am using PHP on the server-side, and Javascript (with jQuery) on client, so should I wait to check for URL until right before it
Why is $(document).ready not firing for me?
In a php file i have used include to include the following js.php file and prior to that i have included the jquery file. $(document).ready(function(){ …
Image Upload — showing image on web page before hitting Submit
To better learn web development, I’m trying to write a PHP page that will let me upload and download files from a server, which I’ve done in ASP before. I am however, tripping over something that reason says should be simple, but I’m not able to find an answer for it. Here’s the pretty standard code for the browse/submit: Now
Can’t add new lines in JavaScript alert Box?
I’m generating a string in PHP and then eventually passing this string into a JavaScript alert box, my problem is I actually can’t add line breaks in my alert box. My code looks as follows I’m getting the error: Undeterminnated string literal If I remove the n from the string it works 100% but without line breaks. Answer This happens