Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing button's caption on click
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00752305
Message ID:
00752758
Views:
12
Nadya;

Slow down girl! One thing at a time. :)


From your first request.

1. Change Caption of command button using OnClick
A. See Javascript and VBScript versions below.

2. Tooltip
A. See the code within the INPUT tag title="There are five Mondays in every work week". That is how you create a Tooltip


3. Satusbartext
A. No idea how to do this in ASP/HTML.

From your second request.

1. How to change the order of a record set?
A. I use a Select Case statement with SQL statements with “Order By” which is fired by a combo box to allow the users to select which field of interest to select. If this is useful to you let me know and I can give you the code. With stateless forms is such fun! .NET makes this so much simpler.

2. Changing order by clicking on the header?
A. I have not tried this with the HTML table. What do you have in mind?



Here is the Javascript version:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<form name="frm1" >


<INPUT  type="button"id=cmdButton name=cmdButton value="Button" title="There are five Mondays in every work week" 
		style="position:absolute;
		left:100;
		top:10;
		width=50">

</form>




</BODY>
</HTML>

<script Language="javascript">



function window.onload()
{
//	(frm1.cmdButton.value = "Hello")
}

function frm1.cmdButton.onclick()
{	
	if (frm1.cmdButton.value == "Button")
		{	
		(frm1.cmdButton.value = "Hello")
	}
	else
		{
		(frm1.cmdButton.value = "Button")
		}	
}
</script>
>Thomas,
>
>Ok, seems to be easy. Of course, I need Java Script, since we can not use VBScript on client.
>
>Also how can I specify tooltip and statusbar (as here at UT, for example)?
>
>Another question:
>How do you change order in the recordset? And how can you do it by clicking on the header?
>
>Thanks in advance again.
>
>>>Hi everybody,
>>>
>>>Couple of questions from newbie:
>>>
>>>1) How can I change functionality and caption of the button, after it's clicked. E.g. Add to Cart after I click on it should change to Remove from Cart
>>>
>>>2) How do you set tooltips and statusbartext in ASP? (HTML)
>>>
>>>Thanks in advance.
>>
>>Nadya;
>>
>>Here is some of what you asked. We use VB Script as you can see. If you need Java Script let me know
>>
>>
>><HTML>
>><HEAD>
>><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
>><TITLE></TITLE>
>></HEAD>
>><BODY>
>><form name="frm1" >
>>
>>
>><INPUT  type="button"id=cmdButton name=cmdButton value="Button" title="There are five Mondays in every work week"
>>		style="position:absolute;
>>		left:100;
>>		top:10;
>>		width=50">
>>
>>
>></form>
>></BODY>
>></HTML>
>>
>><script Language=vbScript>
>>sub cmdButton_OnClick()
>>	if frm1.cmdButton.value = "Button" then
>>		frm1.cmdButton.value = "Hello"
>>	else
>>		frm1.cmdButton.value = "Button"
>>	end if
>>end sub	
>>
>></script>
>>
>>
>>
>>Tom
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform