473,890 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Textbox Tooltip altered by javascript is not seen by code to save it

I have the following textbox setup with Text & ToolTip Bindings as follows;
I'm using Visual Studio 2008 VB:

<asp:TextBox ID="txtDay1" runat="server"

Text='<%# Eval("Day1") %>' Width="30px"

ToolTip='<%# Eval("M1") %>'></asp:TextBox>

I am changing the Text on the page by Typing it in, but the ToolTip is being
changed from another Textbox thru javascript as a memo to the first TextBox,
which is working on the page to change the ToolTip when moused over.

Problem I am having is when I try to save the new ToolTip text in my VB code
it is still seeing the original Evaluation and not the new altered ToolTip
Text, this is in a Datalist Control

Here is the VB Code, the change to the Text of the TextBox is being picked
up by this code, just not the tooltip(Code Simplified).

Dim D As TextBox = Me.DataListTime .Items.Item(i). FindControl("tx tDay1")

..Day1 = D.Text 'Sees Changes Okay

..M1 = D.ToolTip 'Only sees Original, not changes thru javascript

Thanks for any help

John


Jun 27 '08 #1
6 2918
the browser does not postback the tooltip value. you will need the
javascript to copy it to a hidden field.

-- bruce (sqlwork.com)

john wrote:
I have the following textbox setup with Text & ToolTip Bindings as follows;
I'm using Visual Studio 2008 VB:

<asp:TextBox ID="txtDay1" runat="server"

Text='<%# Eval("Day1") %>' Width="30px"

ToolTip='<%# Eval("M1") %>'></asp:TextBox>

I am changing the Text on the page by Typing it in, but the ToolTip is being
changed from another Textbox thru javascript as a memo to the first TextBox,
which is working on the page to change the ToolTip when moused over.

Problem I am having is when I try to save the new ToolTip text in my VB code
it is still seeing the original Evaluation and not the new altered ToolTip
Text, this is in a Datalist Control

Here is the VB Code, the change to the Text of the TextBox is being picked
up by this code, just not the tooltip(Code Simplified).

Dim D As TextBox = Me.DataListTime .Items.Item(i). FindControl("tx tDay1")

.Day1 = D.Text 'Sees Changes Okay

.M1 = D.ToolTip 'Only sees Original, not changes thru javascript

Thanks for any help

John

Jun 27 '08 #2
Thanks for the info, I was originally using the Hidden fields in that way
but because this is a Time sheet Datalist and they want 16 Textboxes for
Input per row. I am getting slower Browser performance with each new row
added to the Datalist and with a Hidden Field for each of those to store a
Memo for each Textbox was Doubling my Control overload.

So I was trying to eliminate those as it did help performance when I did, is
there any way to do a Request to the Browser for the ToolTip(title)
Attribute or another way that is efficient. Right now I'm thinking a
JavaScript Array if I can't get to the altered ToopTip, but not sure how to
get the data in the Javascript Array back on the server?

Thanks

"bruce barker" <no****@nospam. comwrote in message
news:uM******** ******@TK2MSFTN GP03.phx.gbl...
the browser does not postback the tooltip value. you will need the
javascript to copy it to a hidden field.

-- bruce (sqlwork.com)

john wrote:
>I have the following textbox setup with Text & ToolTip Bindings as
follows; I'm using Visual Studio 2008 VB:

<asp:TextBox ID="txtDay1" runat="server"

Text='<%# Eval("Day1") %>' Width="30px"

ToolTip='<%# Eval("M1") %>'></asp:TextBox>

I am changing the Text on the page by Typing it in, but the ToolTip is
being changed from another Textbox thru javascript as a memo to the first
TextBox, which is working on the page to change the ToolTip when moused
over.

Problem I am having is when I try to save the new ToolTip text in my VB
code it is still seeing the original Evaluation and not the new altered
ToolTip Text, this is in a Datalist Control

Here is the VB Code, the change to the Text of the TextBox is being
picked up by this code, just not the tooltip(Code Simplified).

Dim D As TextBox = Me.DataListTime .Items.Item(i). FindControl("tx tDay1")

.Day1 = D.Text 'Sees Changes Okay

.M1 = D.ToolTip 'Only sees Original, not changes thru javascript

Thanks for any help

John
Jun 27 '08 #3
the only way to send a javascript array back is thru a hidden field. the
javascript can add the hidden fields, there is no need to render them.
on serverside just fetch from the hidden field values from the forms
collection.

