Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. There is actually a lot of difference in coding between these two frameworks. The thing that is very similar in both mootools and jQuery is the way the DOM gets manipulated. the $$() function in mootools pretty much equals the $() function in jQuery since you use a CSS selector. The $() in mootools is similar to document.getElementById() So the $() in mootools doesn't really provide extra functionality. Readup on that mootools vs jQuery link posted earlier it's actually a pretty good article. I myself slightly prefer mootools over jQuery.
  2. If you're using the Date object why don't you use the getHours() method?
  3. Of course they do take a look at the following documentary for proof: It's entirely possible that speakers can intercept radio traffic. I was in a math course this summer with a person who had that problem as well. That's probably it. That makes me think of people with tooth fillings or braces receiving radio transmissions.
  4. Then I hope it's some ugly ass aliens enslaving man kind by turning them into zombies.
  5. As Corbin said, JavaScript is a prototype bases programming language. This however is not something new. The creators of JavaScript took the programming paradigms they thought were best suitable for the language. You might want to look at the following article http://en.wikipedia.org/wiki/Prototype-based_programming
  6. Your code worked fine for me. Here is what I think that went wrong. I thought you only pasted the relevant code but perhaps it was all your code. Did you wrap the events in a document ready event? In order to see the elements in the document the complete DOM should be loaded. That or the javascript events should be underneath the corresponding elements. Here is the complete code I used: // wait till the dom is loaded $(document).ready(function(){ var loginOptions = { type: 'POST', target: '#contentmain', url: 'lib/login.php', clearForm: true, success: function(html) { $('#contentmain').html(html); } }; $('#loginForm').submit(function() { $(this).ajaxSubmit(loginOptions); $.ajax({ method: "GET", url: 'rightpanel.php', success: function(html){$("#right").html(html);} }); $.ajax({ method: "GET", url: 'leftpanel.php', success: function(html){$("#left").html(html);} }); return false; }); });
  7. Ah I see what the problems are 1. your selector should be "#loginForm" instead of "#login" 2. the submit event should have a return false 3. not sure if this matters but i see $(this) used instead of re-using the id Your submit event should be something like: $('#loginForm').submit(function() { $(this).ajaxSubmit(loginOptions); $.ajax({ method: "GET", url: 'rightpanel.php', success: function(html){$("#right").html(html);} }); $.ajax({ method: "GET", url: 'leftpanel.php', success: function(html){$("#left").html(html);} }); return false; });
  8. That would not be the solultion if you remove the action then the form would still be submitted. The page loaded has to stay in the browser and not be reloaded. I notice a ajaxSubmit() function, is that a jQuery plugin and do you have a link to how it is supose to work? I think the solution might be in that function.
  9. And that's what this board is for. Helping people to solve bugs in their code or how to write something better. Believe it or not a lot of people here actually like solving bugs and learn how to code. A lot of people here in this community get a certain satisfaction from the fact that someone else has learned by their helping hand. If someone gets stuck with something code related then this is the place to ask. He's actually right though. If time is of the essence rather then solving the problem by spending time writing code yourself then you might be better off on the freelance board. I took a look at that class and it's written in 2005 and written in PHP4 syntax. This was when PHP4 was most common. PHP5+ is the most used version these days and you can simply use DOMDocument as it is very similar to the written class you linked to.
  10. Take a look at glob It's prob the easiest way to show files in a certain directory
  11. Take a look at DOMDocument in the manual
  12. Sounds a bit like you're trying to re-invent the weel. Are you doing this for fun/practive or do you want the best optimized javascript source. If it is the last option you might want to look up "yui compressor" or jsmin. If it is for practice maybe you can write a function that shortens certain variable names.
  13. try adding a "return false" to your submit event. $('#login').submit(function() { $("#loginForm").ajaxSubmit(loginOptions); $.ajax({ method: "GET", url: 'rightpanel.php', success: function(html){$("#right").html(html);} }); $.ajax({ method: "GET", url: 'leftpanel.php', success: function(html){$("#left").html(html);} }); // return false at the end of the submit event return false; });
  14. I find your description slightly confusing. Maybe the following thread will help you: http://www.phpfreaks.com/forums/index.php/topic,147397.0.html
  15. Leave out the % character it's just there to show you should use a terminal window. Often you'll see a $ character to demonstrate terminal commands similar to the % character you don't type that in a terminal
  16. It's probably the developer's fault for not getting it right in the first place. As for learning javascript, if you are already familiar with PHP it shouldn't be too hard learning javascript. PHP and Javascript have many similarities. The thing that can be a pain in the ass is the DOM since it differs among different browsers. Javascript frameworks such as jQuery can make things including manipulating the DOM a lot easier.
  17. Try setting up a virtual host for your project. Set the virtual host to the public directory of your project.
  18. Hmm you're right I made an assumption (which I shouldn't) that he might not need to run java through PHP but run it directly using JSP.
  19. It's because window.innerWidth doesn't exist in IE. use document.body.offsetWidth for IE instead.
  20. You might also want to look at the tomcat plugin so you can run jsp pages. Look under "XAMPP for Windows Add-Ons part" http://www.apachefriends.org/en/xampp-windows.html
  21. I mentioned a flatfile database because it's just a file on your server. You shouldn't be charged extra for using a flatfile database if you're server supports it.
  22. Before you continue with your xml shopping cart or txt based shopping cart. Is the reason perhaps because you can't use a database such as MySQL or postgres? You might want to look at flatfile databases such as SQLite
  23. You can indeed use a regular expression to change the relative paths to absolute paths. You might also want to look at DOMdocument for fetching and modifying certain elements.
  24. Check the manual for $_GET
  25. Alright here goes. When I try to go back to the homepage of this site I always receive the splash page with the age warning. Perhaps you could place a cookie that remembers if a user has already visited the website. That way you don't have to see the splash page every time you try to access the website's homepage. The navigation looks odd for me, try the website in Firefox and you'll see that the last navigation item "contact us" is written over 2 lines. I think the Letters to prison logo does not stand out enough from the rest of the page. Maybe you should make this larger. This might be just me but I think cutting off the ".com" and placing it on a new line looks a bit ugly. The contrast between text and the background isn't big enough try to make all the text of your website as readable as possible.
×
×
  • 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.