Jump to content

DanDaBeginner

Members
  • Posts

    211
  • Joined

  • Last visited

    Never

Everything posted by DanDaBeginner

  1. how can sort the countries by ASC but with USA and Canada being the first.... I guess it will be something like: SELECT * FROM countries ORDER BY (country_name IN ('USA','CANADA')) ASC, country_name DESC.. Thanks in advance...
  2. wow chee thanks.. I thought that I need to submit my class or register to GNU (if for example im gonna use the GNU.).
  3. thanks ToonMariner . so meaning, for example is, all I just need to do is choose among this license that I think will be best suit for my classes, then include it (commented inside the class) on my classes stating that this class is under GPU.. thats it?
  4. hello guys and gals... how to have a license for my PHP and javascript classes? something like GNU General Public License, etc.. I've developed/currently developing a simple classes of PHP and javascript for my personal use, and thought it will be a help to others, so im going to make them available for the public/community.. but before doing that I want to have a license for them.. but how? thanks..
  5. solved.. in IE the document must be fully loaded before you can assign an handler to it.. (i guess) because my problem got fix when I added a setTimeout("set()",0). set() is the function that will assign an eventhandler to document. solve button is missing so i can't solved this thread...
  6. ok.. im trying to take an advantage on the bubbling phase of the event handler.. so I attached an onclick on the document object which the function e. I attached an onlclick event on document object to track every click on its childs, will be therefore handled by function e. as you can see on function e, it checks whether the souce/ target element is an <a> tag then checks whether this <a> tag has a rel attribute with a value of 'alert'. if true then it will alert its innerHTML. my problem is everything goes well on mozilla, bubbling phase was captured and it alerts for those <a> tags that has rel='alert' . but in IE nothing happens, and the worst is theres no errors popping up.. if you are interested i can send you the html file, 1.11 kb. hope I explained it very well.. thanks again.
  7. thanks for your response.. for sure there was a problem.. can you atleast give me a hint on whats the problem? are you using a debugger or something?
  8. I have this code just to practice on how to work with delegation.. and I was suprised that this code was not working in IE.. please somebody explain it to me why its not working.. this is place on the head tag of my .html <script> function e(y) { var y = y || window.event; var t = y.target || y.srcElement; if (t.nodeName.toLowerCase() === 'a') { if (t.rel == 'alert') { alert(t.innerHTML); return false; } } } add = function() { var t = document.getElementById("test"); var a = document.createElement("a"); a.rel = 'alert'; var text = document.createTextNode("Added"); var br = document.createElement("br"); a.href="5"; t.appendChild(br); a.appendChild(text); t.appendChild(a); } document.onclick = e; </script> in the body <div id="test"> <a href="1" rel="alert">Hello</a><br /> <a href="2" rel="alert">Yikes!</a><br /> <a href="3" rel="alert">NP</a><br /> <a href="4" rel="alert">Tae!</a> </div><br /> <br /> <a href="add" onclick="add(); return false;">Add</a>
  9. this http://www.gregphoto.net/sortable/ might be a help...
  10. this might help you http://www.gregphoto.net/sortable/ ...
  11. . let me start by giving an example code: <script> var t = function() { var obj = document.getElementById("menu"); alert(obj.value); } </script> <form name="form1"> <select name="menu" id="menu" onchange="t(this);"> <option value="Pizza">Pizza</option> <option value="French Fries">French Fries</option> <option value="Ham Burger">Ham Burger</option> </select> </form> ok now my question is, the function accessed the select by its id, is there a way that i can get the form name (<form name="form1">) where this select came from? somethine like: <script> var t = function() { var obj = document.getElementById("menu"); var formName = getForm(obj); // and the value of the formName will be form1... } </script> thanks in advance, hope i explained it correctly..
  12. i don't know whats wrong with my function, its working great in firefox and safari, but it does'nt in IE 6 and 7.. please help function addKey() { globalSmartKey = true; addS = document.getElementById("addS"); removeS = document.getElementById("removeS"); addS.style.display = "none"; removeS.style.display = "block"; var smartkey = document.getElementById("smartkey"); fields = ['Gender','DOB','Height','Weight']; var p = document.createElement("p"); p.setAttribute("id","pSmart"); p.innerHTML = '<br /><strong>Please fill in the information below to set up your SmartKey. It will be pre-programmed and waiting for you when you arrive at the club.</strong><br />'; p.innerHTML +='<br /><small style="font-size:10px;">This information is private. It is only used to pre-load your SmartKey so that it may provide you with accurate fitness information during and after your workout.</small><br />'; for(var t=0; t<fields.length; t++) { p.innerHTML += '<label for="fname">' + '<span id="err' + fields[t] +'" class="error"></span>' + '<span class="error">*</span>' + fields[t] +':' + '</label>' + '<input class="medium" id="' + fields[t] +'" name="' + fields[t] +'" type="text" value="" />'; } p.innerHTML += '<br /><br />'; smartkey.appendChild(p); }
  13. got question regarding this cron, can't explain it so i'll just going to give a sample. no got a script that resizes the images per folder. images may take 10 to hundreds. so for example the script is currently running to folder 10, and the script will be running again as i set it in the cron, what if the script is still running on folder 10 and it will try to work on folder 11, will that be an issue? everytime cron is running at a given time, is it just acting as like opening it into a new browser? so script works on folder 10 will not going to effect script that is running to folder 11?
  14. ooopss, did I say subquery?? I mean, never thought you can put IN statement on ORDER BY.. can you lead me to a tutorial that does this? been searchin for a tutorial but never found that does this..
  15. thats pimp barand, thx. never thought sub query is allowed in ORDER BY statement.. can you lead me to a tutorial that teach this? I've try searching many tutorials and none of them give me atleast a sample of this kind of query.. where else does the subquery allowed? thx
  16. thanks.. theres actually nothing wrong with my query, its just the HeidiSql has some bug or something which results to 0 row, but when I tried it on phpmyadmin it fetch the right rows.. what could be the problem in heidisql? has anyone encountered a problem like this?
  17. im trying to select a country but with USA and CANADA first and others to be arranged alphabetically, so I have this query. but the problem is when used this query with both select statement enclosed in brackets theres no row selected (SELECT `country_name` FROM `country` as t2 WHERE `country_name` IN ('UNITED STATES','CANADA') ) UNION ( SELECT `country_name` FROM `country` as t3 WHERE `country_name` NOT IN ('UNITED STATES','CANADA') ORDER BY `country_name` ASC ) but this one, first select statement without bracket it displays what I wanted.. SELECT `country_name` FROM `country` as t2 WHERE `country_name` IN ('UNITED STATES','CANADA') UNION ( SELECT `country_name` FROM `country` as t3 WHERE `country_name` NOT IN ('UNITED STATES','CANADA') ORDER BY `country_name` ASC ) what is the difference between the two? and why the first query doesn't display any row? thanks in advance
  18. thanks for the quick response.. maybe: is there a way that I can convert the files without getting it from Server B?
  19. I've been bangin my head now. please help. this is the scenario. im converting .wmv files From Server B to .flv, im using ffmpeg to achieved this, but this is not the issue. now the problem is Server B doesn't have ffmpeg installed, but Server A has ffmpeg installed. now my problem is, is there a way that I can get the files automatically/using PHP from Server B to Server A then convert to .flv, then after converting, the .flv file from Server A back to Server B. or if you have a better solution please help. if you find my explanation is too blurry please bump. thank you very very much...
  20. try to optimize your query/dbase.... that should help.. when theres no user inside the chatroom the rows should be deleted or else your table will be populate...
  21. maybe my previous message was confusing... lets not talk about the messaging, I got AJAX request that executes every 7 seconds to see if somebody commented to his/her blog post, and got a link that when a user clicked an AJAX request will be sent to fetch all the online members... so what will be my question? since I got an AJAX that executes at 7 seconds and the user click on the link because he/she wanted to see who is online at exactly 7 seconds.. so there will be two request at a time... will that be a problem? will it cause an error? please help...
  22. hello gals and guys... really need help.. I need to execute a two ajax request, one will be run for every 5 seconds to check against the database if theres a message that has been sent to the user, if foun then theres a pop-up informing the user that theres a message and one will be viewing message, sending message, etc.. now my problem is since the first request executes every 5 seconds and if the user decided to send a message so there will be two request at the sametime but on different pages, the first one will be sending and fetching to check.php and the second one to send.php.. am I going to have a problem on this one? do you have a better idea on this one? thanks in advance!!!
  23. thanks for your help, you are the fist one to help and hopefully not will be the last... I'll be looking for it also.. please bump if you have found something that will be helpful.. thanks you so much
×
×
  • 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.