Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 25th, 2006, 08:07 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default LinkButton should not show javascript in Statusbar

Hi,
The client for whom I am working, says that in whole the Project any linkbutton should not display javascript:__dopostback(..........

Such things should not be displayed in statusbar. He says that this seems like an error.

Can anyone please tell me how to do this?

From experts point of view, if this is not possible, please let me know. So that I can show that post to client.

Savan
__________________
Savan
 
Old August 25th, 2006, 08:36 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Easy enough.

On your aspx page add something like this:

<script language="javascript">

    var sMsg="No JavaScript Here!"

    function statusMsg(){
      window.status=sMsg
      return true
    }

    function statusClear(){
       window.status=''
       return true
    }
</script>

On your code behind:

lb.Attributes.Add("onMouseOver", "return statusMsg()")
lb.Attributes.Add("onMouseOut", "return statusClear()")

In this example when you roll over the link the status bar will change and say "No JavaScript here!" when you rollout it will clear back to nothing.

You DONT have to implement the onMouseOut but, if you dont, once you roll over a link the status bar will change to "No JavaScript here!" and will stay like that until you navigate away from the page or postback.

hth

"The one language all programmers understand is profanity."
 
Old August 27th, 2006, 06:25 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default

Hey...that proved really helpful.

Thank you very much for your support.

Appreciated..

Savan





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show a File Dialog using Javascript dhineshonline Javascript How-To 11 April 12th, 2012 03:23 AM
hide/show header with javascript crmpicco Javascript How-To 2 April 10th, 2006 03:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.