3
votes
4answers
312 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 ...
22
votes
8answers
72k 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 ...
27
votes
13answers
14k 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
21k 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 ...
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, ...
4
votes
8answers
12k 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 ...
7
votes
4answers
12k 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' ...
21
votes
5answers
27k 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: ...
16
votes
3answers
17k 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 ...
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 ...
1
vote
2answers
592 views

How can I pass variables from JavaScript to PHP?

I am using jQuery to calculate prices. Here is a small snippet of my JavaScript: // Prices: radio var curLam = "gloss"; $("input[name=lamination]").click(function(){ var gloss = 5; var matt = 6; ...
0
votes
0answers
606 views

Get xpath location of element in iframe(iframe from my domain)

I have a two codes and I try to connect this two codes in some way. Also in code is function for get xpath location but how to use this on iframe. $(#iframeID).... and function to write result of ...

1 2 3 4 5 103
15 30 50 per page