Click here to Skip to main content
15,886,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one problem,i am working on live auction project..there is one button name "bid now" and if user is not login than,when "he put cursor over button" than he see login and if he is already login than he can place the bid...how can i put this effect...!!!

thnx in advance..!!
Posted

try this man i am sure it will works good:
this is the javascript functions :
XML
<script type="text/javascript">
        var previoustxt;
        function changetxt(el) {
            var s = el.style;
            previoustxt = el.value;
            el.value = 'Blue';
        }
        function restoretxt(el) {
            el.value = previoustxt;
        }
    </script>

and this is the button :
C#
<asp:button id="btnSearch" runat="server" backcolor="#800000" font-bold="True" font-names="Arial" xmlns:asp="#unknown">
       onmouseover="changetxt(this);" onmouseout="restoretxt(this);" ForeColor="White" Height="28px" Text="Search Jobz"
        Width="117px" /></asp:button>


best regards
rate if it helps you
 
Share this answer
 
Why do you want to do that? Even if you managed to change the button name, what happens if the user clicked the button? How about this? When the user clicks Bid Now, fire up your authentication module. If the user is not logged in, redirect to the login page. Otherwise, proceed with the bidding.
 
Share this answer
 
Comments
youssef_123 8-Mar-12 2:26am    
you are right man but may be he has a special issue...and also he can use if as a button to redirect to login ex: if the user logged in he can bid and if the user not logged in the text changed and on click will redirect to login page ???? it is very nice idea...
master ravi 27-Mar-12 23:55pm    
ya..i do that...i'm using bid button image ...but i want to give effect to this button...as ur suggestion, everything is ok.authentication module working properly..but this code is for html button,not working for .net button...so help me...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900