-- bruce (sqlwork.com)

john wrote:
Thanks for the info, I was originally using the Hidden fields in that way
but because this is a Time sheet Datalist and they want 16 Textboxes for
Input per row. I am getting slower Browser performance with each new row
added to the Datalist and with a Hidden Field for each of those to store a
Memo for each Textbox was Doubling my Control overload.

So I was trying to eliminate those as it did help performance when I did, is
there any way to do a Request to the Browser for the ToolTip(title)
Attribute or another way that is efficient. Right now I'm thinking a
JavaScript Array if I can't get to the altered ToopTip, but not sure how to
get the data in the Javascript Array back on the server?

Thanks

"bruce barker" <no****@nospam. comwrote in message
news:uM******** ******@TK2MSFTN GP03.phx.gbl...
>the browser does not postback the tooltip value. you will need the
javascript to copy it to a hidden field.

-- bruce (sqlwork.com)

john wrote:
>>I have the following textbox setup with Text & ToolTip Bindings as
follows; I'm using Visual Studio 2008 VB:

<asp:TextBo x ID="txtDay1" runat="server"

Text='<%# Eval("Day1") %>' Width="30px"

ToolTip='<% # Eval("M1") %>'></asp:TextBox>

I am changing the Text on the page by Typing it in, but the ToolTip is
being changed from another Textbox thru javascript as a memo to the first
TextBox, which is working on the page to change the ToolTip when moused
over.

Problem I am having is when I try to save the new ToolTip text in my VB
code it is still seeing the original Evaluation and not the new altered
ToolTip Text, this is in a Datalist Control

Here is the VB Code, the change to the Text of the TextBox is being
picked up by this code, just not the tooltip(Code Simplified).

Dim D As TextBox = Me.DataListTime .Items.Item(i). FindControl("tx tDay1")

.Day1 = D.Text 'Sees Changes Okay

.M1 = D.ToolTip 'Only sees Original, not changes thru javascript

Thanks for any help

John
Jun 27 '08 #4
Thanks for Bruce's input.

Hi John,

I agree that hidden form field is the only approach for you to carry some
data back to server during postback. If you do not want to use hidden field
for each textbox element, you can consider using a single hidden field and
use script to compress all the tooltip info into that hidden field(use a
separator char to divide them). How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>Date: Sun, 20 Apr 2008 22:11:43 -0700
From: bruce barker <no****@nospam. com>
Organization : SQLWork.com
User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213)
MIME-Version: 1.0
Subject: Re: Textbox Tooltip altered by javascript is not seen by code to
>
the only way to send a javascript array back is thru a hidden field. the
javascript can add the hidden fields, there is no need to render them.
on serverside just fetch from the hidden field values from the forms
collection.

-- bruce (sqlwork.com)

john wrote:
>Thanks for the info, I was originally using the Hidden fields in that
way
>but because this is a Time sheet Datalist and they want 16 Textboxes for
Input per row. I am getting slower Browser performance with each new row
added to the Datalist and with a Hidden Field for each of those to store
a
>Memo for each Textbox was Doubling my Control overload.

So I was trying to eliminate those as it did help performance when I
did, is
>there any way to do a Request to the Browser for the ToolTip(title)
Attribute or another way that is efficient. Right now I'm thinking a
JavaScript Array if I can't get to the altered ToopTip, but not sure how
to
>get the data in the Javascript Array back on the server?

Thanks

"bruce barker" <no****@nospam. comwrote in message
news:uM******* *******@TK2MSFT NGP03.phx.gbl.. .
>>the browser does not postback the tooltip value. you will need the
javascript to copy it to a hidden field.

-- bruce (sqlwork.com)

john wrote:
I have the following textbox setup with Text & ToolTip Bindings as
follows; I'm using Visual Studio 2008 VB:

<asp:TextB ox ID="txtDay1" runat="server"

Text='<%# Eval("Day1") %>' Width="30px"

ToolTip='< %# Eval("M1") %>'></asp:TextBox>

I am changing the Text on the page by Typing it in, but the ToolTip is
being changed from another Textbox thru javascript as a memo to the
first
>>>TextBox, which is working on the page to change the ToolTip when
moused
>>>over.

Problem I am having is when I try to save the new ToolTip text in my
VB
>>>code it is still seeing the original Evaluation and not the new
altered
>>>ToolTip Text, this is in a Datalist Control

