473,382 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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("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 #1
6 2877
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("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 #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**************@TK2MSFTNGP03.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("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 #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**************@TK2MSFTNGP03.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("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 #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****@microsoft.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**************@TK2MSFTNGP03.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("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 #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.comwrote in message
news:ZF**************@TK2MSFTNGHUB02.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****@microsoft.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**************@TK2MSFTNGP03.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("txt Day1")
>
>
>
.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****@microsoft.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.com>
References: <uD**************@TK2MSFTNGP05.phx.gbl>
<uM**************@TK2MSFTNGP03.phx.gbl>
<ux**************@TK2MSFTNGP04.phx.gbl>
<ed**************@TK2MSFTNGP06.phx.gbl>
<ZF**************@TK2MSFTNGHUB02.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.comwrote in message
news:ZF**************@TK2MSFTNGHUB02.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
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...
10
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....
2
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...
2
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...
5
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...
3
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...
2
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...
3
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...
7
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.