|
|
This doesn't seem like it should be that hard, so if someone could just give me a kick in the right direction, that'd be awesome.
I have googled for two div bellow code :
$(function() {
var right = $("#center");
$("#toggle").click(function() {
$("#left").animate({ "width": "toggle" }, {
duration: 250,
step: function() {
right.css("margin-left", $(this).width());
}
}, function() { right.css("margin-left", $("#left").width()); });
});
});
#left
{
width: 270px;
float: left;
border: solid 1px red;
}
#center
{
margin-left: 270px;
border: solid 1px green;
}
<pre lang="xml"><div id="left">
Test</div>
<div id="center">
Test Right</div></pre>
now guess that i have three div, i wanna to have same as above.
-------------------------------
|left div|center div|right div |
-------------------------------
the right and left div are always 170 px (for ex.)
and i wanna do that when my left div is empty my center div become bigger (same as below code)
and all three div should be side by side .and when my left div is empty the center div become bigger and right div be side of center div.
Thanks in advanced !
|
|
|
|
|
#left { float: left; }
#main { float: left; }
#right { float:right; }
<div id="left">
</div>
<div id="main">
<div id="right">
</div>
</div>
Try that. I think it will do what you described.
|
|
|
|
|
thanks in advanced but its not working!
In other word :
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication1.WebForm2" %>
<!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>
<style type="text/css">
#left
{
width: 270px;
float: left;
border: solid 1px red;
}
#center
{
margin-left: 10px;
width: 740px;
border: solid 1px green;
float: left;
margin-right: 10px;
}
#right
{
width: 255px;
float: right;
border: solid 1px red;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<br />
<div id="left">
Test Left</div>
<div id="center">
Test center</div>
<div id="right">
Test Right</div>
<br />
<br />
</form>
</body>
</html>
this is image when i have three divs :
http://i49.tinypic.com/35l85jc.jpg
and when the left div is empty i wanna have like :
http://i49.tinypic.com/24zfwug.jpg
modified 16-Apr-13 0:06am.
|
|
|
|
|
I believe you will need conditional execution to achieve it.
msdn.microsoft.com/en-us/magazine/ee335716.aspx
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
thnaks in advanced but i wanna do without Ajax or ...
Just with CSS only!
Thanks in advanced !
|
|
|
|
|
it is best to place in table,
<table><tr><td><div1></td><td><div2></td><td><div3></td><tr></table>
Then give height, width etc....
|
|
|
|
|
thanks for solution but i wanna to have something like this and increase center div width automatically
Quote: this is image when i have three divs :
http://i49.tinypic.com/35l85jc.jpg
and when the left div is empty i wanna have like :
http://i49.tinypic.com/24zfwug.jpg
|
|
|
|
|
Hi,
Hotmail now made it easy for users to unsubscribe by just one click.
How can I implement this in my ASP.NET & C# page?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hmm: have you bothered to try something for yourself before asking for help?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Unsubscribe from a newsletter or what?
|
|
|
|
|
Going by the little you've given us on details regarding your requirement, I'll try to give a hint on how I'd go about doing something like this.
Scenario:
You have a user signed in to your application and want to provide a link for said user to unsubscribe to something he formerly subscribed to.
Solution:
Have a link on your pages that will make a call to a WebMethod via AJAX and unsubscribe the user. The feedback you get from said AJAX call, received via a JAvaScript callback function, can be used to change the user's status to unsubscribed (just to give the user some optical feedback that he is now unsubscribed). To make this information persistent, you'll have to store the user's status in a database or some configuration file.
Regards,
— Manfred
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
I have 7 textboxs and grid view controls we are given the value at one textbox is date and i have sqlserver2005 and my table is
stv this table contain the datetime variable i.e. rdate we are given the date is in text box and stored the particular date data
in grid view but given the error message 'convertion is failed string to date time'
modified 12-Apr-13 7:49am.
|
|
|
|
|
Have a look at the content of the string; is it a valid date and time?
Use the best guess
|
|
|
|
|
yes it's valid date ie.mm/dd/yyyy
|
|
|
|
|
agrigold wrote: mm/dd/yyyy That is not a valid date, something like 21/03/2013 would be a valid date. However, unless you provide some useful information about the problem it is impossible to guess what may be happening.
Use the best guess
|
|
|
|
|
You need to make sure, your input is in correct culture. if your database accepts MM-dd-yyyy and you are entering dd-MM-yyyy or some other format then you may got such error message. just make sure both database and application accepts same datetime style.
best luck
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
There is no error but the slide show is not animating only the images are coming they are not changing...
This is my code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="pic.aspx.cs" Inherits="pic" %>
<!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">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/coin-slider.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/coin-slider-styles.css" type="text/css" />
<script type="text/javascript">
$(document).ready(function () {
$('#coin-slider').coinslider();
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<div id='coin-slider' align="center">
<a target="_blank">
<img src='l5.jpg' height="150px" width="150px">
<span>
</span>
</a>
<a>
<img src='bed1.jpg' height="150px" width="150px">
<span>
bed
</span>
</a>
<a>
<img src='d1.jpg' height="150px" width="150px">
<span>
</span>
</a>
</div>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
dont know how to call the coin-slider div if necessary to asp.net cs .
|
|
|
|
|
|
Thanks for not promoting my script or tip or trick
Just kidding, side punch, you probably didn't know about it!
|
|
|
|
|
|
It would be easier for us to read if you can use
pre tag.
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
I am learning MVC. I want to refresh the same partial view while clicking on a button. the button is on the same partial view
How will I do this? Any help would be appreciated.
|
|
|
|
|
You can use the onclick event of the Button as an serverside event and create a sub with the "handles buttonx.click" or you can insert an Java Funtion in the onclick statemant of the Element to fire an Postback...
Martin
|
|
|
|
|
I have an AJAX asp:Timer that when added to my LogView.aspx page causes a javascript error in the browser:
Expected ';'
Default.aspx Line: 963
Code
First, the page that is being displayed in LogView.aspx and not Default.aspx. Also there is no javascript on my LogView.aspx page:
<form id="form1" runat="server">
<asp:ScriptManager ...>
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="Timer1_Tick" />
<asp:TextBox ID="TextBox1" runat="server" Text="" />
</ContentTemplate>
</asp:UpdatePanel>
The code behind is:
protected void Timer1_Tick(object sender, EventArg e)
{
TextBox1.Text = "Hello";
}
Also, when run the Timer event is never called. I did a view source and the error line shows where the onLoad () System.Application.add.init(function () {$create(Sys.UI._Timer, ...
This is confusing. Any Ideas?
Thanks,
Steve Holdorf
|
|
|
|