Here is the VB Code, the change to the Text of the TextBox is being
picked up by this code, just not the tooltip(Code Simplified).

Dim D As TextBox = Me.DataListTime .Items.Item(i). FindControl("tx tDay1")

.Day1 = D.Text 'Sees Changes Okay

.M1 = D.ToolTip 'Only sees Original, not changes thru javascript

Thanks for any help

John
Jun 27 '08 #5
Thanks guys, I had just begun experimenting with the single hidden field
approach, my first attempt was to just use it as one big var with
separators, but soon realized it could not handle multiple edits to the same
ToolTip and return just 1 edited version of the ToolTip.

So now I am setting a an JS Array with the Primary KeyID of each Row as the
index control for the Array, with each Textbox on the row having a separator
and then write all of that to the hidden field, hopfully that approach will
allow edits to the Array, I'll post it when I get some result.
Thanks again

"Steven Cheng [MSFT]" <st*****@online .microsoft.comw rote in message
news:ZF******** ******@TK2MSFTN GHUB02.phx.gbl. ..
Thanks for Bruce's input.

Hi John,

I agree that hidden form field is the only approach for you to carry some
data back to server during postback. If you do not want to use hidden
field
for each textbox element, you can consider using a single hidden field and
use script to compress all the tooltip info into that hidden field(use a
separator char to divide them). How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
>>Date: Sun, 20 Apr 2008 22:11:43 -0700
From: bruce barker <no****@nospam. com>
Organizatio n: SQLWork.com
User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213)
MIME-Version: 1.0
Subject: Re: Textbox Tooltip altered by javascript is not seen by code to
>>
the only way to send a javascript array back is thru a hidden field. the
javascript can add the hidden fields, there is no need to render them.
on serverside just fetch from the hidden field values from the forms
collection.

-- bruce (sqlwork.com)

john wrote:
>>Thanks for the info, I was originally using the Hidden fields in that
way
>>but because this is a Time sheet Datalist and they want 16 Textboxes for
Input per row. I am getting slower Browser performance with each new row
added to the Datalist and with a Hidden Field for each of those to store
a
>>Memo for each Textbox was Doubling my Control overload.

So I was trying to eliminate those as it did help performance when I
did, is
>>there any way to do a Request to the Browser for the ToolTip(title)
Attribute or another way that is efficient. Right now I'm thinking a
JavaScript Array if I can't get to the altered ToopTip, but not sure how
to
>>get the data in the Javascript Array back on the server?

Thanks

"bruce barker" <no****@nospam. comwrote in message
news:uM****** ********@TK2MSF TNGP03.phx.gbl. ..
the browser does not postback the tooltip value. you will need the
javascript to copy it to a hidden field.

-- bruce (sqlwork.com)

john wrote:
I have the following textbox setup with Text & ToolTip Bindings as
follows; I'm using Visual Studio 2008 VB:
>
>
>
<asp:TextBo x ID="txtDay1" runat="server"
>
Text='<%# Eval("Day1") %>' Width="30px"
>
ToolTip='<% # Eval("M1") %>'></asp:TextBox>
>
>
>
I am changing the Text on the page by Typing it in, but the ToolTip is
being changed from another Textbox thru javascript as a memo to the
first
>>>>TextBox, which is working on the page to change the ToolTip when
moused
>>>>over.
>
>
>
Problem I am having is when I try to save the new ToolTip text in my
VB
>>>>code it is still seeing the original Evaluation and not the new
altered
>>>>ToolTip Text, this is in a Datalist Control
>
>
>
Here is the VB Code, the change to the Text of the TextBox is being
picked up by this code, just not the tooltip(Code Simplified).
>
>
>
Dim D As TextBox =
Me.DataList Time.Items.Item (i).FindControl ("txtDay1")
>
>
>
.Day1 = D.Text 'Sees Changes Okay
>
.M1 = D.ToolTip 'Only sees Original, not changes thru javascript
>
>
>
Thanks for any help
>
John
>
>
>

Jun 27 '08 #6
Thanks for your reply John,

