Jump to content

robcrozier

Members
  • Posts

    175
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

robcrozier's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. OK, what i have came up with is the following... Does anyone have any comments on this at all? In the view script of the first set of ajax loaded content i have: <div class="loadAjaxContent" data-target="#col2"> <h2>Actions</h2> </div> I then have a javascript function set up to listen out for this class being added to the DOM. If it is, it will lad the inner HTML from it into the specified container via ajax. This means that the logic for rendering page actions etc is kept ties to the page that you're actually looking at. Saves a load of generic javascript event listeners to load content in all over the place. What do you guys think of this approach? Any comments?
  2. I'm building a a fairly large application at the moment and it's going to heavily utilize ajax throughout. What i want to do is structure the application in such a way that it can work well with ajax as well as fall back gracefully if the users browser does not have javascript enabled. I have a nice menu set up and all of the links ar nicely handled via javascript to initiat ajax calls as opose to refresh the page. This works well to get the first load of content into the main interface container. The problem comes when i add the second column which will sit to the right of the interface and be used to house system actions, often CRUD and other relevant actions depending upon what you're looking at. I need to be able, some how to invoke an ajax call to populate this column based upon the information in the main column, which will have already been loaded in via ajax. Furthermore, i need to be able to update the right hand column independently too. I hope this make sense to anyone who has the patience to read it! The main piece of advice i am looking for is.. how can i somehow trigger an ajax call from the content that is loaded in from another whilst not having to write mountains of extra code to handle this if javascript is disabled. Any advice would be great! Thanks
  3. Hi Guys. After lots of googling, i can't seem to find the solution to the problem i have... I wonder if anyone can help? I have a large text block (containing some HTML) which i need to split into n number of columns (probably 2) to display on a clients site. It's important that any HTML, and any html entities are not split in half when the text block is processed too. If anyone can help with this, or even offer a partial solution or ideas which i can build from this would be much appreciated! Cheers
  4. Some really useful comments there guys! Thanks for all of the input so far. After reading your comments i think i will stay away from CI and Cake for this one, although ZF does seem to have it's drawbacks too, clearly. Although i like the fact that it's well maintained and there is an active community for ZF out there. I have also heard stories of v.large e-commerce platforms using ZF in the past. Reassuring! Are there any other frameworks out there that people have worked with that have perhaps been overlooked? Maybe some smaller MVC frameworks that are perhaps less bloated that the three main ones discussed here (CI, Cake, and ZF)?
  5. Interesting one thorpe! Which version of ZF were you using in this instance? Has anyone else found this with ZF? If so, does anyone know whether this has been improved within the later releases of the framework?
  6. Thanks for that info guys, thats exactly the sort of feedback I was looking for. ZF sounds like a good option in my instance then. I will be sure to check out your blog source Shlumph, that will be a great help! I think I will keep tjis thread open a little longer just to get a few more peoples opinions. Thanks again guys!
  7. Hi All. I am currently looking at options for a PHP MVC framework for a new large e-commerce project. I have a small amount of experience with CodeIgnighter, however i have heard lots of good things about Zend Framework... Can anyone share their thoughts on the framework (good, or bad) as well as any experiences that they have had using Zend? Thanks for your time guys! I look forward to reading any comments.
  8. Hi. I wonder if anyone can help me with this one.... I have a class which returns a product objects when $class->getProduct() is called. I have a number of other classes which extend the default 'product' object as appropriate. For different types of products etc. Now, if i call $class->getProduct() and retrieve the default product object back, is there a way that i can cast this into one of the other classes which extend 'product'? So, an example piece of code may be as follows: $productFactory = new ProductFactory; // the main processor class for products $myProduct = $productFactory->getProduct($id); // grab a default product object '$myProduct' // Now i need top cast $myProduct into another object..... Any help would be greatly appreciated! Cheers
  9. Hi. I'm trying to read the contents of a large file (which contains nothing but plain text, no wierd characters etc). The problem i'm getting is that it's returning a � symbol between each craracter! Here's the code i've go to far: <? $file = "file.txt"; $fh = fopen($file, 'r'); $data = fread($fh, filesize($file)); fclose($fh); echo strlen($data); echo "<br />"; $bits = explode("\n", $data); echo sizeof($bits); echo "<br />"; for ($i = 0; $i < 100; $i ++){ echo $bits[$i]."<br><br>"; } ?> Can anyone suggest why this is happening? Cheers!
  10. Hi Thanks for the reply. Onlty thing is, when i do that, the object is unknown at the other end and thus i cant access any of it's methods to get the data out of it. Unless you can help me with that error too (the unknown object one), i don't think that's gonna work. Cheers mate!
  11. Hi Guys. Can anyone advise me on the best way of passing an array of objects via form post? I've tried serialising the data, however i'm getting unserialize errors at the other end. I've also tried storing the array as a session, however i then get an incomplete object error at the otger end? I really need to get this working. Any help would be great! Thanks in advance
  12. HI papaface. Thanks for that. Would PHP not just hang waiting for the response fromt this function though? Say for example if i cemned the function and then used the header() function to take the usre to a new page: $command = shell_exec();// the shell command header("location: new_page.php"); Would the header() function actually be executed without having to wait for the shell_exac result? Thanks again
  13. Hi. I have a script that requires a very large amount of processing and thus the users browser becomes inactive for quite a long period of time whilst the script executes. What i'm thinking of doing is executing this script through Lynx on my Linux server anf thus allowing the user to use the web based system as normal whilst the process executes on the server. I'm a bit stumped as to how i might do this thoug! Can anyone share any advice? Cheers
  14. Hi mjdamato. Thanks for the response. Unforthunately, yes i would like to have the two users log in with completely unconnected sessions, even though they're using the same login details - if that makes sense!? Cheers Rob
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.