Advertisement
Advertisement
| 05.16.2008 at 05:07PM PDT, ID: 23410040 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: |
<html>
<head>
<script type="text/javascript">
function FindAbsolutePosition(obj)
{
var curtop = curleft = 0;
if (obj.offsetParent)
{
do
{
curtop += obj.offsetTop;
curleft += obj.offsetLeft;
} while (obj = obj.offsetParent);
}
return {top:curtop, left:curleft};
}
function FlyToDestination(flyingID, destID)
{
var flyingSpeed = 25;
var source = document.getElementById(flyingID);
var destination = document.getElementById(destID);
// Get source position
source_x = FindAbsolutePosition(source)['left'];
source_y = FindAbsolutePosition(source)['top'];
// Get destination position
dest_x = FindAbsolutePosition(destination)['left'];
dest_y = FindAbsolutePosition(destination)['top'];
// Get relative postioning
diffX = dest_x - source_x;
diffY = dest_y - source_y;
// Start clone creation
var contentCopy = source.cloneNode(true);
contentCopy.id='';
flyingDiv = document.createElement('DIV');
flyingDiv.style.position = 'absolute';
document.body.appendChild(flyingDiv);
flyingDiv.innerHTML = '';
flyingDiv.style.left = source_x + 'px';
flyingDiv.style.top = source_y + 'px';
flyingDiv.appendChild(contentCopy);
flyingDiv.style.display='block';
flyingDiv.style.width = source.offsetWidth + 'px';
// Start flying!
while (flyingDiv.style.display == 'block')
{
var maxDiff = Math.max(Math.abs(diffX), Math.abs(diffY));
var moveX = (diffX / maxDiff) * flyingSpeed;
var moveY = (diffY / maxDiff) * flyingSpeed;
source_x = source_x + moveX;
source_y = source_y + moveY;
alert('X = ' + source_x + '\nY = ' + source_y);
flyingDiv.style.left = Math.round(source_x) + 'px';
flyingDiv.style.top = Math.round(source_y) + 'px';
// Hide after landed
if (moveX > 0 && source_x > dest_x)
flyingDiv.style.display = 'none';
if (moveX < 0 && source_x < dest_x)
flyingDiv.style.display = 'none';
}
alert('Done');
}
</script>
</head>
<body>
<div id="destination">
Destination is here
</div>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<img id="source" src="http://tbn0.google.com/images?q=tbn:ylwf-XkJVe34QM:http://www.maip.com/media/images/Google%2520Logo.jpg" />
<br>
<button onclick="FlyToDestination('source', 'destination');">Fly to Destination</button>
</body>
</html>
|
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 05.16.2008 at 06:53PM PDT, ID: 21587696 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: |
<script type="text/javascript">
var flyingSpeed = 25;
var source;
var destination;
var source_x;
var source_y;
var dest_x;
var dest_y;
var diffX;
var diffY;
var flyingDiv;
function FindAbsolutePosition(obj)
{
var curtop = curleft = 0;
if (obj.offsetParent)
{
do
{
curtop += obj.offsetTop;
curleft += obj.offsetLeft;
} while (obj = obj.offsetParent);
}
return {top:curtop, left:curleft};
}
function FlyToDestination(flyingID, destID)
{
source = document.getElementById(flyingID);
destination = document.getElementById(destID);
// Get source position
source_x = FindAbsolutePosition(source)['left'];
source_y = FindAbsolutePosition(source)['top'];
// Get destination position
dest_x = FindAbsolutePosition(destination)['left'];
dest_y = FindAbsolutePosition(destination)['top'];
// Get relative postioning
diffX = dest_x - source_x;
diffY = dest_y - source_y;
// Start clone creation
var contentCopy = source.cloneNode(true);
contentCopy.id='';
flyingDiv = document.createElement('DIV');
flyingDiv.style.position = 'absolute';
document.body.appendChild(flyingDiv);
flyingDiv.innerHTML = '';
flyingDiv.style.left = source_x + 'px';
flyingDiv.style.top = source_y + 'px';
flyingDiv.appendChild(contentCopy);
flyingDiv.style.display='block';
flyingDiv.style.width = source.offsetWidth + 'px';
flyToDestination();
//alert('Done');
}
function flyToDestination(){
// Start flying!
var maxDiff = Math.max(Math.abs(diffX), Math.abs(diffY));
var moveX = (diffX / maxDiff) * flyingSpeed;
var moveY = (diffY / maxDiff) * flyingSpeed;
source_x = source_x + moveX;
source_y = source_y + moveY;
//alert('X = ' + source_x + '\nY = ' + source_y);
flyingDiv.style.left = Math.round(source_x) + 'px';
flyingDiv.style.top = Math.round(source_y) + 'px';
// Hide after landed
if (moveX > 0 && source_x > dest_x)
flyingDiv.style.display = 'none';
if (moveX < 0 && source_x < dest_x)
flyingDiv.style.display = 'none';
if(flyingDiv.style.display=='block')setTimeout('flyToDestination()',10);
}
</script>
|