Sure, look forward to your good news.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "john" <no**@none.co m>
References: <uD************ **@TK2MSFTNGP05 .phx.gbl>
<uM************ **@TK2MSFTNGP03 .phx.gbl>
<ux************ **@TK2MSFTNGP04 .phx.gbl>
<ed************ **@TK2MSFTNGP06 .phx.gbl>
<ZF************ **@TK2MSFTNGHUB 02.phx.gbl>
>Subject: Re: Textbox Tooltip altered by javascript is not seen by code to
save it
>Date: Mon, 21 Apr 2008 04:55:36 -0400
>
Thanks guys, I had just begun experimenting with the single hidden field
approach, my first attempt was to just use it as one big var with
separators, but soon realized it could not handle multiple edits to the
same
>ToolTip and return just 1 edited version of the ToolTip.

So now I am setting a an JS Array with the Primary KeyID of each Row as
the
>index control for the Array, with each Textbox on the row having a
separator
>and then write all of that to the hidden field, hopfully that approach
will
>allow edits to the Array, I'll post it when I get some result.
Thanks again

"Steven Cheng [MSFT]" <st*****@online .microsoft.comw rote in message
news:ZF******* *******@TK2MSFT NGHUB02.phx.gbl ...
>Thanks for Bruce's input.

Hi John,

I agree that hidden form field is the only approach for you to carry some
data back to server during postback. If you do not want to use hidden
field
for each textbox element, you can consider using a single hidden field
and
>use script to compress all the tooltip info into that hidden field(use a
separator char to divide them). How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
>>>

Jun 27 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
314
by: Simon Richardson | last post by:
I recently found that one of my application was leaking memory every time I closed a MDIChild form. The garbage collector never reclaimed it and my windows handles kept increasing and increasing until eventually the application crashed After three days of looking through all of my code I found that it was the TOOLTIP component that was causing the problem The overcome the problem I had to add the following to the CLOSING procedure in the...
10
3585
by: Alex | last post by:
could someone please point me to a site with an explanation or give me a *very* simple example of a div that would open right below a textbox on a page. I've seen lots of examples out there. Unfortunately I don't have time right now to dig through that code to extract the basic functionality. The one implementation that really hits the spot can be found here: http://www.eworldui.net/CustomControls/CalendarPopupDemo.aspx look at the...
2
3925
by: Pham Nguyen | last post by:
Has anyone seen an example of a textbox server control that has built-in client-side validation? I'd like to build a server control that extends the System.Web.UI.WebControls.TextBox class to allow javascript checks for things like valid e-mail addresses or phone numbers (without having to add a separate control for validation). One idea I did some work on was having the control implement the IValidator interface and basically recreating...
2
4882
by: melanieab | last post by:
Hi, Is there an easy way to say, on textboxHover, if the text inside the box isn't completely visible, have a popup tool come up showing the complete contents of the box? I'm guessing I need to know if there's a way to determine the number of pixels that some generic text takes up. Also, is there a way to extract the pixel length from textbox.Size (to save some time looking values up)? Thanks so much!!! Mel
5
11710
by: John Dolinka | last post by:
I am trying to change a tooltip on an asp.net (framework 2) textbox with out a post back to the server. I can access many of the textbox properties and change them but not the tooltip. Below is a code snippet of javascript that works and the one tooltip "property" that does not. Any ideas?
3
1724
by: pamelafluente | last post by:
Hi I have seen on some web pages a nice type of tooltip. See for instance http://www.programurl.com/software/tooltip.htm and mouse over on Javascript (first box left). Can anyone point me or provide the script to realize this kind of tooltip, which I like. Thank you,
2
2253
daJunkCollector
by: daJunkCollector | last post by:
I am trying to display a column from a database table in the column of a datagrid. I am using a template column to display it. There are two things that are important to me: 1. If DataItem.TtlInfo is too many characters to be completely seen I want "..." to be added as the last three visible characters in the control. Then, the user can view the entire varchar by mousing over (hence the tooltip). 2. I would prefer to use a label because...
3
2589
omerbutt
by: omerbutt | last post by:
hi there i have downloaded a prototype tooltip from http://www.nickstakenburg.com/projects/prototip/ the logic it uses is to call the script after creating the <div> for example i am using the ajax method <html> <body> <div id='my_div'> </div>
7
2454
by: freddukes | last post by:
Okay... So this is my first project and I want to be able to make a tool tip appear with the basket contents whenever you hover over a link using the onmousehover='javascriptFunction()'. I have acquried (and modified) some javascript code, but it did not work... So I attempted to create a simple alert() function to test and that did not work either... This is my test codee: // tooltip.js function displayAlert() { alert("Test...
0
9822
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11232
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10819
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10923
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8016
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7169
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4676
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4271
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.