150
votes
13answers
97k views

Pass a PHP string to a Javascript variable (and escape newlines)

What is the easiest way to encode a PHP string for output to a Javascript variable? I have a PHP string which includes quotes and newlines. I need the contents of this string to be put into a ...
97
votes
7answers
75k views

Is there an equivalent for var_dump (PHP) in Javascript?

We need to see what methods/fields an object has in Javascript.
40
votes
9answers
2k views

User recognition without cookies or local storage

I'm building an analytic tool and I can currently get the user's IP address, browser and operating system from their user agent. I'm wondering if there is a possibility to detect the same user ...
18
votes
4answers
58k views

How to get the jQuery $.ajax error response text?

I am sending an error response to my jQuery. However I can not get the response text (in the example below this would be Gone to the beach) The only thing jQuery says is 'error'. See this example ...
12
votes
7answers
3k views

Alternative to Captcha?

I have a simple reg form (Name, Email, Password) on my website and im looking to implement some sort of anti-bot/spam protection, Captcha seems like a very long winded way, plus they really annoy me ...
11
votes
2answers
14k views

Uploading both data and files in one form using Ajax?

I'm using jQuery and Ajax for my forms to submit data and files but I'm not sure how to send both data and files in one form? I currently do almost the same with both methods but the way in which the ...
7
votes
2answers
6k views

Google Maps API v3: How to Set Zoom Level And Map Center To User Submitted Location?

I have used this tutorial from Google to build a web app that finds the closest store from the user entered location: http://code.google.com/apis/maps/articles/phpsqlsearch_v3.html I have my app ...
6
votes
3answers
2k views

Stop Anyone From Viewing My Site Using an IFrame

I have looked and tried but don't see where I can stop some being able to browse my site through an IFrame or Thickbox? I want to stop banned members from accessing the site through proxy sites that ...
6
votes
4answers
10k views

Getting json on Ajax response callback

I am trying to create a little ajax chat system (just for the heck of it) and I am using prototype.js to handle the ajax part. One thing I have read in the help is that if you return json data, the ...
5
votes
5answers
3k views

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 ...
4
votes
3answers
6k views

bootstrap twitter datepicker + modal - calendar coming up in parent screen instead of modal screen

I have a form (Payment.php) which I am displaying in a modal screen using twitter bootstrap. In the form I have a date field for which I found this bootstrap plugin. But the problem is the calendar ...
4
votes
2answers
814 views

How to remove advanced tab from CKEditor - WYSIWYG

The wysiwyg-editor from http://CKEditor.com has too many buttons and is cluttored for many users. so I decided to remove unnecessary tabs and button. So I would like to remove the Advanced tab from ...
4
votes
1answer
1k views

JQuery Knob display number change

I'm using JQuery Knob to make some cool graphs and it's working perfectly. But I have one problem: I want to make the display number between the graph have a '%' symbol concatenated. but I just cant ...
3
votes
1answer
325 views

What's the best way to simulate a DOS or Terminal screen in a web page?

I'm finding this hard to even conceptualize. The easy way would be to have a large textarea element taking up most of the screen, with a small text input element below it. The player would type in ...
3
votes
3answers
425 views

Easiest multiple file upload with minimal “plugins”

I want to do a multiple file upload (you know, the kind that says "choose your image(s)" and actually lets you select more than one from the fileup dialogue), What's the EASIEST way to do this (I ...

1 2 3 4 5 1985
15 30 50 per page