|
I like climbing
H / Anders Pettersson
.....and justice for all
APe
|
|
|
|
|
Ah, I get it. You've become the "victim" of a user name generation scheme at a university. So you're a computer engineer then?
--
Watcha' gonna do, when Hulkamania runs wild on you!?
|
|
|
|
|
Jörgen Sigvardsson wrote:
user name generation scheme at a university
Förstår din poäng men inte exakt vad du menar
Man försöker ju hitta enkla lösningar på tråkiga problem som uppstår... Vill inte påstå att jag kommit så långt på detta projekt man allt har sin tid och man får prioritera ”acceptabla lösningar” även om man ej själv är nöjd.
H / en dataingenjör som ser ljuset efter IT-kraschen
.....and justice for all
APe
|
|
|
|
|
I am developing a webpage in ASP.NET and all I want to do is have a image align at the very right of a table.... Thats all. But even when I say align right there is always a couple of pixels past the image and I don't want that. Here is my code...
<br />
<TABLE id="Table2" cellSpacing="0" cellPadding="0" width="300" border="0" style="WIDTH: 300px; HEIGHT: 8px"><br />
<TR><br />
<TD bgcolor="#0066cc"><img src="graphics/tabreak.gif" align="right"></TD><br />
<TD bgcolor="#0066cc"><img src="graphics/tabreak.gif" align="right"></TD><br />
<TD bgcolor="#0066cc"><img src="graphics/tabcorner.gif" align="right"></TD><br />
</TR><br />
</TABLE><br />
<br />
Anyone know what I should do different? Thanks!
|
|
|
|
|
Take a look for a margin property, watch out for things added in the style sheets that you might not know about...
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Where would this property be? I'm not using a style sheet...
|
|
|
|
|
Instead of setting the image to float to the right of the table cell, try setting the align attribute on the <td> itself:
<br />
<td bgcolor="#0066cc" align="right"><img src="graphics/tabreak.gif"></td><br />
<td bgcolor="#0066cc" align="right"><img src="graphics/tabreak.gif"></td><br />
<td bgcolor="#0066cc" align="right"><img src="graphics/tabcorner.gif"></td>
I think what's happening is you're running into the default padding around floating inline objects, which gets added when align is used on the image itself.
- Mike
|
|
|
|
|
Thanks! Had tried the align on the table but didn't take it out of the image tag. While it's on subject guess I might as well ask too is it possible to have a table inside a cell line up with the bottom of that cell? Tried the valign=bottom tag on the cell the table is in but that didn't seem to do anything.
|
|
|
|
|
I have a table in html file and table has few columns and rows. There is a text in each cell. When user double clicks it, it selects the text. I want to disable that function. I created my own DblClick function, but I was unable to stop double click and it select the text.
My function is something likes this.
function OnDblClick()
{
return;
}
And sometimes I want to fire ondblclick event to select the text.
var CurrentCell = document.getElementById(id);
CurrentCell.fireEvent("ondblclick");
It also does not work. Any clues? Thanks in advance.
Agha Khan
|
|
|
|
|
Just curious, but why do you want to disable selecting on double-click?
- Mike
|
|
|
|
|
Well I have written a calendar in JavaScript, which has 2 combo boxes (for month and year) along with the table displaying the month. As you understand there is a function Onreadystatechange in script which allows you making changes at the start of web page.
where I change the color of today’s date. Double click makes the date ugly. There is another solution that I could change color by firing with fireEvent function. That is also not working. I do not know why?
function OnLoadDate() {
var now = new Date();
var today = now.getDate();
var month = now.getMonth();
var year = now.getFullYear();
var StartOfMonth= StartDayOfMonth(year,month);
var ObjectID = StartOfMonth + today - 1;
var Row = Math.floor(ObjectID / 7);
var Col = ObjectID % 7; Laplink.CalYear.options[year - 1995].selected = true;
Laplink.Months.options[month].selected = true;
WriteMonth(year,month,today); Laplink.all.CalendarID.rows[Row].cells[Col].fireEvent("ondblclick");
}
Agha
|
|
|
|
|
ummmmm is this javascript in the html page ur talking about?
if so try returning false
"there is no spoon" biz stuff about me
|
|
|
|
|
It is true that I am talking about javascript in the html page.
Perhaps you have noticed the system process the default implementation first and then returns control to your custom functions. Take this example
function OnDblClick()
{
alert("Hello");
return false;
}
Before displaying the Hello it already selected the text. So returning false or true has no effect. There must be another way. Still I do not know.
Thank you very much for your reply.
|
|
|
|
|
I am trying to get a reference to some textboxes in a document. The problem is that they are hosted in an .ascx file. I tried getElementById("TextboxName") but it errors with no object.
Any idea how I find an object in an .ascx file?
|
|
|
|
|
Remember that the output of aspx or ascx is just html on the client. getElementById is client side so it really has nothing to do with the ascx page, just the html ouput.
First thing is to view the source of the generated page and make sure the id you are looking for exists. It is probably not named what you think it should be.
|
|
|
|
|
Thanks Mark, can you remeber how to get the ID of the control so I can change the script in prerender?
|
|
|
|
|
This is the code so far Any ideas? I'm not getting an error which means either it's right but not working or the onTextChanged event is not firing?
'write script<br />
Dim script As String = "<script language=""javascript"">function add(id){a=document.getElementByID(id);ttl=document.getElementByID('[ClientID]_ttl');ttl.value = a.value;}</script>"<br />
'get control reference<br />
script = script.Replace("[ClientID]", Me.ClientID.ToString)<br />
Me.Page.RegisterClientScriptBlock("Add", script)<br />
txtStrength.Attributes.Add("OnTextChanged", "javascript:add('" & txtStrength.ClientID & "')")
|
|
|
|
|
Can anyone tell me how to call a stored procedure that returns a recordset through an ASP page?
Thanking you in advance.
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
I made this little function for that:
function execStoredProc(p_strName, p_arrParams)<br />
dim objCommand<br />
dim strConnect<br />
<br />
strConnect = getConnect("writer")<br />
set objCommand = Server.CreateObject("ADODB.Command")<br />
<br />
objCommand.ActiveConnection = strConnect<br />
objCommand.CommandText = p_strName <br />
set execStoredProc = objCommand.Execute(,p_arrParams,adCmdStoredProc)<br />
end function
getConnect retrieves the Connectstring from an XML-File. Simply replace with your connect-string.
Include ADO typelib in order to use constant "adCmdStoredProc":
<!--METADATA NAME="Microsoft ActiveX Data Objects 2.5 Library" <br />
TYPE="TypeLib" <br />
UUID="{00000205-0000-0010-8000-00AA006D2EA4}"<br />
-->
|
|
|
|
|
thanks...
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
Here is another example
<br />
Dim objAttachedSetupSheets<br />
Dim AttachedSetupSheetsRS<br />
Dim varRecordsEffected ' Number of Records effected by the procedure<br />
<br />
Set objAttachedSetupSheets = Server.CreateObject("ADODB.Command")<br />
objAttachedSetupSheets.ActiveConnection = objRoutingConn<br />
objAttachedSetupSheets.CommandText = "ENTER STORED PROCEDURE NAME HERE"<br />
objAttachedSetupSheets.CommandType = adCmdStoredProc<br />
<br />
SET AttachedSetupSheetsRS = objAttachedSetupSheets.Execute varRecordsEffected<br />
IF (NOT(AttachedSetupSheetsRS.EOF)) THEN<br />
Response.Write("The ID is " & AttachedSetupSheetsRS("SetupSheetID"))<br />
END IF<br />
<br />
hope this helps
|
|
|
|
|
Thanks...
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
hi
i want to get the html source code of google search page. i tried using xmlhttp....it works for all other site but does not for google..pl help me out
the code is as follows
<%@ language=VBScript%>
<title>HTML Source Code
Get Source of URL:
<%
dim objXMLHTTP
URL = Request.form("txtURL")
if ( URL = "" ) then
URL = "http://www.google.com"
end if
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", URL, false
objXMLHTTP.Send
Response.Write " "
Response.Write "HTML Code for "&URL&""
Response.Write ""
Response.Write objXMLHTTP.responseText
Response.Write ""
Set objXMLHTTP = Nothing
%>
kirtij
|
|
|
|
|
Hi:
Under Windows 2k, when using INPUT TYPE=”file” ..., is this possible to select more than one file at a time to upload their contents to the server? i.e. selecting files using using SHIFT-UP arrow or CTRL-click If yes, how could I do this?
Actually I can only select one file at a time.
Thanks for you attention and help.
|
|
|
|
|
ummmmm
just put multiple <input type='file'...> on the page
"there is no spoon" biz stuff about me
|
|
|
|