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:
00752885
Views:
17
>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
>
Thanks, didn't notice it before.

>
>3. Satusbartext
>A. No idea how to do this in ASP/HTML.
>
Ouch :( It's done somehow on this site... How is it done?

>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.
>

So, each change of order requires a connection and running the same SQL, as original one, but with different order. I hoped for another answer. If you can send me the samples by e-mail, would be nice.

I sent you an e-mail earlier this morning and want to ask more questions in this time about cookies. Could you please send me an e-mail? Hopefully, I don't take too much of your time, if yes, just forget it...

NET makes lots of stuff much simpler. But Joe said, we're not yet going to switch. So, it looks like I have to learn stright ASP for now... :( BTW, what is the current ASP version? I have a book Active Server Pages 2.0 by WROX (8 authors)...
>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
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform