UFCWIT
asked on
javascript title property for tooltip
Hi,
In a javascript function I am trying to set a tooltip, via the title attribute (see below)
var fzip = document.getElementById('t xtforeign' );
fzip.title = 'Foreign'
the txtforeign textbox is defined in my aspx as the following:
<asp:textbox ID="txtforeign" style="Z-INDEX: 139; LEFT: 502px; POSITION: absolute; TOP: 97px" MaxLength="10" Width="75" Visible="true" runat="server"></asp:TextB ox>
my problem is in the codebehind in vb.net on a btnsubmit click event, I want to try to access the tooltip property for the textbox txtforeign that I just set in javascript but it is coming back a "" in the codebehind even though it will show 'Foreign' on the mouseover when I have the page up and I can't figure out for the life of me what I am doing wrong here.
Thanks
In a javascript function I am trying to set a tooltip, via the title attribute (see below)
var fzip = document.getElementById('t
fzip.title = 'Foreign'
the txtforeign textbox is defined in my aspx as the following:
<asp:textbox ID="txtforeign" style="Z-INDEX: 139; LEFT: 502px; POSITION: absolute; TOP: 97px" MaxLength="10" Width="75" Visible="true" runat="server"></asp:TextB
my problem is in the codebehind in vb.net on a btnsubmit click event, I want to try to access the tooltip property for the textbox txtforeign that I just set in javascript but it is coming back a "" in the codebehind even though it will show 'Foreign' on the mouseover when I have the page up and I can't figure out for the life of me what I am doing wrong here.
Thanks
ASKER
Thanks Zvonko,
Is there anyway properties that I can share between client and server, I need to be able to access a property that I can set between client and server to determine something on the button submit.
Is there anyway properties that I can share between client and server, I need to be able to access a property that I can set between client and server to determine something on the button submit.
save the title in a hidden field :
<asp:Hidden ID="txtforeign_tooltip_val ue" runat="server"></asp:Hidde n>
var fzip = document.getElementById('t xtforeign' );
fzip.title = 'Foreign';
document.getElement("<%= txtforeign_tooltip_value.C lientID %>").value = 'Foreign';
<asp:Hidden ID="txtforeign_tooltip_val
var fzip = document.getElementById('t
fzip.title = 'Foreign';
document.getElement("<%= txtforeign_tooltip_value.C
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The new set attributes are only present in browser and NOT on server side.