|
When we click on the close button [X] in the title bar of browser a event is fired i.e onunload(). In this event we can call a function say xyz(). Now in the function I want to do something which will prevent the window to close.
How can i do this.
By SatyajitV.
|
|
|
|
|
IMO, you can set a message in the returnValue property of the event object, but you should use the onbeforeunload[^] event instead as the onunload is too late.
|
|
|
|
|
I would like to know how to stop user from going back to the previous page. The User if clicks the next button on the same page the same page appers with the different content but if he clicks on back button in IE he is navigated back to the page. I want the user gets the same page which he is viewing.
|
|
|
|
|
i dont know why tis application wont works...
it keep giving me the first records in the database and populate it twice, when i wanted both 2 different records to appear...
if possible help me debug this or give me some comments...
thanks in advance...
Dim aryTest(2) as integer
arytest(0) = 1
arytest(1) = 2
Dim objAdapter As New SqlDataAdapter
Dim objDs As New DataSet
Dim ojDataRow As DataRow
Dim objArrayList As New ArrayList
objCMDB = New cCMDB
Dim i As Integer
For i = 0 To 1
mobjcmd.CommandText = "SELECT Contract_Ref,Equipment_Status, " & _
"Technology_Refresh_Eligibility, Configuration_Item_Description, " & _
"Configuration_Type, Maintenance_Contract, Procurement_Vendor, " & _
"Warrenty_Ends, Warrenty_Period FROM tblCMDB WHERE" & _
"Configuration_Item_ID = "& aryTest(i) & ""
mobjcmd.SelectCommand = mobjcmd
objAdaptor.Fill(objDs, "tblcCMDBRecords")
objDataRow = objDs.Tables("tblcCMDBRecords").Rows(0)
objcCMDB.ContractReference = objDataRow.Item("Contract_Ref")
objcCMDB.EquipmentStatus = objDataRow.Item("Equipment_Status")
objcCMDB.TechnologyRefreshEligibility = objDataRow.Item
("Technology_Refresh_Eligibility")
objcCMDB.ConfigurationItemDescription = objDataRow.Item
("Configuration_Item_Description")
objcCMDB.ConfigurationType = objDataRow.Item("Configuration_Type")
objcCMDB.MaintenanceContract = objDataRow.Item("Maintenance_Contract")
objcCMDB.ProcurementVendor = objDataRow.Item("Procurement_Vendor")
objcCMDB.WarrentyEnds = objDataRow.Item("Warrenty_Ends")
objcCMDB.WarrentyPeriod = objDataRow.Item("Warrenty_Period")
objArrayList.Add(objcCMDB)
Next
MobjCn.Close()
Return objArrayList
i@@
|
|
|
|
|
i wonder how most of the website can make that.
Change color while move over to the link, and i having trouble to get rid of the underline which everytime when u add link to a text it will automatic change to blur color the underline below.
I want to make it when mouse move over then underline show and color change also.
here one of the website exmaple i want to do, but i also want to learn how to change the color also with my other link
http://www.sas.com/index.html
|
|
|
|
|
I think they use a web developer program(like marcomedia dreamweaver or microsoft frontpage) to achieve the effects and is easier to achieve with it...
i@@
|
|
|
|
|
i'm using dreamweaver, but i didnt see any tools for it. is it have to use javascipt or css things? anyone know some coding?
|
|
|
|
|
change the styles like:
a
{
text-decoration: none;
color: green;
}
a:visited
{
color: green;
}
a:link
{
color: green;
}
a:hover
{
text-decoration: underline;
color: red;
}
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
where should u put it in? actually my header and footer was design in seperate page, and my content page will link them together.
but i found out that wat ever i do in my other page , when run on my content page those linked page follow the content page setting.
actually is it possible i want to make like the footer style is different then the header and content page?
|
|
|
|
|
campbells wrote: where should u put it in? actually my header and footer was design in seperate page, and my content page will link them together.
Put it in a global.css (or whatever name you want to call it) then add a statement like this in the head section of each content page:
<link rel="stylesheet" type="text/css" href="global.css" media="screen, print" />
campbells wrote: but i found out that wat ever i do in my other page , when run on my content page those linked page follow the content page setting.
Yes, because each page is independent and knows nothing about the other pages.
campbells wrote: actually is it possible i want to make like the footer style is different then the header and content page?
You can make styles apply to different classes like:
In css:
.header a { color: blue; }
.header a:hover { color: red; }
.footer a { color: green; }
.footer a:hover { color: yellow; }
In html:
<div class="header">
<a href="link1">Link 1</a>
</div>
<div class="footer">
<a href="link1">Link 1</a>
</div>
That's a very simple example. I suggest you google CSS or visit this site: http://www.csszengarden.com/[^]
[edit]Edited for formatting [/edit]
[edit]Edited again for formatting (Is there an easy way to show html as plain text?)[/edit]
- S
50 cups of coffee and you know it's on!
-- modified at 2:17 Thursday 22nd June, 2006
|
|
|
|
|
hey guys, i am planning on driving into the world of html and web developement. i already have knowledge of HTML and can make basic sites and i know there a programs out there liek frontpage that can assist me also. My main purpose for this post is to find out a few things.
1. If i wana make a web-based database, do i need a hosting company to host it? or can i make the main computer in an office host it and people able ot access it when that computer is turned on?
2. If i get a hosting company and thier servers go bonkers, is it possible for them to lose all ym clients information??
3. and sites, links, or advice to help me design this?
Thank you all for any input
- Droz -
___ ___
/\/\ /\ | |
|
|
|
|
|
Droze wrote: If i wana make a web-based database
What do you mean by that - a database that you can access via the internet? If so, then most can be connected to via asp etc. You'd need to find a hoster with a SQL / Oracle / MySQL backend..
You COULD use a normal PC for the server, and no need to register a domain etc, but the problem with that would be that unless it has a static IP address, it will change regualrly, and people will need to be notified of the change
If the hosting co DOES go bonkers, they will more than likely have backups - check the SLA to make sure that restore times are acceptable for what you need to do.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Q(1)
I have created an array and store 3 functions in it. Eg.
this.validateCols = new Array();
this.validateCols[this.COST] = function(obj, index)
{
return 0;
};
this.validateCols[this.LOCKED] = function(obj, index)
{
return 0;
};
this.validateCols[this.COMPLETION] = function(obj, index)
{
return 0;
};
Calling validateCols[0](0, 0) works in IE, but in Firefox I get:
validateCols[0] is not a function
Is this the correct way to define functions in an array? Or is there a better way?
Or is this not supported at all in Firefox?
Q(2)
Also .swapNode() is not in Firefox? Any alternatives?
Q(3)
I implemented drag 'n' drop and it works in IE but not in Firefox.
Each droppable HTML TD element has:
ondragenter="this.parentNode.style.backgroundColor = 'gray'; window.event.returnValue = false;"
ondragover="window.event.returnValue = false;"
ondragleave="this.parentNode.style.backgroundColor = 'white'; window.event.returnValue = false;"
ondrop="OnDrop(this);"
Each draggable URL element has attributes:
id='draggable'
onmousemove='window.event.srcElement.dragDrop();'
ondragstart='window.event.dataTransfer.setData("text", "data");'
But this doesn't work in Firefox. Anyone got any ideas?
|
|
|
|
|
dhruba.bandopadhyay wrote: I have created an array and store 3 functions in it.
Storing functions in an array works just fine in Firefox. (I just tried it to be 100% certain.)
What are the values of this.COST, this.LOCKED and this.COMPLETION?
Also .swapNode() is not in Firefox? Any alternatives?
You have to do it using standard methods like cloneNode, addChild, removeChild, replaceChild, insertBefore.
I implemented drag 'n' drop and it works in IE but not in Firefox.
There is no window.event object in Firefox. Instead the event object is sent as a parameter to the event method. You can put the event object in the event variable using this:
if (!event) event = arguments[0];
To use the object from either model just refer to "event". In IE this will refer to the window.event object as the window object is a default object:
event.returnValue = false;
---
b { font-weight: normal; }
|
|
|
|
|
I have read that there's a onDragDrop event in the standards W3C. However it only gives as much information as who the sender was. What I would like is to set up some data hence the usefulness of IE's dataTransfer object.
Am not sure whether it's possible to set up a 'text' type data (eg. "1234|Some code|Some type") during the drag, and then drop it onto a table row... in Firefox. I've googled and still no luck finding an alternative to IE's dataTransfer object.
|
|
|
|
|
My recommendation is to use one of myriads open-source javascript libraries out there that standardise all of these for you.
My favourite pick is Sarissa[^] for XmlHttpRequest (and other extra bits), and Scriptaculous[^] for DHTML effects.
"Democracy is two wolves and a sheep voting on what to have for dinner" - Ross
Edbert
Sydney, Australia
|
|
|
|
|
I am quite disappointed in the drag 'n' drop support in Mozilla Firefox. What am trying to achieve is dragging an element from one IFRAME/FRAME into another IFRAME/FRAME. But upon dropping the element, I do not want the target IFRAME/FRAME to open/load it. I want it simply to handle the event, such as parsing the element/data dropped. Such uses as dropping an element into a table inbetween rows 2 & 3.
I have studied Netscapes way of ondragdrop events. However this only handles dropping external files, into the browser window, and the browser window will open/load the file. This is not what I want.
The only closest IE/FF drag'n'drop thing I found was http://script.aculo.us/ however their dragging doesn't go across IFRAME/FRAMEs.
Is there any way Firefox will implement similar drag'n'drop events as IE's:
ondragenter, ondragleave, ondragover, ondrop? that works across IFRAME/FRAMEs?
|
|
|
|
|
My Win2K installation has IIS 5.0 installed.
I installed the .Net Framework 2 but still my WebApps wont show server controls.
Can IIS 5.1 be installed on Win2000? If so, how?
you can't forget something you never knew...
-- modified at 10:58 Wednesday 21st June, 2006
|
|
|
|
|
evilnoodle wrote: Can IIS 5.1 be installed on Win2000?
AFAIK it's not possible.
What is the exact error that is displayed, anyway?
_____________________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA] - Developing ScrewTurn Wiki 0.2a...
|
|
|
|
|
ASP2 Server side controls aren't being generated.
you can't forget something you never knew...
|
|
|
|
|
Does this mean that I can't run ASP2.0 code on windows2000?
you can't forget something you never knew...
|
|
|
|
|
evilnoodle wrote: Does this mean that I can't run ASP2.0 code on windows2000?
I think ASP.NET 2.0 does run on Win2K.
I'm sorry but I'm used to Windows Server 2003, so I can't tell.
Anyway, as other guys suggested, you should re-run aspnet_regiis -i to be sure ASP.NET is correctly registered in IIS.
_____________________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA] - Developing ScrewTurn Wiki 0.2a...
|
|
|
|
|
t might be because the particular virtual directory is not resgistered with ASP.NET 2.0. Look at aspnet_regiis tool and ergister your directory with ASP.NET 2.0
My Blog
|
|
|
|
|
|
No flaming put posting programming questions in the lounge? I'm amazed!
Regards
Angel
*********************************************
The sooner you fall behind, the longer you have to catch up.
|
|
|
|