-
Content Count
958 -
Joined
-
Last visited
-
Days Won
5
Everything posted by sonesay
-
OK I have attached an image of the structure of the HTML. I need help on figuring out a good method to be able to: 1. move div sections up or down the order. 2. change div sections child attributes depending on their position in the order 3. update order to database with Ajax (State of order has to be save to MySQL). There is only one function 'moveItem(direction, id, this)' that is used to move items (div_method_container_n*) around. These div_method_container_b* sit inside a parent div div_method_container_all so it makes grouping them a lot easier. I am using images for the buttons and have use an onclick="moveItem(direction, id, this)" attribute assigned to them. the current state I have it up to so far is I am able to move items around but I can only get access to the current div that I am working on so I can only change the attributes there. i.e modify the moveItem() only for the div with the button being clicked on. I cannot figure out a way to transverse to the next div and modify its moveItem() according so its up to date and will function correctly when clicked on. I am after suggests on ways to do this or even a complete rework on the solution so I can get a better functioning application. function moveItem(direction, id, obj){ var parent = obj.parentNode; var grandParent = parent.parentNode; var ipHidden; var hNodes = parent.childNodes; for(var i=0;i<hNodes.length; i++) { if(hNodes[i].tagName == 'INPUT') { ipHidden = hNodes[i]; break; } } // move items around if(direction == 'down') { jQuery(grandParent).insertAfter(jQuery(grandParent).next()); jQuery(obj).attr("onClick","moveItem('down', "+(id+1)+", this)"); jQuery(ipHidden).attr("Value",id+1); } else if(direction == 'up') { jQuery(grandParent).insertBefore(jQuery(grandParent).prev()); jQuery(obj).attr("onClick","moveItem('up', "+(id-1)+", this)"); jQuery(ipHidden).attr("Value",id-1); }} I had to use a combination jQuery and regular javascript because somethings seem easier to do with one or the other. like I said any suggestions for improvement appreciated thank you.
-
I think the overall production was good. The scenes looked good but seem to be rushed at some points. Like missing shots maybe? It kinda look like you cut bits off here and there. I think the filming was great but the acting sucked. I know they are not professional actors and you can tell lol. It looked like a play fight but yeah what can you expect from regular people acting. Great job though.
-
Can we see a picture ? lol back to reality it is wrong considering she is married there should be none of that going on. If you really are a friend you will avoid behavior like that since if anything was to happen you will create problems for his family. Put aside your desires and think about your friend. There are plenty of girls and there is no need to chase after someone who is already married unless you are totally in love with them and believe they are the right one for you (your soul mate). If you both feel that way towards each other then who are we to tell you other wise. Just curious how old are you, your friend and his mum?
-
I think that is true in the sense that it would not matter that you have items ordered in 1,2,3,,6,8,10,100. It is still ordered.. I agree on that part but you will still need to determine a value for a newly inserted record depending on where you want to insert it. Having them ordered just looks cleaner and the code you write to do other functions may or maybe benefit from having it nicely ordered. I think you are totally right though that it doesn't matter and it would probably create more overhead than more benefit to the program. I will take a look at the MooTools library but I think that will be later on when I finally decide on these early steps. Thank you for your insight in to this discussion.Update: ORDEREDOK this just popped up in my head. What if the say I had position id's of 1,2,3,....100 (1 - 100) I add a new record after 3 so everything else after it needs to shift up 1. That is going to alot of overhead on updating those records. UNORDEREDNow what if I had position id's of 1,3,7,8,21,57,89. I add a new record in after the 3rd item (position id 7), new position id = 8 for the newly inserted record. Now Checks have to be made for the next item which is position id = 8, If they are the same then you need to increase by 1 and check the next one. You have to keep checking to see until the current record position id is not equal to the next. This seems like its going to get complex either way. Do you see any thing I have missed or got wrong let me know.
-
Add in some handling for the first and last items and that's what I've got so far. I'm more asking about ideas rather then code. how one would handle records being removed. You will obviously have gaps in the in the position list. Would you reorder the position right away on delete so that no gap exist. I think I gave a clear description of what I intended to build on the previous posts. There is so many ways to do it right, I'm just trying to figure out the best possible solution. I think after an items is deleted the records after it will need to be shifted back 1 in position id. That way my existing add function still works where it will insert the position id correctly of number of records plus 1. What about if I wanted to be able to choose where I inserted new records later on. I will obviously need to reorder the proceeding records with new position id's +1. I know this is getting a bit more complicated but I sort of had this idea of what I wanted from the start. I still want to be able to add the ability to edit records directly on the same page listing without a refresh so I still haven't thought about how I am going to do that. Not to mention I am considering to make it Ajax based. Hm I would even want to be able to drag my records and move them into positions interactively . If anyone has come across something similar and it has been coded before that would save a lot of time let us know. Other wise it seems that I will have to write it all from scratch. I've seen drag gable user interfaces in ext js library but I am not too keen to using such a big JavaScript library. So if anyone would like to work on it lol I can give you the source code and sql table I have so far.
-
That is somewhat where I was heading but your code does not handle the swapping of position id values. Remember I said I needed it so users can be able to move items(records) around in position and they may also be able to delete entries. so If I have item1 position id = 1item2 position id = 2item3 position id = 3item4 position id = 4 if you moved item3 up one position with your code you will have two items (item2 and item3 with position of 2), also you should not be able to move item1 up anymore since its the first in the list. I do appreciate your input but I'm still trying to cover all the bases here so I'm still thinking it through. Also consider if you were to delete item3 and then try to move item4 up. It would still be the last item on the list with a new position id of 3. I think the only way to do it is to get the previous or next items id and swap them around. That way gaps are ignored where items used to be.
-
Umm, no I wasn't exactly after that problem. You really want to know ? OK I am needing to build an interface that lets you add/delete records in then move them around in different orders. any help ?
-
Another PHP topic I somehow missed. Is there a way to subscribe to certain forums or threads? OK back to the topic on hand. I am working on a similar problem but not exactly the type of ordering you are doing. How did you get along with it by the way? I think the responses above already give a good solution that would appear to work.
-
I get random chest pains too now and then. I cant say accurately how frequent they are but I'm guessing maybe once or twice in a few months I get it. It might be my bad diet that's causing strain on my heart. I eat a lot of unhealthy fatty food so It don't really surprise me. I get sharp pain that seem like something is stabbing at my heart for maybe a second or two and then its gone. Like I said that happens twice maybe in like 3-4 month cycle. Lately though I haven't been getting them since I have been a little more healthier.If it gets worse I would see a doctor or if it happens more frequently
-
First off sorry for reviving an old topic but I would like to add a few comments. I'm not sure your even around anymore since your last seen status is unavailable. The idea for the whole site is brilliant, There is so many people out there who are looking to learn PHP you would be getting a whole lot of hits. Its too bad that the site appears to be stopped from further development. I think you did a good job integrating those features/sections into joomla (correct me if I'm wrong). I think you did an awesome job as well on the layout since you say you couldn't find an expanding template I do appreciate the full use of window area. I have to give props for some of the articles in there also they are very informative. I only have a few dislikes that I would like to point out from what I've seen from the site so far. 1. as seen with the attached image the ads in the header mess up your layout but its rare. Only the ads with a bigger height mess it up. 2. Your function http://forums.xisto.com/no_longer_exists/ is lacking a value attribute for the option tag. I think this is required as names and values can differ. 3. as with the screen shot news articles should have dates listing as it will aid in determining how recent things are and updates made to the site. Other then those 3 minor things I like the site. Its a a shame its not complete and up to date with more content.
-
Interesting discussion. I cant believe I missed this thread, I must of been when I was not as active. I have submitted my votes. I am wondering how your getting on with the company. Any exciting projects your working on right now? I've been progressing a little bit myself but not yet ready to hit the freelance or own company thing. Good on ya through for doing it. I've got a question for you though since you say you got some code already prepared for certain functions. I know its good to have modular code ready to be reused on other projects. I started to write my own since the use of other libraries were either too complicated for my understanding or it did not do exactly what I wanted. I am wondering if you have moved on to OOP style or are you still in procedural programming. Looking forward to discussing further web development topics
-
Css Html Site - 2 Columns a work-in-progress
sonesay replied to jlhaslip's topic in Websites and Web Designing
I think there is a margin error somewhere for IE7. Content is pushed down when making the widow width size smaller. -
Css Html Site - 2 Columns a work-in-progress
sonesay replied to jlhaslip's topic in Websites and Web Designing
I just checked it out in firefox and it looks good. I like the layout it flows smoothly when resizing. The color scheme of green is too bright in my opinion, maybe even too greenly for my taste but I'm no expert in design. Other then that I think its going to be a nice site. -
This has been brought up before and in the end the people who run this forums still do not consider it a viable option. Report spam button is enough. Giving control to post starters on being able to delete reply's runs the risk of legitimate post to be deleted. We don't trust you that's the blunt reality.Oh and the number of post count docent mean nothing. Some people just get there quickly by spamming so you cant really put an argument in for saying this person is contributing just because he has a lot of post. Its the quality remember.
-
Objects As Array How do you store a collection of objects inside an object?
sonesay replied to sonesay's topic in Programming
Sorry about that truefusion. I did not post the exact code I just put the structure up there. At the time my code was being messed up abit because I was trying different things. I thought it would have been the same structure as yours except I was looping mine going through the array and I had mistakes on a few places. In the end its basically the same as your. I think I was getting the error of calling on a function on a non object because I didn't properly reference it. -
I am trying to create a object of class A that stores a collection of objects of class B. The problem is I cannot figure out how to retain them as objects when added to the array of class A. some code for better example. Class A{var $arrayHere; function addItem(item) { $arrayHere[] = item; }}Class B{ function doSomething() { }} When I add some items to class A array and try and call the methods of class B it says its undefined. Obviously I am not using it correctly and the array in class A are no long objects of class B. Anyone know how to accomplish this effect? Put an example code as well if you do thanks
-
Final Fantasy Games are one of the best RPG and MMORPG's ever! The overall quality of game play and graphics is amazing. I brought a PS3 just so I can play Final Fantasy 13 when it comes out
-
Can you post a link so that we can understand what the problem maybe exactly?
-
Deviantart Codebase What script is the UI written in?
sonesay replied to Jeune's topic in Programming
Can you provide a direct link please. I have no idea what your talking about here -
That is way too much to ask for every member. Even if we could get them to post there would be similar subjects being posted and the end result would be spam. Can you imagine how tough it would be to moderate that many topics? We don't necessary need new topics like you think it's just that a lot of current topics still lack quality discussions that's why it seems like everything's crap topics.
-
Need Feedback On My Portfolio Site sonesayi.com/si
sonesay replied to sonesay's topic in Websites and Web Designing
Gallery and Header updated!I've added a link on the main home page linking to the gallery when you click on the "view full-size image" link. It seems to be working on all browsers (sometimes opera and IE7 fail due to image size not getting obtained. I will need to fix this later when I have some time). I would say it works like 90% of the time on the min-width resizing lol. I changed the header a bit just seeing what will look good. Any bugs I missed please let me know thanks. -
Hello fellow developer. I hope you stay and let us know how you get on that GWT. It seems interesting but sadly I do not have the time to experiment with it. Working on too many projects as it is. The hosting here is great and I don't think you will find any better. All you gotta do is just contribute back to the forums with quality post and your set. Good Luck on your stay.
-
Graphic Tablet - Is It A Good Tool? How To Buy One?
sonesay replied to Digitalidad's topic in Graphics, Design & Animation
for drawing on the screen they got http://www.wacom.com/en-us/products/pen-displays expensive but the real deal. The down size to PC tablets is they would probably not be as accurate as tablets especially designed for drawing. Its probably only designed for pointing and dragging. What about the pressure levels as well? Another thing is you can plug your tablet into other machines and use it. The Cintiq 21 is a screen and tablet only. You need a computer to plug it into so you are free to move to different machines and upgrade your computer hardware and still be able to use the screen and tablet. -
Graphic Tablet - Is It A Good Tool? How To Buy One?
sonesay replied to Digitalidad's topic in Graphics, Design & Animation
Give your tablet to digitaldad since your not making full use of it lol. I'm kidding but if you are not really benifiting from it then maybe you can still sell it and not loose much since they are popular tablets. -
Graphic Tablet - Is It A Good Tool? How To Buy One?
sonesay replied to Digitalidad's topic in Graphics, Design & Animation
Best kinds are from Wacom tablets. I've had mine for like 2 years now and its still going well. They usally take about a day to get used to but after that you will never go back to using a mouse again unless you are on someone else's computer. get any size you want http://www.wacom.com/en-jp I wouldn't recommend buying any other cheaper brand as quality performance would not match a wacom. Prices are higher but you get what you pay for right.