|
-
Nov 25th, 2003, 12:37 PM
#1
Thread Starter
Fanatic Member
[Resolvd] Mouse Pointer
Does anyone know how to change the mouse pointer, or cursor when runing some code in an ASP page?
Thanks
Last edited by indydavid32; Nov 26th, 2003 at 03:31 PM.
David Wilhelm
-
Nov 25th, 2003, 01:32 PM
#2
I'm assuming you mean client side processing?
Code:
<html>
<head>
<script language="javascript" type="text/javascript">
function changeCursor(isBusy) {
document.body.style.cursor = (isBusy == true) ? "hand" : "default";
}
</script>
</head>
<body>
<input type="button" onclick="changeCursor(true);" value="Show Busy">
<input type="button" onclick="changeCursor(false);" value="Back to normal">
</body>
</html>
If not client script, you'll have to cowboy it - open a popup window that will do the processing, cache the execution results, redirect the opener & display the results. Or just accept it that the user has to wait
-
Nov 25th, 2003, 02:15 PM
#3
Thread Starter
Fanatic Member
axion_sa, thanks for the reply.
If I wanted the curosr to be the hour glass, what would I replace "hand" with?
Also, can I change the fore and back colors of this type of button?
Thanks again
Last edited by indydavid32; Nov 25th, 2003 at 02:19 PM.
David Wilhelm
-
Nov 25th, 2003, 02:26 PM
#4
-
Nov 25th, 2003, 04:33 PM
#5
Thread Starter
Fanatic Member
Hi again, mabye I should go buy a Java book. lol
Anyway, say I have the following control.
VB Code:
<asp:dropdownlist id="cmbStores" style="Z-INDEX: 112; LEFT: 281px; POSITION: absolute; TOP: 182px" runat="server"></asp:dropdownlist>
Would it be possible for this to use the same java script for an onclick event. I put this line in the above code...
VB Code:
onclick="changeCursor(true);"
But, it caused an error.
Thanks again!
-
Nov 26th, 2003, 12:58 PM
#6
Works for me:
Code:
<asp:DropDownList id="DropDownList1" onclick="changeCursor(true);" runat="server"></asp:DropDownList>
What error are you getting?
-
Nov 26th, 2003, 03:22 PM
#7
Thread Starter
Fanatic Member
Hmmm, I guess it does work. Threre is a red squigly line under onclick. I assumed that it woudln't run.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|