Jump to content

Irate

Members
  • Posts

    354
  • Joined

  • Last visited

  • Days Won

    1

Irate last won the day on September 19 2013

Irate had the most liked content!

About Irate

  • Birthday 02/02/1997

Contact Methods

  • Website URL
    http://avacweb.net
  • Skype
    irate_god1

Profile Information

  • Gender
    Male
  • Location
    Hamburg, Germany
  • Interests
    PHP, JavaScript, Black Metal, Death Metal, Blackened Death Metal
  • Age
    17

Irate's Achievements

Member

Member (2/5)

13

Reputation

  1. Suuuuure. By the way, congratz, it was about time.
  2. Hello everyone, it's been a while since I last made a topic, but here we go. So, to start, I am working with TYPO3 right now - to be exact, I am modifying an extension for someone - and I want to assign certain variables I can access with placeholders, but I have not worked with SQL in a while and since I have been here for a while, I figured I might as well ask you guys. I am grabbing entries from the table brandings which has three columns: one is called "brandingTargetPath", the second one is called "user" and the last one is "when", where the first two will be varchar(255) and the last one is int(11), with the table having an auto-increment Primary Key called "uid". Now, I can select the rows I want to and use "SORT BY when DESC" to get the most recent entries first, but then I want to differentiate between the different "brandingTargetPath" entries and show only the most recent entry in a certain path (the possible paths will be provided by PHP). Could anyone just hint me at the direction which SQL commands I should use? That'd be great, I can sort out the rest by myself. Thanks in advance, Irate
  3. Just add E? after the S.
  4. Or just use regular expressions if you don't want to convert to lower-/upper-case and then back to the original state. You can't dynamically create regular expression literals, so you have to use the /* new */ RegExp() constructor (the new is actually optional as it will work the same either way).
  5. Just a quick suggestion (more like urging you to do it), use jQuery for anything even remotely related to Ajax. It makes everything a lot easier. If getkm.php works fine, then you might call it like this with jQuery: $.get('/getkm.php'{b:postcodebeginww,e:postcodeeindww},function(data){}); In the function(data){} part you handle the response. You could use .done(function(data){}), too, whichever you prefer. And look uo the jQuery documentation in general.
  6. How about using [^\w $\-] The \w in a synonym for [a-zA-Z0-9_], so this saves you a few valuable characters (if you're writing compressed and/or minified code.
  7. Actually, the selector "td.my class" looks for an XML tag named <class> which is a child of a <td> element with a class of 'my'. Class attributes in HTML can be space-separated lists of class names, so as to assign multiple class names to an element. Do you literally have <td class="my class"> in your HTML? If so, try querying $('td.my.class').
  8. Ajax is just a scripted HTTP-Request "module" JavaScript contains. It does not provide anything else on its own, just, as I said, a way to asynchronously fire HTTP-Requests. In some cases, you just have to bite into the sour apple and not support IE beneath 10. It's not uncommon, actually. You could use Shockwave Flash to embed animations on IE, if you want to, though.
  9. Two things. 1. If I see a huge block of code without any proper formatting ( /* code here */ helps a lot), I usually don't even start to bother reading all of it. 2. You're already using jQuery which provides the most cross-browser comfort a JS framework has to offer. If it doesn't work with jQuery, it probably doesn't work at all in IE.
  10. If you have created the output file, I suggest you use fopen, fgetcsv, feof and fputs or fwrite.
  11. I guess I was being misunderstood... I could ask my school's sysadmin for help, that's what I meant to say.
  12. The HTML comment works for all IE versions which are lte 8, where lte is "less than or equal". If you need a more general condition, use <!--[if IE]>...<![endif]-->. Other possible variants are lt IE n (where n is the version number), gt IE n, gte IE n and !IE (for NOT IE). Edit: Got my BBCode wrong.
  13. The syntax looks widely correct to me. Are you sure you got the right language for your assignment / for what you need? As Xaotique said, this is JavaScript, not Java.
  14. You could try using .jsp files for that purpose, no dire need to do it with PHP, I reckon. Besides, PHP provides a lot of handy OOP stuff, so why not use it?
  15. $("input[type='password']:eq(0)").on("change",function(){ var next = $("input[type='password']:eq(1)"); if(!next.val().trim()) return; if(next.val()==$(this).val()) // passwords match, do something $(next).addClass("correct-pass"); else $(next).addClass("wrong-pass"); }); $("input[type='password']:eq(1)").on("change",function(){ var prev = $("input[type='password']:eq(0)"); if(!prev.val().trim()) return; if(prev.val()==$(this).val()) $(this).addClass("correct-pass"); else $(this).addClass("wrong-class"); }); It's just an example of how to implement that. There's some other ways, too.
×
×
  • 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.