Hi,
For the last few hours, I've been trying to use jQuery to implement pagination via AJAX in phpMyAdmin. The page I've selected for experimenting is the sql.php page, where one can view a table from a database. I've right now created a javascript file, included it in the DOM via the $GLOBALS['js_include'] array, and bound an AJAX call on the navigation buttons.
When I execute the call for a particular table, sql.php replies with the results for the next 30 rows, but it also outputs a lot of other html. As a way around this, I plan to use a variable 'ajax_request', which is set to true when an AJAX call is being made, and accordingly, wrote the jQuery script. If ajax_request is set to true in $_POST, I will modify the output of sql.php and print only the table containing the data from the table, the profiling data, (and any other necessary part) and prevent the printing of the header, footer and other tabs. However, due to the sanitization of $_GET, $_POST and $_REQUEST, I am unable to access the variable.
I tried adding the variable name to variables_whitelist and the array_list arrays in libraries/common.inc.php, but I guess those are the wrong places. Could someone please tell me where I'm going wrong, or which is the right php file/function to check?
Ninad S. Pundalik http://twitter.com/ni_nad http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Hi
Dne Wed, 24 Mar 2010 07:16:30 +0530 Ninad Pundalik ninadsp16289@gmail.com napsal(a):
For the last few hours, I've been trying to use jQuery to implement pagination via AJAX in phpMyAdmin. The page I've selected for experimenting is the sql.php page, where one can view a table from a database. I've right now created a javascript file, included it in the DOM via the $GLOBALS['js_include'] array, and bound an AJAX call on the navigation buttons.
When I execute the call for a particular table, sql.php replies with the results for the next 30 rows, but it also outputs a lot of other html. As a way around this, I plan to use a variable 'ajax_request', which is set to true when an AJAX call is being made, and accordingly, wrote the jQuery script. If ajax_request is set to true in $_POST, I will modify the output of sql.php and print only the table containing the data from the table, the profiling data, (and any other necessary part) and prevent the printing of the header, footer and other tabs. However, due to the sanitization of $_GET, $_POST and $_REQUEST, I am unable to access the variable.
I tried adding the variable name to variables_whitelist and the array_list arrays in libraries/common.inc.php, but I guess those are the wrong places. Could someone please tell me where I'm going wrong, or which is the right php file/function to check?
The correct way is to include token in your request. It is there for protecting against XSS.
Hi,
On 25 March 2010 03:32, Michal Čihař michal@cihar.com wrote:
The correct way is to include token in your request. It is there for protecting against XSS.
I saw that the code tries to prevent that. Hence, I added my extra parameter to the same form that submits the current sql query and the position to sql.php. Once the form's submit button is clicked, I prevent the execution of the request by the browser, and instead use jQuery to make the request.
Anyways, I was looking at the wrong part of the output, but the parameter is being passed and it is still available in $_POST at the point of execution where I require it to be (after effects of spending an entire night trying to understand code and then writing some more :) ). I'm going to now try to modify the output of sql.php based on this parameter, and see if I can make it print just the table. Is there any parameter available that can be used to stop the inclusion of the libraries/http_header.inc.php and footer.inc.php?
Thanx for making me look harder at the output and code. :)
Ninad S. Pundalik http://twitter.com/ni_nad http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Hi
Dne Thu, 25 Mar 2010 04:02:03 +0530 Ninad Pundalik ninadsp16289@gmail.com napsal(a):
Anyways, I was looking at the wrong part of the output, but the parameter is being passed and it is still available in $_POST at the point of execution where I require it to be (after effects of spending an entire night trying to understand code and then writing some more :) ). I'm going to now try to modify the output of sql.php based on this parameter, and see if I can make it print just the table. Is there any parameter available that can be used to stop the inclusion of the libraries/http_header.inc.php and footer.inc.php?
Not really, there is no generic framework for handling AJAX requests.
On 25 March 2010 14:03, Michal Čihař michal@cihar.com wrote:
Not really, there is no generic framework for handling AJAX requests.
Then, as part of my GSoC project, should I focus on creating a framework/modify the existing functions which generate the HTML pages? Also, I could create a set of generic jQuery/JavaScript functions for the AJAX requests on the client side and prepare a few example pages from the existing content. If everyone's fine with this, then I'll re-draft my GSoC proposal. Post GSoC, I would love to continue with this, and with the help from others in the community, complete this for as many pages as possible in phpMyAdmin.
Ninad S. Pundalik http://twitter.com/ni_nad http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Hi
Dne Thu, 25 Mar 2010 14:14:00 +0530 Ninad Pundalik ninadsp16289@gmail.com napsal(a):
On 25 March 2010 14:03, Michal Čihař michal@cihar.com wrote:
Not really, there is no generic framework for handling AJAX requests.
Then, as part of my GSoC project, should I focus on creating a framework/modify the existing functions which generate the HTML pages?
Yes, I think this is quite obvious beginning of AJAX project.
Also, I could create a set of generic jQuery/JavaScript functions for the AJAX requests on the client side and prepare a few example pages from the existing content. If everyone's fine with this, then I'll re-draft my GSoC proposal. Post GSoC, I would love to continue with this, and with the help from others in the community, complete this for as many pages as possible in phpMyAdmin.
I'm not sure how much has to be implemented on client side, I thought most functionality should already be in jQuery.
* *
On Fri, Mar 26, 2010 at 4:38 AM, Michal Čihař michal@cihar.com wrote:
Hi
Dne Thu, 25 Mar 2010 14:14:00 +0530 Ninad Pundalik ninadsp16289@gmail.com napsal(a):
On 25 March 2010 14:03, Michal Čihař michal@cihar.com wrote:
Not really, there is no generic framework for handling AJAX requests.
Then, as part of my GSoC project, should I focus on creating a framework/modify the existing functions which generate the HTML pages?
Yes, I think this is quite obvious beginning of AJAX project.
well, Ninad, You need not reframe the html output, My idea is that you keep a special token variable* *as say, [ajax_enabled] and send it along with your ajax request GET or as a session var (as done by zimbra and gmail ) GET will not be a popular choice though. As most of "non required" things like the header and the footer is included form some other file you may just prevent the inclusion by checking the token variable. * possible problems*: The ajax portion will not be just an add-on it is directly affecting the native code.
Also, I could create a set of generic jQuery/JavaScript functions for the AJAX requests on the client side and prepare a few example pages from the existing content. If everyone's fine with this, then I'll re-draft my GSoC proposal. Post GSoC, I would love to continue with this, and with the help from others in the community, complete this for as many pages as possible in phpMyAdmin.
I'm not sure how much has to be implemented on client side, I thought most functionality should already be in jQuery.
Ninad, I think you want to propose that there should be additional (helper
JavaScript files apart from the native JQuery File) that will define the additional functions like
.button.click= function(){...}
or onload functions.
well you can do that or let this be a part of conversion of moo-tools code to JQuery code which Marc has informed me is going out right now. you can modify the "converted" (.js) files and add all these additional functions
-- Michal Čihař | http://cihar.com | http://blog.cihar.com
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Hi,
On 26 March 2010 04:59, Rohit Kalhans rohit.kalhans@gmail.com wrote:
well, Ninad, You need not reframe the html output, My idea is that you keep a special token variable as say, [ajax_enabled] and send it along with your ajax request GET or as a session var (as done by zimbra and gmail ) GET will not be a popular choice though. As most of "non required" things like the header and the footer is included form some other file you may just prevent the inclusion by checking the token variable.
If you kindly read the original post for this thread, you will see that I'm trying to do something similar. :) And yes, you are correct in guessing that it will modify a lot of the native code quite a bit.
well you can do that or let this be a part of conversion of moo-tools code to JQuery code which Marc has informed me is going out right now. you can modify the "converted" (.js) files and add all these additional functions
Definitely. I could help out with this and get better acquainted with the code base along the way, till GSoC starts.
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
On Fri, Mar 26, 2010 at 9:50 AM, Ninad Pundalik ninadsp16289@gmail.comwrote:
Hi,
On 26 March 2010 04:59, Rohit Kalhans rohit.kalhans@gmail.com wrote:
well, Ninad, You need not reframe the html output, My idea is that you
keep
a special token variable as say, [ajax_enabled] and send it along with
your
ajax request GET or as a session var (as done by zimbra and gmail ) GET
will
not be a popular choice though. As most of "non required" things like the header and the footer is
included
form some other file you may just prevent the inclusion by checking the token variable.
If you kindly read the original post for this thread, you will see that I'm trying to do something similar. :) And yes, you are correct in guessing that it will modify a lot of the native code quite a bit.
Well I did that I can send you a patch that I made but the code was a bit badly organized (so I didn't make it public) and had changed a lot of native code, in which I have done the same what you have told earlier in this thread. What i want to tell is that I wanted to make this AJAX enabled PMA as a plug-in to the actual PMA code and the user may add or remove this plug-in at his freewill. The problem that I mentioned was that this will render the user to keep continuing using the "PMA with AJAX" forever (i.e. once the patch is used it becomes irreversible and the user need to continue using the patch).
well you can do that or let this be a part of conversion of moo-tools
code
to JQuery code which Marc has informed me is going out right now. you can modify the "converted" (.js) files and add all these additional functions
Definitely. I could help out with this and get better acquainted with the code base along the way, till GSoC starts.
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
On 27 March 2010 00:59, Rohit Kalhans rohit.kalhans@gmail.com wrote:
Well I did that I can send you a patch that I made but the code was a bit badly organized (so I didn't make it public) and had changed a lot of native code, in which I have done the same what you have told earlier in this thread. What i want to tell is that I wanted to make this AJAX enabled PMA as a plug-in to the actual PMA code and the user may add or remove this plug-in at his freewill. The problem that I mentioned was that this will render the user to keep continuing using the "PMA with AJAX" forever (i.e. once the patch is used it becomes irreversible and the user need to continue using the patch).
Right now, I'd not ask for it. I'm trying to apply for GSoC, and Marc and Michal would like to see how I code and work. If I do get selected, I'll definitely ask you for a copy of that patch. Maybe, you could have better ideas for implementing some things, and it could help me improve. :)
As for the plugin part, it is kind of dependent on whether JavaScript is enabled or disabled, right now. If it is enabled, the request forms are modified by jQuery scripts, and the actual requests are taken care of by jQuery. Attempting to provide backward compatibility with that.
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Hi,
As of now, my progress in trying to paginate the contents of a table is that I have successfully written a jQuery snippet which modifies the behaviour of the '>' and '>>' buttons to make an AJAX request. I have suitably modified the output of sql.php to print only the html content of the table ( i.e. only the content generated by PMA_displayTable() ), the SQL query and the Profiling Result.
However, I am right now facing issues in appending the HTML returned in the AJAX query. The moment I append the output to the DOM, the right frame (frame_content) goes completely blank, and Firefox gets stuck in a 'Loading' state, while Firebug does not show any such request being made. Could someone please tell me where I am going wrong?
For reference, I've pasted the output of sql.php here: http://pastebin.org/126332
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
On Wed, Mar 31, 2010 at 2:40 AM, Ninad Pundalik ninadsp16289@gmail.comwrote:
Hi,
As of now, my progress in trying to paginate the contents of a table is that I have successfully written a jQuery snippet which modifies the behaviour of the '>' and '>>' buttons to make an AJAX request. I have suitably modified the output of sql.php to print only the html content of the table ( i.e. only the content generated by PMA_displayTable() ), the SQL query and the Profiling Result.
However, I am right now facing issues in appending the HTML returned in the AJAX query. The moment I append the output to the DOM, the right
frame (frame_content) goes completely blank, and Firefox gets stuck in a
'Loading' state, while Firebug does not show any such request being made.
Thats because a JavaScript function you called somewhere is going in an infinite loop ( or may be object it is dealing with is not found, like a div tag referenced by its id). I guess its the CDATA JavaScript being sent in the response line no 3. You cannot execute the JavaScript returned in a response without using the eval function. I would suggest you use JSON as the response form for that purpose.
Could someone please tell me where I am going wrong?
For reference, I've pasted the output of sql.php here: http://pastebin.org/126332
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
On Wed, Mar 31, 2010 at 3:56 AM, Rohit Kalhans rohit.kalhans@gmail.comwrote:
On Wed, Mar 31, 2010 at 2:40 AM, Ninad Pundalik ninadsp16289@gmail.comwrote:
Hi,
As of now, my progress in trying to paginate the contents of a table is that I have successfully written a jQuery snippet which modifies the behaviour of the '>' and '>>' buttons to make an AJAX request. I have suitably modified the output of sql.php to print only the html content of the table ( i.e. only the content generated by PMA_displayTable() ), the SQL query and the Profiling Result.
However, I am right now facing issues in appending the HTML returned in the AJAX query. The moment I append the output to the DOM, the right
frame (frame_content) goes completely blank, and Firefox gets stuck in a
'Loading' state, while Firebug does not show any such request being made.
Thats because a JavaScript function you called somewhere is going in an infinite loop ( or may be object it is dealing with is not found, like a div tag referenced by its id). I guess its the CDATA JavaScript being sent in the response line no 3. You cannot execute the JavaScript returned in a response without using the eval function. I would suggest you use JSON as the response form for that purpose.
forgot to tell kindly look at other places as well like line no 122 onwards for JQuery code snippets.
Could someone please tell me where I am going
wrong?
For reference, I've pasted the output of sql.php here: http://pastebin.org/126332
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
-- Rohit Kalhans homepage: http://rohit-kalhans.co.cc BLOG: http://13lackburn.blogspot.com
Hi,
On 31 March 2010 04:05, Rohit Kalhans rohit.kalhans@gmail.com wrote:
forgot to tell kindly look at other places as well like line no 122 onwards
Thanx for ^^ ! I had commented out the javascript code that appears at the beginning before, and checked it out. But, it did not help. I'd missed this extra jQuery snippet, even though I remembered seeing at it and realising that it is one of Marc's recent additions and that it could be conflicting. As of now, I've commented out that snippet and got it partly working, just need to remove the right divs and replace them with the content that the AJAX request returned. Hope to get a patch in soon. :)
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Hi,
I've narrowed down the javascript code that is conflicting with my jQuery code for paginating a table's contents to one particular line in PMA_generate_slider_effect() in libraries/common.lib.php. The line is:
document.write('<div id="<?php echo $id; ?>" <?php echo $GLOBALS['cfg']['InitialSlidersState'] == 'closed' ? ' style="display: none;"' : ''; ?>>');
If I'm not wrong, the div is being generated on the fly with javascript, so that it can b backward compatible in browsers where javascript is disabled. In that case, we could use jQuery itself to insert that element, instead of document.write(). I'll go ahead and try that, but someone please confirm this. Once this is fixed, I'll be able to submit a patch to Sourceforge.
Marc, you might know about this better :).
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Ninad Pundalik a écrit :
Hi,
I've narrowed down the javascript code that is conflicting with my jQuery code for paginating a table's contents to one particular line in PMA_generate_slider_effect() in libraries/common.lib.php. The line is:
document.write('<div id="<?php echo $id; ?>" <?php echo $GLOBALS['cfg']['InitialSlidersState'] == 'closed' ? ' style="display: none;"' : ''; ?>>');
If I'm not wrong, the div is being generated on the fly with javascript, so that it can b backward compatible in browsers where javascript is disabled. In that case, we could use jQuery itself to insert that element, instead of document.write(). I'll go ahead and try that, but someone please confirm this. Once this is fixed, I'll be able to submit a patch to Sourceforge.
Marc, you might know about this better :).
Ninad, to insert that div element, if I'm not mistaken you must tell jQuery to insert it before of after a certain element; which element would you choose?
Maybe you could pass to this PHP function the name of the element after which you want to insert this div?
Hi
Dne Wed, 31 Mar 2010 09:34:52 -0400 Marc Delisle marc@infomarc.info napsal(a):
to insert that div element, if I'm not mistaken you must tell jQuery to insert it before of after a certain element; which element would you choose?
I think the div can be already present in the document (extra div doe not matter at all):
<div class="slider">...</div>
And there would be javascript to set initial state based on the settings and add add the link:
jQuery(document).ready(function(){ if (pma_settings['InitialSlidersState'] == 'closed') { jQuery('.slider').addClass('slider-hidden'); } jQuery('<a href="#" class="sliderexpand">Details...</a>').insertBefore(jQuery('.slider')); }
pma_settings would be exported by separate code which will create javascript array with settings (or rather subset of it which is needed in javascript)
The code is just typed in mail client so it will most likely not work, but I hope it shows the idea :-).
Hi,
On 31 March 2010 19:25, Michal Čihař michal@cihar.com wrote:
I think the div can be already present in the document (extra div doe not matter at all):
<div class="slider">...</div>
And there would be javascript to set initial state based on the settings and add add the link:
This seems a better way. I'll make the changes in the code in some time and test it, my guess is that it'll work fine. Should I include this change in the patch that I'll put in? Also, I plan to put the jQuery code for the time being in a file js/paginte_table.js. Is that fine? Any particular convention I should be following when doing it?
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Ninad Pundalik a écrit :
Hi,
On 31 March 2010 19:25, Michal Čihař michal@cihar.com wrote:
I think the div can be already present in the document (extra div doe not matter at all):
<div class="slider">...</div>
And there would be javascript to set initial state based on the settings and add add the link:
This seems a better way. I'll make the changes in the code in some time and test it, my guess is that it'll work fine. Should I include this change in the patch that I'll put in? Also, I plan to put the jQuery code for the time being in a file js/paginte_table.js. Is that fine? Any particular convention I should be following when doing it?
What's the meaning of "paginte" ?
Hi,
On 31 March 2010 22:28, Marc Delisle marc@infomarc.info wrote:
What's the meaning of "paginte" ?
Wikipedia says : "Pagination is the process of dividing web content and displaying it on separate pages." [0]. For all the results displayed from a table (either while browsing or as the results of an SQL query), we have the navigation bar which navigates from the current set of results to the next. I've right now got that to work through AJAX instead of re-loading the entire content frame. :)
[0] - http://en.wikipedia.org/wiki/Pagination_(web)
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Ninad Pundalik a écrit :
Hi,
On 31 March 2010 22:28, Marc Delisle marc@infomarc.info wrote:
What's the meaning of "paginte" ?
Wikipedia says : "Pagination is the process of dividing web content and displaying it on separate pages." [0]. For all the results displayed from a table (either while browsing or as the results of an SQL query), we have the navigation bar which navigates from the current set of results to the next. I've right now got that to work through AJAX instead of re-loading the entire content frame. :)
I'm familiar with "pagination" but what is "paginte"?
Hi,
I guess it's the verb form for pagination. I've heard this used by a few people, but I'm not sure if it exists in the dictionary with it's internet reference. The dictionary contains the verb with reference to printed books/manuscripts. :)
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Ninad Pundalik a écrit :
Hi,
I guess it's the verb form for pagination. I've heard this used by a few people, but I'm not sure if it exists in the dictionary with it's internet reference. The dictionary contains the verb with reference to printed books/manuscripts. :)
You probably mean "paginate".
Hi,
You probably mean "paginate".
Yes. I'm extremely sorry for the typing mistake, and hence the off-topic discussion on the mailing list. Realised it just now.
Ninad Pundalik a écrit :
Hi,
On 31 March 2010 19:25, Michal Čihař michal@cihar.com wrote:
I think the div can be already present in the document (extra div doe not matter at all):
<div class="slider">...</div>
And there would be javascript to set initial state based on the settings and add add the link:
This seems a better way. I'll make the changes in the code in some time and test it, my guess is that it'll work fine. Should I include this change in the patch that I'll put in? Also, I plan to put the jQuery code for the time being in a file js/paginte_table.js. Is that fine? Any particular convention I should be following when doing it?
We'll probably need to build some filename convention for /js. For the moment, just try to be clear ...
Hi,
Posted a patch at Sourceforge finally (a couple of personal things came up, so could not complete this earlier). Please review the patch. :)
https://sourceforge.net/tracker/?func=detail&aid=2981401&group_id=23...
Hi All,
Kindly read my project proposal for AJAXifying the phpMyAdmin interface at the GSoC web app. The proposal is publicly viewable at : http://is.gd/beC50
Eagerly waiting for your feedback so that I can modify it as per requirements as soon as possible. :)
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Hi,
Yes, I think this is quite obvious beginning of AJAX project.
I initially thought that this would be about half the work of the project, the other half being the jQuery scripting, testing on different browsers to ensure compatibility and obviously, debugging.
I'm not sure how much has to be implemented on client side, I thought most functionality should already be in jQuery.
jQuery has functions to make the AJAX requests. It also has functions to manipulate the DOM. But, they are generic functions, and I hope to customize them enough that further developers do not have to get into the nitty-gritty details of the HTML structure (i.e. write wrapper functions like replaceTable or replaceSQLQuery).
For example, right now, I'm trying to paginate the results of a table, as you have seen in another mail thread. Right now, I'm trying to wrap the HTML generated with some XML, as the output of a query is not just the table containing the results, but also the profiling results and the SQL query. If I can do this properly (add id's to the proper divs in functions like PMA_profilingResults() ), then this task would be a lot easier as I could select the correct div with jQuery and then replace the HTML content.
Ninad S. Pundalik +91 - 99835 26855 | mail@ninad.x10hosting.com Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69