TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
yadagiri uppari
NA
277
190k
apply items(bold,italic) when item selected from drpdownlst
Jul 18 2013 4:29 AM
hi...after typing text in textbox then iem selected from dropdownlist..then it has to b applied
aspx:
function ChangeFont() {
var selectTags = document.getElementById("DropDownList1");
var fontValue = "";
for (i = 0; i < selectTags.length; i++) {
// Returns the index of the selected option
whichSelected = selectTags[i].selectedIndex;
// Returns the selected options values
fontValue += selectTags[i].options[whichSelected].text + " ";
}
var anchor = document.getElementById("TextBox1");
anchor.style.font = fontValue;
}
</script>
</head>
<body>
<form id="frm" runat="server">
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine"></asp:TextBox>
<br />
font-style:
<asp:DropDownList ID="DropDownList1" runat="server"
AutoPostBack="true" OnSelectedIndexChanged="ChangeFont();">
<asp:ListItem>Italic</asp:ListItem>
<asp:ListItem>normal</asp:ListItem>
<asp:ListItem>oblique</asp:ListItem>
</asp:DropDownList>
</form>
</body>
</html>
Reply
Answers (
9
)
The file '/MasterPage.master' does not exist at production.
Application opens in different IE browser mode and document