Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Feb 2011
    Posts
    27
    Thanks
    3
    Thanked 0 Times in 0 Posts

    (Help) Ajax project

    First of all hello to everyone and really sorry if i did post my thread in wrong section. i just can't get this to work.

    It's small project that i am working on but it's not like i have much experience in ajax so i have problem with marging it with html and php.
    Html file the script code:
    Code:
    <script type="text/javascript" src="7343/js/dragdrop2.js"></script><script type="text/javascript">
                        var INIT_DHTML = true;
                        var PICK_ITEM = false;
                        SET_DHTML(CURSOR_MOVE, "p8_1_1" + NO_DRAG, "p2_1_1", "p3_1_1", "p4_1_1", "p6_1_1", "p7_1_1", "p5_1_1", "p9_1_1", "p10_1_1", "p11_1_1", "p512_1_1", "p512_1_2", "p512_1_3", "p512_1_4", "p512_2_1", "p512_2_2", "p512_2_3", "p512_2_4", "p512_3_1", "p512_3_2", "p512_3_3", "p512_3_4", "p512_4_1", "p512_4_2", "p512_4_3", "p512_4_4", "p512_5_1", "p512_5_2", "p512_5_3", "p512_5_4", "p512_6_1", "p512_6_2", "p512_6_3", "p512_6_4", "p512_7_1", "p512_7_2", "p512_7_3", "p512_7_4", "p512_8_1", "p512_8_2", "p512_8_3", "p512_8_4");
                        var pickObj = new DDObj("");
                        var aElts = [dd.elements.p8_1_1, dd.elements.p2_1_1, dd.elements.p3_1_1, dd.elements.p4_1_1, dd.elements.p6_1_1, dd.elements.p7_1_1, dd.elements.p5_1_1, dd.elements.p9_1_1, dd.elements.p10_1_1, dd.elements.p11_1_1, dd.elements.p512_1_1, dd.elements.p512_1_2, dd.elements.p512_1_3, dd.elements.p512_1_4, dd.elements.p512_2_1, dd.elements.p512_2_2, dd.elements.p512_2_3, dd.elements.p512_2_4, dd.elements.p512_3_1, dd.elements.p512_3_2, dd.elements.p512_3_3, dd.elements.p512_3_4, dd.elements.p512_4_1, dd.elements.p512_4_2, dd.elements.p512_4_3, dd.elements.p512_4_4, dd.elements.p512_5_1, dd.elements.p512_5_2, dd.elements.p512_5_3, dd.elements.p512_5_4, dd.elements.p512_6_1, dd.elements.p512_6_2, dd.elements.p512_6_3, dd.elements.p512_6_4, dd.elements.p512_7_1, dd.elements.p512_7_2, dd.elements.p512_7_3, dd.elements.p512_7_4, dd.elements.p512_8_1, dd.elements.p512_8_2, dd.elements.p512_8_3, dd.elements.p512_8_4];
                        var maxcols = 8;
                        var maxrows = 4;AddCharDiv("p8_1_1", 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);dd.elements.p8_1_1.contenttypeaccept = 64;dd.elements.p8_1_1.w = 168;dd.elements.p8_1_1.css.width = "168px";dd.elements.p8_1_1.h = 194;dd.elements.p8_1_1.css.height = "194px";AddCharDiv("p2_1_1", 100, 18, 0, 16, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p3_1_1", 37, 89, 2, 8, 32, 2, 6307455, 14, 0, 0, 0, 0, 1, 1, -1, "", [ ]);AddCharDiv("p4_1_1", 181, 89, 0, 32, 32, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p6_1_1", 181, 199, 0, 1, 1, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p7_1_1", 213, 199, 0, 1, 1, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p5_1_1", 100, 89, 0, 32, 32, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p9_1_1", 21, 199, 0, 16, 16, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p10_1_1", 100, 199, 0, 16, 16, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p11_1_1", 181, 50, 0, 1, 1, 1024, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_1_1", 0, 0, 4, 16, 1, 65535, 6307456, 36, 0, 0, 0, 0, 1, 2, -1, "", [ ]);AddCharDiv("p512_1_2", 0, 32, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_1_3", 0, 64, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_1_4", 0, 96, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_2_1", 32, 0, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_2_2", 32, 32, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_2_3", 32, 64, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_2_4", 32, 96, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_3_1", 64, 0, 64, 1, 1, 65535, 6307457, 4, 0, 0, 0, 0, 1, 1, -1, "<table cellspacing=2 cellpadding=2 valign=middle class=\'tooltipBox\'><tr><td style=\'color:white; font-weight: bold; font-size:9pt\' colspan=\'2\' nowrap=\'nowrap\'>Apple</td></tr><tr><td style=\'color:#DDD; font-weight: bold; font-size:8pt\' colspan=\'2\' nowrap=\'nowrap\'>(Soul bound)</td></tr><tr><td style=\'color:#DDD; font-weight: bold; font-size:8pt\' colspan=\'2\' nowrap=\'nowrap\'>Using: Heals 37 of life</td></tr><tr><td style=\'color:#DDD; font-weight: bold; font-size:8pt\' colspan=\'2\' nowrap=\'nowrap\'>From intelligence: +25 vitality point(s)</td></tr><tr><td style=\'color:#DDD; font-weight: bold; font-size:8pt\' colspan=\'2\' nowrap=\'nowrap\'>Combined with: Bananas, Chicken</td></tr><tr><td style=\'color:#DDD; font-weight: bold; font-size:8pt\' colspan=\'2\' nowrap=\'nowrap\'>Max. level of the item: 1</td></tr><tr><td style=\'color:#808080; font-weight: bold; font-size:8pt\' colspan=\'2\' nowrap=\'nowrap\'>Level 1</td></tr><tr><td style=\'color:#DDD; font-weight: bold; font-size:8pt\' colspan=\'2\' nowrap=\'nowrap\'>Value 4 <img src=\'7343/img/res2d.gif\' alt=\'Gold\' title=\'Gold\' align=\'absmiddle\' border=\'0\' /></td></tr><tr><td style=\'color:#808080; font-weight: bold; font-size:8pt\' colspan=\'2\' nowrap=\'nowrap\'>Hint: To use an item</td></tr><tr><td style=\'color:#808080; font-weight: bold; font-size:8pt\' colspan=\'2\' nowrap=\'nowrap\'>drag it onto your character picture in the overview.</td></tr></table>", [ ]);AddCharDiv("p512_3_2", 64, 32, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_3_3", 64, 64, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_3_4", 64, 96, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_4_1", 96, 0, 64, 1, 1, 65535, 6307458, 11, 0, 0, 0, 0, 1, 1, -1, "", [ ]);AddCharDiv("p512_4_2", 96, 32, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_4_3", 96, 64, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_4_4", 96, 96, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_5_1", 128, 0, 64, 1, 1, 65535, 6307459, 8, 0, 0, 0, 0, 1, 1, -1, "", [ ]);AddCharDiv("p512_5_2", 128, 32, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_5_3", 128, 64, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_5_4", 128, 96, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_6_1", 160, 0, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_6_2", 160, 32, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_6_3", 160, 64, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_6_4", 160, 96, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_7_1", 192, 0, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_7_2", 192, 32, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_7_3", 192, 64, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_7_4", 192, 96, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_8_1", 224, 0, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_8_2", 224, 32, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_8_3", 224, 64, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);AddCharDiv("p512_8_4", 224, 96, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", [ ]);changeShow();
    					</script><script type="text/javascript"></script>
    
    
    <div id="p512_1_1" style="position:absolute;width:32px;height:32px" onMouseOver="return escape(dd.elements.p512_1_1.tooltip)">(<img style="bottom:0px" src="7343/img/item/'.$row[1].'" />/* if inventory contains an img  */)</div>
    I have attached some scripts that need importing. Not all ofcourse.

    So the main problem is i got it to read from database and paste in inventory the image but when i try to move item it just moves and a bit buggy also, when i want it to drop it just drops and dosen't fix in his location at inventory image, so in another words i can't understend how to make that i can drag and drop it and it will save in database each time. I will appreaciate any help, thanks and sorry for bad english.
    Attached Files Attached Files


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •