Subject: LinkButton should not show javascript in Statusbar
Posted By: savan_thakkar Post Date: 8/25/2006 8:07:26 AM
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
Reply By: dparsons Reply Date: 8/25/2006 8:36:39 AM
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."
Reply By: savan_thakkar Reply Date: 8/27/2006 6:25:52 AM
Hey...that proved really helpful.

Thank you very much for your support.

Appreciated..

Savan

Go to topic 28118

Return to index page 192
Return to index page 191
Return to index page 190
Return to index page 189
Return to index page 188
Return to index page 187
Return to index page 186
Return to index page 185
Return to index page 184
Return to index page 183