Click here to Skip to main content
15,896,348 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: As simple as I can make it Pin
#realJSOP6-Jun-13 2:54
professional#realJSOP6-Jun-13 2:54 
QuestionNeed help with ajax request Pin
marcusKam27-May-13 0:03
marcusKam27-May-13 0:03 
AnswerRe: Need help with ajax request Pin
Dennis E White28-May-13 4:29
professionalDennis E White28-May-13 4:29 
GeneralRe: Need help with ajax request Pin
marcusKam29-May-13 10:29
marcusKam29-May-13 10:29 
GeneralRe: Need help with ajax request Pin
Dennis E White29-May-13 10:38
professionalDennis E White29-May-13 10:38 
GeneralRe: Need help with ajax request Pin
marcusKam29-May-13 10:43
marcusKam29-May-13 10:43 
AnswerRe: Need help with ajax request Pin
Jasmine250128-May-13 12:34
Jasmine250128-May-13 12:34 
Questiona little help for DragandDrop data transfer Pin
nomarkst23-May-13 21:32
nomarkst23-May-13 21:32 
C#
function OnTargetDrop(){

    //////////////////////////
    alert(oDragItem.value); //for checking a value of dragged item
    alert(oDragTarget.value);//for checking the item that arrive on the target
    var temp = oDragTarget.value;saving a value of target div that brings the position of dragged box
if arrived target is <div class="DropTarget" value="2"> brings 2 as value
    var tmp_val = oDragItem.value-0;// brings a value dragged item. if dragged item is <div class="Dragable" selectable="no"style="background-color:#eee8aa;"value="10"> cb13030940</div> brings value as 10. to change to numerical type value-0. if drag the other item, pick the other value.
    var $node = $("#order").children().eq(temp);//by using jQuery, approach the item quantity at the bottom of the table. appoint the tr at the item quantity to id id order, and using $(#order")to approach to tr. using children().eq(temp) to approach to specific td.
//if eq(0) is first td, eq(1)is second td,...eq(temp)->put the value item to temp and approach to specific td. and save the approach object to node. 
    var org_val = $node.text()-0;// by usin :)  :) g $node.text() bring number 300 in the <td>300</td>tag. to change it to numerical type, use -0.  
    $node.text(org_val+tmp_val);//by using $node.txt(changable text) change text in the specific td tag. 
    //////////////////////////

    oDragItem.style.position="";
    oDragTarget.appendChild(oDragItem);
    //oDragTarget.dataTransfer();
    if (navigator.platform=="iPad") MakeDragable(oDragItem);


}
<blockquote class="FQ"><div class="FQA">Quote:</div>
<td>
{
<div class="DropTarget" value="1">
      <div class="Dragable" seletable="no" style="background-color:#eee8aa;" value="10">cb13030940</div>
      <div class="Dragable" seletable="no" style="background-color:#87cefa;" value="10">cb13030940</div>
      <div class="Dragable" seletable="no" style="background-color:#66cdaa;" value="20">cb13030940</div>
      <div class="Dragable" seletable="no" style="background-color:#eee8aa;" value="10">cb13030940</div>
      <div class="Dragable" seletable="no" style="background-color:#eee8aa;" value="30">cb13030940</div>
      <div class="Dragable" seletable="no" style="background-color:#87cefa;" value="20">cb13030940</div>
      <div class="Dragable" seletable="no" style="background-color:#66cdaa;" value="20">cb13030940</div>
      <div class="Dragable" seletable="no" style="background-color:#eee8aa;" value="10">cb13030940</div>
     </div>
<blockquote class="FQ"><div class="FQA">Quote:</div></td></blockquote>
</blockquote>
<blockquote class="FQ"><div class="FQA">Quote:</div><td align="center">
					<div class="DropTarget" value="2">
						<div class="Dragable" seletable="no" style="background-color:#eee8aa;" value="20">cb13030940</div>
						<div class="Dragable" seletable="no" style="background-color:#87cefa;" value="10">cb13030940</div>
						<div class="Dragable" seletable="no" style="background-color:#66cdaa;" value="20">cb13030940</div>
						<div class="Dragable" seletable="no" style="background-color:#eee8aa;" value="20">cb13030940</div>
						<div class="Dragable" seletable="no" style="background-color:#87cefa;" value="20">cb13030940</div>
						<div class="Dragable" seletable="no" style="background-color:#87cefa;" value="20">cb13030940</div>
						<div class="Dragable" seletable="no" style="background-color:#66cdaa;" value="10">cb13030940</div>
					</div>
					
				</td></blockquote>

<blockquote class="FQ"><div class="FQA">Quote:</div>

<blockquote class="FQ"><div class="FQA">Quote:</div><%
int sum1, sum2;
%></blockquote>
<tr align="center" id="order">
					<td width = "25">Order Quantity</td>
					<td><%=sum1%></td>
					<td><%=sum2%></td>
					<td>sum3</td>
					<td>sum4</td>
					<td>sum5</td>
					<td>sum6</td>
					<td>-</td>
					<td>-</td>
					<td>-</td>
				</tr></blockquote>
}
}// when the value gets 1, the value in the div's sum
becomes sum1. when the value gets 2, the value in the div's sum becomes sum2. when div moves, sum1 or sum2 change depends on specific value,
QuestionRe: a little help for DragandDrop data transfer Pin
ZurdoDev24-May-13 8:29
professionalZurdoDev24-May-13 8:29 
SuggestionRe: a little help for DragandDrop data transfer Pin
Dennis E White24-May-13 16:54
professionalDennis E White24-May-13 16:54 
QuestionHelp for below java script Pin
abmanish7123-May-13 17:22
abmanish7123-May-13 17:22 
QuestionRe: Help for below java script Pin
ZurdoDev24-May-13 4:27
professionalZurdoDev24-May-13 4:27 
QuestionJavascript/jquery problem Pin
#realJSOP22-May-13 9:46
professional#realJSOP22-May-13 9:46 
AnswerRe: Javascript/jquery problem Pin
Dennis E White22-May-13 10:31
professionalDennis E White22-May-13 10:31 
GeneralRe: Javascript/jquery problem Pin
#realJSOP23-May-13 0:54
professional#realJSOP23-May-13 0:54 
GeneralRe: Javascript/jquery problem Pin
Dennis E White23-May-13 4:09
professionalDennis E White23-May-13 4:09 
GeneralRe: Javascript/jquery problem Pin
#realJSOP24-May-13 2:54
professional#realJSOP24-May-13 2:54 
GeneralRe: Javascript/jquery problem Pin
Dennis E White24-May-13 6:08
professionalDennis E White24-May-13 6:08 
GeneralRe: Javascript/jquery problem Pin
#realJSOP25-May-13 11:18
professional#realJSOP25-May-13 11:18 
GeneralRe: Javascript/jquery problem Pin
Dennis E White25-May-13 11:27
professionalDennis E White25-May-13 11:27 
GeneralRe: Javascript/jquery problem Pin
#realJSOP26-May-13 2:49
professional#realJSOP26-May-13 2:49 
GeneralRe: Javascript/jquery problem Pin
User 171649225-May-13 11:37
professionalUser 171649225-May-13 11:37 
GeneralRe: Javascript/jquery problem Pin
#realJSOP26-May-13 3:01
professional#realJSOP26-May-13 3:01 
GeneralRe: Javascript/jquery problem Pin
User 171649226-May-13 4:47
professionalUser 171649226-May-13 4:47 
QuestionHow to Add Days in Javascript Date Object Pin
Robymon22-May-13 2:26
Robymon22-May-13 2:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.