|
|
<br />
<div style="width: 380px;"><br />
<div style="float: right;"><br />
<div style="height: 40px; vertical-align: middle;"><br />
<asp:Button ID="btnTop" runat="server" Text="Top" CssClass="Button" Width="75px" /><br />
</div><br />
<div style="height: 40px; vertical-align: middle;"><br />
<asp:Button ID="btnUp" runat="server" Text="Up" CssClass="Button" Width="75px" /><br />
</div><br />
<div style="height: 40px; vertical-align: middle;"><br />
<asp:Button ID="btnDown" runat="server" Text="Down" CssClass="Button" Width="75px" /><br />
</div><br />
<div style="height: 40px; vertical-align: middle;"><br />
<asp:Button ID="btnBottom" runat="server" Text="Bottom" CssClass="Button" Width="75px" /><br />
</div><br />
</div><br />
<asp:ListBox ID="lbItems" runat="server" Rows="10" Width="300px" Height="166px"></asp:ListBox><br />
</div><br />
I have the above code in an aspx page, but the div with float right appears above the listbox rather than to its right. If I remove the heights from the divs with buttons in them then the buttons appear to the right of hte list box, but they are all bunched together. I could easily acheive what I want here with a table, but I'm trying to make an all CSS page.
Basically I want CSS for this table:
<br />
<table><br />
<tr><br />
<td rowspan="4"></td><br />
<td></td><br />
</tr><br />
<tr><br />
<td></td><br />
</tr><br />
<tr><br />
<td></td><br />
</tr><br />
<tr><br />
<td></td><br />
</tr><br />
</table><br />
-- modified at 11:01 Tuesday 11th July, 2006
|
|
|
|
|
You shouldn't need to have a div around every button. That is extra markup and as you can see is actually using more markup than the table. Try something that will end up looking like this:
<html>
<head>
<title>CSS Float Test</title>
<style type="text/css">
.btnlist {float:right;width:25%;background-color:#0FF;}
.btnlist li {height:40px; list-style:none;}
</style>
</head>
<body>
<div style="width: 380px;background-color:#CCC;">
<ul class="btnlist">
<li><input type="button" value="MyButton" /></li>
<li><input type="button" value="MyButton" /></li>
<li><input type="button" value="MyButton" /></li>
<li><input type="button" value="MyButton" /></li>
</ul>
<ul style="background-color:#0CF;">
<li>list box item here </li>
<li>list box item here </li>
<li>list box item here </li>
<li>list box item here </li>
<li>list box item here </li>
</ul>
</div>
</body>
</html>
-Dirk
|
|
|
|
|
The select element (that the ListBox renders) is an inline tag, and the div element is a block tag. Put the ListBox in a div tag.
The vertical-align style only works on table cells.
---
b { font-weight: normal; }
|
|
|
|
|
i wonder is it more safe to have own server for the company site or is it the same as we rent the server from other company???
i thinking to have a strong security on my site to avoid ppl hack in.. i only know the password is the more basic security or some.. firewall hardware like router. any other suggestion? on the software and hardware...?? the hardware i might use the IBM brand...
is it ok if u use access for my databse?? but i sound like.. not secure.. compare to MYSQL or oracle...wat u guys think?
|
|
|
|
|
It sounds like a hosted solution might be better for you as they would handle all of the security and maintenance of the boxes for you. They will also handle the bandwidth and support the firewall or other barriers. The caveat will always be your code though. If your code is not secure and your connection strings to your database are compromised then you will have a problem.
MySQL is pretty easy to use and is inexpensive compared to Oracle or DB2. It really depends on the language(s) or OS that you are using for what database would be easier to use. IE: PHP likes MySQL, .NET languages like Microsoft SQL Server, etc.
Dirk Watkins
|
|
|
|
|
i agree with u i dont really confidence on doing those network security coding for the site. The site i just create was in html and asp. Do u have any suggestion on company that provice service on hosted solution?
|
|
|
|
|
|
do u think is will be better if i use microsoft server product such as small business server 2003 or just use the normaly windows professional?? MY company only have around 10 ppl. My boss wanted to have our own server.
i think my company have the SQL databse software.
|
|
|
|
|
I could not see some forum content.
Why?
|
|
|
|
|
I have came across 3 different ways of creating a structure or class.
1. Class as a function way
// Class Constructor
function Timer(Source) {
// Class Properties
this.timerID = 0;
this.tStart = null;
// Class Methods
this.UpdateTimer = function() {
};
}
// Example
var timer = new Timer(0);
timer.UpdateTimer();
2. Class.create & prototype way
var WindowDelegate = Class.create();
WindowDelegate.prototype = {
// Class Constructor
initialize: function() {
},
canClose: function(win) {
}
}
3. Declare as a var way
var myObserver = {
variable: null,
anotherVariable: 33
stringVariable: 'asdf',
aFunction: function(a, b) {
}
}
I assume #3 is just a object/structure instance rather than a class definition.
Has anyone came across #1 way? What are the differences between these 3 ways?
And what is the proper way to define a class?
|
|
|
|
|
Ummm...#1 and #3 is actually the same (with #3 you create the object directly while #1 specifies the class you can create objects from), and there's a variant of #2 that I use for no other reason than it's neat(er):
ClaimControl = function(controlID)
{
BaseClaim.call(this, controlID, 'Claim');
}
ClaimControl.prototype = new BaseClaim();
ClaimControl.prototype.constructor = ClaimControl;
ClaimControl.superclass = BaseClaim.prototype;
ClaimControl.prototype.Load = function (idClaim)
{
return ClaimControl.superclass.Load.call(this, idClaim, 'LoadClaim');
}
ClaimControl.prototype.Save = function()
{
return ClaimControl.superclass.Load.call(this, 'SaveClaim');
}
Either #1 or #2 or mine above is a proper way to define a class. To define an object you can either use #2 or Javascript Object Notation (JSON)[^]
"You are special, but so is everybody else."
"Democracy is two wolves and a sheep voting on what to have for dinner" - Ross
Edbert
Sydney, Australia
|
|
|
|
|
Does anybody know how to read a file using javascript
I have tried but it seems not to work
fh = fopen("filepath", 0);
if(fh!=-1)
{<br />
length = flength(fh);
str = fread(fh, length);
fclose(fh);
<br />
write(str); <br />
}<br />
-- modified at 10:48 Monday 10th July, 2006
|
|
|
|
|
If you are running this through a web page you probably won't have permissions to open a client's file system.
|
|
|
|
|
I have an input element of type file, so i can get the file path on the client side, but i dont know how to read the file on the client's side.
Im using Jboss as my container, and im using JSPs.
Any help.
|
|
|
|
|
That doesn't work.
If you run the Javascript in the browser, you can't access any file system.
If you run the Javascript in the server, you can't access the file system of the client, only the server.
---
b { font-weight: normal; }
|
|
|
|
|
Yeah, you'll have to upload to the server and do something with the file there. You can't use JavaScript to read files on a client machine. I think that Flash might be able to do that.. anyone seen this lately?
Dirk Watkins
|
|
|
|
|
Javascript and VBScript are ONLY able to access files on your hard drive using Active X controls.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
As far as I am aware, javascript is forbidden access to your file system except by using an Active X control. In which case, taken from an older version of JScript :
OpenTextFile Method
=============================
var fs, a, ForAppending;
ForAppending = 8;
fs = new ActiveXObject("Scripting.FileSystemObject");
a = fs.OpenTextFile("c:\\testfile.txt", ForAppending, false);
...
a.Close()
FileExists method
=========================
function ReportFileStatus(filespec)
{
var fso, s = filespec;
fso = new ActiveXObject("Scripting.FileSystemObject");
if (fso.FileExists(filespec))
s += " exists.";
else
s += " doesn't exist.";
return(s);
}
Write method:
=============================
function WriteDemo()
{
var fso, f, r
var ForReading = 1, ForWriting = 2;
fso = new ActiveXObject("Scripting.FileSystemObject")
f = fso.OpenTextFile("c:\\testfile.txt", ForWriting, true)
f.Write("Hello world!");
f.Close();
f = fso.OpenTextFile("c:\\testfile.txt", ForReading);
r = f.ReadLine();
return(r);
}
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Hi,
Is there a way for people to share a file like a ms-Word doc
and assign one party permission to view it while another party could edit it
while other is viewing ?
|
|
|
|
|
We are building a Client/Server application based on ASP.NET.
The server application is an IIS 6.0 hosted XML web service application exposing various web service methods.
The client is a Windows Forms client which are consuming the XML web services.
It's very important the application is available 24 hours a day and therefore we rely on the Worker Process Isolation/recycling feature in IIS 6.0 for maximum availibility.
Unforetunely recycling does not work very well for us - the client hangs if recycling happens during a web service request. After some amount of time we get the WebException "The operation has timed out". On the IIS6.0 machine we see the old worker process has been killed. If a new request is made to the service, a new worker process starts up and the application continues working. So the server side is apparently completely unaware of the hanging client.
To find the root cause I developed the most simple test application which consists of a ASP.Net web service exposing a single web method and a Console application which consumes this Web service in an infinite loop:
Server:
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
[WebMethod]
public void test()
{
int v = 10;
}
}
Client:
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
WebReference.Service s = new ConsoleApplication1.WebReference.Service();
int j = 0;
while (true)
{
s.test();
Console.WriteLine(j.ToString());
j++;
}
}
}
}
If I manually recycle the Application pool running the web service above, the Console application starts hanging until the time out exception occurs. Anybody got an idea why this happens? I thought recycling was supposed to be transparent for the client.
The IIS 6.0 is configured with default settings.
In the HTTPErr log file I get a Timer_AppPool error. I guess this indicates that a request from the console application somehow gets stuck?
Thanks & Regards
Steen Bundgaard
|
|
|
|
|
Hello, does anybody know how to open an "open file dialog box" in javascript?
|
|
|
|
|
You use a tag like this: ...
|
|
|
|
|
hi,
plz try this code for that its helpfull for u
<title>Change the URL
Pick your favorite investment site:
Fool.com (The Motley Fool)
MoneyCentral Investor
TheStreet.com
|
|
|
|
|
Hello
I'm making a project in ASP.Net 1.1.
Basically its Site Creator Project on which i' working.
My CLient hav uploaded the 20 subdoamin for me.
but i don't how to use these subdoamin either i have to upload my whole project on these 20 subdoamins. or is there any way which i can set the path to my mail domain directly.
i hope i'm able to let u understand my problem.if any thing unclear plz let me know.
thanx
|
|
|
|