HappyFeet
-
Posts
5 -
Joined
-
Last visited
Never
Posts posted by HappyFeet
-
-
Yep.
The file is: class.Session.php - which is why it's $Session. Case sensitive... either way, both give the same error.
-
Evening,
So I have three files.
run.php
// autoload the classes function __autoload($className) { include "class.".$className.".php"; } // setup the sessions handler $session = new Session($member); // setup the handler $handler = new Handler(part, template, $_GET);
The handler takes the $_GET data and includes the templates header -> $_GET matching body file -> footer and returns it forming a page.
However. When I go to call something from the Session class for example in the body file with...
body.tpl.php
<?=$Session->isLog();?>
I get...
Notice: Undefined variable: Session in .../body.tpl.php on line 12 Fatal error: Call to a member function isLog() on a non-object in .../body.tpl.php on line 12
It is my understanding that the class is ready for use, but isn't?
I'd really appreciate any advice you can spare.
-
The OP wishes to drag individual rows so will need unique ID's on the rows would he not? (Bearing in mind I don't use jQuery too often, preferring to use javascript itself instead)
you obviously are not familiar with how .sortable works.. id's are not needed on the row elements
Hello again,
Thank you to everyone that posted, it is appreciated. I managed to get the drag and drop working in tune with the DnD plugin, as the setup I had was clearly as others have highlighted somewhat dis-functional.
However my question is how do I plonk the rows in turn into my external file that simply updates a database with their new positions.
I assume, that it would be placed within the onDrop however I can't see to get the rows to pass through to the file.
onDrop: function(table, row) { $("#info").load("../ajax/process-sortable.php"); },
I can load the external file in without a problem. It's just pushing the rows through...? Once they reach it is simply a foreach of the rows for the update query and a congratulations message.
Once again, thank you for your replies.
-
Evening!
I've been tinkering with jQuery a fair bit recently and something that is most likely incredibly simple is alluding me as to why I can't drag these rows of a table.
I am before I forget to mention including the jQuery files deffinitely.
The java:
<script type="text/javascript"> $(document).ready(function() { $("#tableList").sortable({ handle : '.handle', update : function () { var order = $('#tableList').sortable('serialize'); $("#info").load("reorder.php?"+order); } }); }); </script>
Which is supposedly fed from a table with while generated singular rows for each record.
<table id="tableList"> <tr id="tableItem<?=$id;?>"> <td width="400" align="center">Details...</td> </tr> </table>
My problem is that whenever I try to drag. It drags the entire four rows not just one. Equally it doesn't recognise the 2nd, 3rd or 4th as part of the list? I.E you can only drag the 1st row which in turn pulls the rest...
Calling Something "Autoload"ed...
in PHP Coding Help
Posted
In fact no, my apologies there! There is no error if you replace the upper case with a lower case 's', but there is nothing returned from the class.
It is being initiated, there are no errors from what you posted.
Currently the "class.Session.php" file is simply: