Results 1 to 7 of 7

Thread: [Resolvd] Mouse Pointer

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    [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

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    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

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    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

  4. #4
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    Hi again, mabye I should go buy a Java book. lol

    Anyway, say I have the following control.

    VB Code:
    1. <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:
    1. onclick="changeCursor(true);"

    But, it caused an error.

    Thanks again!
    David Wilhelm

  6. #6
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    Works for me:
    Code:
    <asp:DropDownList id="DropDownList1" onclick="changeCursor(true);" runat="server"></asp:DropDownList>
    What error are you getting?

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    Hmmm, I guess it does work. Threre is a red squigly line under onclick. I assumed that it woudln't run.
    David Wilhelm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width