3
votes
4answers
386 views
Events triggered by dynamically generated element are not captured by event handler
I have a <div> with id="modal" generated dynamically with the jQuery load() method:
$('#modal').load('handlers/word.edit.php');
word.edit.php contains a few input element, which are loaded ...
23
votes
8answers
78k views
using jquery $.ajax to call a PHP function
This may be a simple answer, but I'm using jquery's $.ajax to call a PHP script. What i want to do is basically put that PHP script inside a function and call the PHP function from javascript.
...
1
vote
5answers
1k views
Creating jQuery AJAX requests to a PHP function
So far when creating AJAX requests I have been posting to a separate PHP file. Is it possible to create a jQuery AJAX request that calls a PHP function rather than posts to a separate page?
If you ...
28
votes
13answers
15k views
close a connection early
I'm attempting to do an AJAX call (via JQuery) that will initiate a fairly long process. I'd like the script to simply send a response indicating that the process has started, but JQuery won't return ...
12
votes
6answers
24k views
How to access PHP variables in JavaScript or jQuery rather than <?php echo $variable ?>
How do I access PHP variables in JavaScript or jQuery? Do I have to write
<?php echo $variable1 ?>
<?php echo $variable2 ?>
<?php echo $variable3 ?>
...
<?php echo $variablen ...
42
votes
7answers
13k views
Multiple javascript/css files: best practices?
I have about 7 Javascript files now (thanks to various jQuery plugins) and 4-5 CSS files. I'm curious as to what's the best practice for dealing with these including where in the document they should ...
5
votes
8answers
13k views
generating a screenshot of a website using jquery
I would like to generate a screenshot thumbnail of any given url using strictly javascript. If this can't be done can anyone point me in the right direction to do this with my own api?
edit I just ...
18
votes
3answers
20k views
Simple jQuery, PHP and JSONP example?
I am facing the same-origin policy problem, and by researching the subject, I found that the best way for my particular project would be to use JSONP to do cross-origin requests.
I've been reading ...
7
votes
2answers
2k views
Long Polling/HTTP Streaming General Questions
I'm trying to make a theoretical web chat application with php and jquery, I've read about long polling and http streaming, and I managed to apply most principles introduced in the articles. However, ...
9
votes
4answers
13k views
Pass Javascript Array -> PHP
Let's say I have a javascript array with a bunch of elements (anywhere from 50-200).
I want to send that to PHP (prepared statement) using ajax. Currently, I .load a php file many times inside of a ...
18
votes
10answers
17k views
Sessions and uploadify
I'm using uploadify, and i can't set sessions in my php files, my script looks like this:
$("#uploadify").uploadify({
'uploader' : '/extra/flash/uploadify.swf',
'script' ...
26
votes
6answers
30k views
Passing JavaScript Array To PHP Through JQuery $.ajax
I want to manipulate a javascript array in PHP. Is it possible to do something like this?
$.ajax({
type: "POST",
url: "tourFinderFunctions.php",
data: ...
2
votes
1answer
1k views
jQuery Mobile: Sending data from one page to the another
i have a problem, i need to send data (an id) from a list to another page.
this is the html code:
</head>
<body>
<div data-role="page" id="index">
<div ...
5
votes
4answers
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 ...
13
votes
3answers
20k views
jquery submit form and then show results in an existing div
I have a simple one text input form that when submitted, needs to fetch a php file (passing the inputs to the file) and then take the result (just a line of text) and place it in a div and fade that ...