Click here to Skip to main content
15,896,118 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: zoom the image size and display in the center of the page [modified] Pin
daveyerwin26-Apr-10 5:17
daveyerwin26-Apr-10 5:17 
GeneralRe: zoom the image size and display in the center of the page Pin
developerit27-Apr-10 1:49
developerit27-Apr-10 1:49 
GeneralRe: zoom the image size and display in the center of the page Pin
daveyerwin27-Apr-10 2:56
daveyerwin27-Apr-10 2:56 
AnswerRe: zoom the image size and display in the center of the page Pin
Tej Aj26-Apr-10 8:03
Tej Aj26-Apr-10 8:03 
QuestionHow to Get FTP username and password Pin
sjs4u26-Apr-10 0:44
sjs4u26-Apr-10 0:44 
AnswerRe: How to Get FTP username and password Pin
Not Active26-Apr-10 2:23
mentorNot Active26-Apr-10 2:23 
QuestionJcrop a jquery plug-in, has anybody used it ? Pin
jason_mf25-Apr-10 23:58
jason_mf25-Apr-10 23:58 
AnswerRe: Jcrop a jquery plug-in, has anybody used it ? Pin
Peace ON26-Apr-10 3:13
Peace ON26-Apr-10 3:13 
Following code works for me.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="jquery-1.4.2.js" > </script>
<script type="text/javascript" src="jquery.Jcrop.min.js"></script>
<link href="jquery.Jcrop.css" type="text/css" />
<link href="demos.css" type="text/css" />

</head>
<body>
<div id="outer">
<div class="jcExample">
<div class="article">

<h1>Jcrop - Aspect ratio lock w/ preview pane</h1>

<!-- This is the image we're attaching Jcrop to -->
<table>
<tr>
<td>
<img src="Water_lilies.jpg" id="cropbox" />
</td>
<td>
<div style="width:100px;height:100px;overflow:hidden;">
<img src="Water_lilies.jpg" id="preview" />
</div>

</td>
</tr>
</table>

</div>
</div>
</div>
</body>

<script type="text/javascript">

// Remember to invoke within jQuery(window).load(...)
// If you don't, Jcrop may not initialize properly
//alert("hi");

jQuery(window).load(function(){

jQuery('#cropbox').Jcrop({
onChange: showPreview,
onSelect: showPreview,
aspectRatio: 1
});

});

// Our simple event handler, called from onChange and onSelect
// event handlers, as per the Jcrop invocation above
function showPreview(coords)
{
if (parseInt(coords.w) > 0)
{
var rx = 100 / coords.w;
var ry = 100 / coords.h;

jQuery('#preview').css({
width: Math.round(rx * 500) + 'px',
height: Math.round(ry * 370) + 'px',
marginLeft: '-' + Math.round(rx * coords.x) + 'px',
marginTop: '-' + Math.round(ry * coords.y) + 'px'
});
}
}
</script>
</html>

I had followed your instruction and do some modification.

Hope this will help!
Jinal Desai

Questiontxt file template for Email Pin
FEMDEV25-Apr-10 23:48
FEMDEV25-Apr-10 23:48 
AnswerRe: txt file template for Email Pin
Jamil Hallal26-Apr-10 0:07
professionalJamil Hallal26-Apr-10 0:07 
GeneralRe: txt file template for Email Pin
FEMDEV26-Apr-10 1:04
FEMDEV26-Apr-10 1:04 
AnswerRe: txt file template for Email Pin
Sandesh M Patil26-Apr-10 0:45
Sandesh M Patil26-Apr-10 0:45 
QuestionTables in Web Site. Pin
Syasyaaa25-Apr-10 22:39
Syasyaaa25-Apr-10 22:39 
AnswerRe: Tables in Web Site. Pin
Ashfield25-Apr-10 22:43
Ashfield25-Apr-10 22:43 
AnswerRe: Tables in Web Site. Pin
Rijz25-Apr-10 22:46
Rijz25-Apr-10 22:46 
AnswerRe: Tables in Web Site. Pin
Tej Aj25-Apr-10 23:54
Tej Aj25-Apr-10 23:54 
AnswerRe: Tables in Web Site. Pin
Sandesh M Patil26-Apr-10 0:36
Sandesh M Patil26-Apr-10 0:36 
QuestionAsp to asp.net 2.0 migration Pin
Rijz25-Apr-10 22:37
Rijz25-Apr-10 22:37 
AnswerRe: Asp to asp.net 2.0 migration Pin
Vimalsoft(Pty) Ltd25-Apr-10 23:32
professionalVimalsoft(Pty) Ltd25-Apr-10 23:32 
GeneralRe: Asp to asp.net 2.0 migration Pin
Rijz26-Apr-10 0:21
Rijz26-Apr-10 0:21 
AnswerRe: Asp to asp.net 2.0 migration Pin
Jamil Hallal26-Apr-10 0:20
professionalJamil Hallal26-Apr-10 0:20 
AnswerRe: Asp to asp.net 2.0 migration Pin
Ankur\m/26-Apr-10 2:09
professionalAnkur\m/26-Apr-10 2:09 
GeneralRe: Asp to asp.net 2.0 migration Pin
Rijz29-Apr-10 0:07
Rijz29-Apr-10 0:07 
GeneralRe: Asp to asp.net 2.0 migration Pin
Ankur\m/29-Apr-10 0:12
professionalAnkur\m/29-Apr-10 0:12 
QuestionSend online SMS [modified] Pin
lrsalunkhe25-Apr-10 19:55
lrsalunkhe25-Apr-10 19:55 

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.