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

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

am 20.04.2008 04:25:58 von MD Websunlimited

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




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

ToolTip='<%# Eval("M1") %>'>




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

Re: Textbox Tooltip altered by javascript is not seen by code tosave it

am 20.04.2008 07:21:09 von DFS

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:
>
>
>
> >
> Text='<%# Eval("Day1") %>' Width="30px"
>
> ToolTip='<%# Eval("M1") %>'>

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

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

am 20.04.2008 11:44:38 von MD Websunlimited

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" wrote in message
news:uMEVYZqoIHA.4112@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:
>>
>>
>>
>> >>
>> Text='<%# Eval("Day1") %>' Width="30px"
>>
>> ToolTip='<%# Eval("M1") %>'>

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

Re: Textbox Tooltip altered by javascript is not seen by code tosave it

am 21.04.2008 07:11:43 von DFS

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" wrote in message
> news:uMEVYZqoIHA.4112@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:
>>>
>>>
>>>
>>> >>>
>>> Text='<%# Eval("Day1") %>' Width="30px"
>>>
>>> ToolTip='<%# Eval("M1") %>'>

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

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

am 21.04.2008 08:17:55 von stcheng

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:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.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
>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" wrote in message
>> news:uMEVYZqoIHA.4112@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:
>>>>
>>>>
>>>>
>>>> >>>>
>>>> Text='<%# Eval("Day1") %>' Width="30px"
>>>>
>>>> ToolTip='<%# Eval("M1") %>'>

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

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

am 21.04.2008 10:55:36 von MD Websunlimited

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]" wrote in message
news:ZFL6yd3oIHA.1036@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:
> msdnmg@microsoft.com.
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.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
>>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" wrote in message
>>> news:uMEVYZqoIHA.4112@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:
>>>>>
>>>>>
>>>>>
>>>>> >>>>>
>>>>> Text='<%# Eval("Day1") %>' Width="30px"
>>>>>
>>>>> ToolTip='<%# Eval("M1") %>'>

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

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

am 22.04.2008 03:54:44 von stcheng

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:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.aspx#notif
ications.

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


--------------------
>From: "john"
>References:




>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]" wrote in message
>news:ZFL6yd3oIHA.1036@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
>>
>>>
>
>