|
If you don't want the text to adjust itself to the width of the window, you have to put an absolute width on the element that contains the text.
---
b { font-weight: normal; }
|
|
|
|
|
thanks man, will keep formatting then
/////////////////
Thus spake the master programmer:
``A well-written program is its own heaven; a poorly-written program is its own hell.''
|
|
|
|
|
I have a repeater control to display thumbnail pictures. The itemtemplate is made of web image control. When user clicks on the thumbnail picture, I want it to display a larger image in a web image control and display the image description in a label( the image description is saved in database).
My current code is :
I have a getPhoto function which will get the thumbnail pictures through IhttpHandler and bound to the repeater control.
Then I have a repPhotoG_ItemDataBound function, here I add the javascript to the image html control and call a javascript to pass the thumbnail imagename as parameter and show the large image.
Now, I can get the thubnail picture and display the large images, but I just don’t know how to get and display the image description. Please help!!
private void repPhotoG_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
{
//finding repeater item Image
System.Web.UI.HtmlControls.HtmlImage img=(System.Web.UI.HtmlControls.HtmlImage)e.Item.FindControl("iPhoto");
//create a relative path for image and add onclick function
img.Src=img.Src.Replace('\\', '/');
string Description="";
string Image;
Image=IMGpath(img.Src);
img.Attributes["onclick"]="showImg('"+Image+"')";
}
function showImg(imgName)
{
imgOn = ("" + imgName);
document.imgLarge.filters[0].Apply();
document.imgLarge.src = imgOn;
hdr.innerHTML=imgName;
document.imgLarge.filters[0].Play();
-- modified at 17:29 Monday 5th June, 2006
|
|
|
|
|
Hello everyone,
Is there a way to get the size of the browser window with javascript?
Thanks,
Chad
|
|
|
|
|
Here are a couple of functions to get the client area:
function clientHeight() <br />
{<br />
var myHeight = 0;<br />
if( typeof( window.innerWidth ) == 'number' ) <br />
{<br />
myHeight = window.innerHeight;<br />
} <br />
else if( document.documentElement &&<br />
( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) <br />
{<br />
myHeight = document.documentElement.clientHeight;<br />
} <br />
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) <br />
{<br />
myHeight = document.body.clientHeight;<br />
}<br />
return myHeight;<br />
}<br />
function clientWidth() <br />
{<br />
var myWidth = 0;<br />
if( typeof( window.innerWidth ) == 'number' ) <br />
{<br />
myWidth = window.innerWidth;<br />
} <br />
else if( document.documentElement &&<br />
( document.documentElement.clientWidth || document.documentElement.clientWidth ) ) <br />
{<br />
myWidth = document.documentElement.clientWidth;<br />
} <br />
else if( document.body && ( document.body.clientWidth || document.body.clientWidth ) ) <br />
{<br />
myWidth = document.body.clientWidth;<br />
}<br />
return myWidth;<br />
}<br />
They seem to work in IE and FF. Can't remember where I got these from, somewhere on google is my bet...
|
|
|
|
|
Thanks, I will try these.
Chad
|
|
|
|
|
Try this:
windowWidth = window.screen.width;
|
|
|
|
|
hey this is a huge problem.There is a compilation error in the line DriverManager.getConnection();when i compile the problem saying incompatible types class not found.how should i make the connection between java and sql at my home??????????
-- modified at 4:07 Monday 5th June, 2006
|
|
|
|
|
I'v got something challenging... is there anyway i can prevent a conrol from being enabled on PageLoad even if there is a javascript ctrl.enable(); or ctrl.disabled = false; called for it? I have a feeling there isnt such a thing but i thought i'd try my luck with you guys...
Im implementing security on a page with a module that executes at runtime and disables certain controls on the page. However i dont want any of the other javascripts on the page to be able to re-enable these controls when they are called.
ZiggY.
|
|
|
|
|
What is the best way to make a form like this one that is used by codeproject.com? I was thinking about using a combination of php and sql, but if anyone knows a better/easier way, any help would be appreciated.
PS: The form I am wanting to make is completely un-related to codeproject.com and has noting to do with program/web developement.
|
|
|
|
|
php/mysql will cost you less than ASP.NET/MS SQL server becasue thre are many hosting companies that offer free mysql databases.
you also can use a pre-made software like: phpbb[^]
|
|
|
|
|
This one is driving me nuts - any help would be much appreciated. I have a WebBrowser control in my app which I need to recover all fo the elements from to decide where certain input feilds are. This currently works fine in a web site without frames - but not in one which has frames! I have an exact same version fo the program which uses AxShDocvw web browser control in and when the navigatecomplete2 event fires I get the document handle for the document which just loaded (i.e. the frame content) amd the code works fine here. Now here is my problem - for reasons I won't go into here I MUST use the WebBrowser version fo the code - so how do I get the frame elements as documents for all fo the loaded frames when the document has completely loaded?
Any help appreciated
Thanks
Clive
|
|
|
|
|
Hi,
anybody can help me?
I want know which form controls do postback.
how can i do this pLZ? ( (
|
|
|
|
|
Hi again guys,
I have a question about applying CSS to links specifically, but I'm sure it'll help me in other area's later as well:
I understand that I should have something like
a:hover {<br />
text-decoration: none;<br />
color: #5f5bb2;<br />
}
to control the way my links display on my site. However, this seems to apply to the entire site. For example, yes, I do want all my links on the site to appear the same - except that beneath my site banner I have a navigation bar. I first made an image map for this, but then decided I'd rather use a div (which I've now got looking exactly the same as my image map did) as it'll be easier to make changes in appearance later on. However, I want my links in the navbar to appear exactly the opposite to the links on the rest of my site (ie display in white on the shade of blue I've chosen, instead of appearing the shade of blue I've chosen on a white background).
Can I have two rules for links, one which I apply in my navbar area and another for the rest of the site?
Thanks again.
A mum and loving it!
|
|
|
|
|
Hi,
Yes, you can do this:
You need to define a class for your navbar, and add your styles to this class.
So, in your CSS, add:
.navbar
{
background: #5f5bb2;
}
.navbar a
{
color:White;
}
.navbar a:hover
{
color: Yellow;
}
And then just set the class of you navbar div in your HTML:
<div class="navbar"> Put your links here </div>
----------------------------
Be excellent to each other
EasiReports[^] My free reporting component for WinForms.
|
|
|
|
|
Thanks Nicholas! And nice to meet you
A mum and loving it!
|
|
|
|
|
Any one have decent code to do smooth scrolling of the scrollbar (vertically) that can also slow down when it reaches its near its destination? Im scrolling to a DIV object that is absolute positioned.
Thanks.
-- modified at 13:06 Saturday 3rd June, 2006
|
|
|
|
|
Hello!
I would like to know if it is currently possible to send a text message to msn messenger over a web site?
Is there such interface?
Thanks!
|
|
|
|
|
Yes, but it's not part of the framework. Look on SourceForge for MSN Messenger projects. There are open source components that allow sending.
|
|
|
|
|
How can i make an FTP Connection from an ASP page to a FTP Server???
To make the connection uid/pwd will be accepted from user, if the user account is existing connect user to FTP server else error msg should be returned??? After making connection all task like Listing of Directory , renaming files, deletion, etc-2 should be possible. I dont want to buy any tool or utility or any trial versions of FTP tools. Reply soon.
Rooby
|
|
|
|
|
I want to scroll the browser to last position.
Then before I scroll I have to save the position of the window of browser.
How to get the position?
Thank you.
|
|
|
|
|
Hello
I have a webproject I recently set up on a new comp. I made a virtual directory for the client project and started the solution. Now it takes 5-6 minutes for the studio just to open all the projects. Does anyone have an idea of why this might be?
/regards
|
|
|
|
|
This could be from a number of things:
Are any of the files on a share? If so, how long does it take to access the share in Explorer? There could be a whole pile of network problems that would slow this down.
How's your web server look? Can you access a static page on it in less than 30 seconds? There's also a whole pile of network issues that you could have there.
Are you getting any error messages? If something's throwing exceptions or timing out, that'll make things take a long time.
Do you have any VS plug-ins? If you're using VS SCM (source control), or something like ReSharper, that can often change how long it takes to load a project.
|
|
|
|
|
Hi guys, I'm finally getting my CSS and DIV's sorted - thanks!
I have one final DIV to sort out. As you helped me to do below my body contains a 800px wide centered DIV which is working great:
.Content {<br />
width:800px;<br />
margin:0px auto;<br />
text-align:left;<br />
font-family: verdana, arial, helvetica, sans-serif;<br />
font-size: 0.9em;<br />
color: #5f5bb2;<br />
padding:5px;<br />
border-style: solid;<br />
border-width: 2px;<br />
border-color: #5f5bb2;<br />
}
Within it there are 3 DIV's down the left hand side to form menu's, etc which are 200px wide. Also working great. However, I now want to fill the other 600px on the right with a DIV (obviously) and am having a small positioning problem. I am able to position it horizontally, but not vertically - it's currently sitting to the right, but below the bottom left hand DIV (screenshot here[^])
I can't use absolute positioning (due to the DIV setup discussed below which I'm loving) for the top, and as float is not used for vertical positioning I would be grateful for the opportunity to pick your brains again on how this is done.
I'm using the following so far:
.ContentRight{<br />
width: 570px;<br />
float: right;<br />
position: relative;<br />
background-color: #bbbbbb;<br />
text-align:left;<br />
font-family: verdana, arial, helvetica, sans-serif;<br />
font-size: 0.9em;<br />
color: #5f5bb2;<br />
padding:5px;<br />
}
Thanks!
A mum and loving it!
-- modified at 23:27 Thursday 1st June, 2006
|
|
|
|
|
You are just making them too big. Remember that the padding and the border are added to the size.
---
b { font-weight: normal; }
|
|
|
|