changing text box properties at runtime

I have a webpage with several text boxes.
I want to change the looks of the textboxes based on certain events.
The events happen to be hitting markers of a media file.

I would like to change the background color and/or font size of certain text boxes when corresponding markers are hit.

I figured out how the size of the text boxes, but that isn't what I want to do.

<SCRIPT language = "JScript" for = Player1 event = markerHit(mymark)>
   if(mymark==1) Text.size = 5;
   if(mymark==2) Text.size = 10;
   if(mymark==3) Text.size = 20;

I don't see individual properties for font and background color, only style, so I tried this:

<SCRIPT language = "JScript" for = Player1 event = markerHit(mymark)>
   if(mymark==1) = "BACKGROUND-COLOR: aqua";
   if(mymark==2) = "BACKGROUND-COLOR: black";
   if(mymark==3) = "BACKGROUND-COLOR: blue";

but the event throws "htmlfile: Member not found."

I thought the properties visible for objects at design time could be changed at runtime. Works for size, but not for style.
Thanks for any help.

5/16/2008 10:58:48 PM 93655 articles. 6 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 1

Hi, Instead of = "BACKGROUND-COLOR: aqua" Try This = 'aqua'; Dont Forgot to Mark it as Answer if it is Helpful for you

With Regards,
Solaimalai V.T
5/17/2008 4:46:02 AM

That was so easy. Exactly what I was looking for.

I'm quite new to this, so little problems like this one are burning lots of time.

Thank you very much. 

5/17/2008 5:08:39 PM

Similar Artilces:

Load Text box of one web form with selected list item of list box of another web form
one help please Problem is i have two web forms  1.  ForiegnkeyTest.aspx  2. foroginkeytable.aspx   step 1 1 ForiegnkeyTest.aspx one web form <head runat="server"><script language="javascript" type="text/javascript">   function popWin()   {         var confirmWin = null;      confirmWin ='foroginkeytable.aspx','anycontent',   'width=455,height=435,status');   }  </script> &...

Check if the text box "text" has changed (RePost from web forms forum)
Greetings! How can i know if the "text" inside of a text box has changed? For example, I currently have this: if (txtMU.TextChanged()) { } But this does not work. The other idea I had was to assign the existing value of the text box to a string and then when the user click the save button I can create a conditional statement to compare the original string with the new string. However, I would like something more effective as I have like 12 text boxes to compare. Thanks, EduardoThanks,Please Mark this post as answered if it was helpful. Here is the easiest way that I have ...

using javascript to change .net web form properties
Hello everyone, I'm fairly new to ASP.NET and I'm trying to find the best solution to this problem I'm having.  I believe ultimately what I need to be able to do is change the ImageUrl value via javascript of an ImageButton.  A small example of what I'm working on can be found here in a javascript form: is a simple data input method for a survey. There are three distinct columns, when you select a number within a column it will change the .gif image to show it's selected and then populate the textbox with that value.  I...

Change text property of web server control at runtime
Hi, In a Web Sever Control, I want to change the text display at runtime! by use as follows <%#...%> or other for example: <asp:button text="<%# . text here..%>"> can someone tell me how to solve this? thanks You need to call DataBind() in the Page_Load. Steven BeyRecursion: see Recursion...

change web form background property from code in
I have a web form in a project. The web form has both a design view and an HTML view. In the design view, the property box has a background property that can be set to an image file. This causes a background attribute to be added to the Body element in the HTML view. My question is, how do I modify the background property from program code? I can't find the object that has this property so I can set its value. On way to do it is to use 2 different style sheet and change the stylesheet in the pageload event depending on your condition. Look for an example in Report Starter Kit ...

VB .net Web Form will not get contents of Text Box
I have created a web form with text boxes that are bound to a DataSet/DataView.  I have created button to navigate up and down the recordset.  That all works fine. I need to have the ability to edit/add text in any of the boxes and then when clicking "Save" button, it would build an UPDATE query to send to the database. When the Save button is clicked, I have coded to DIM a string var (strSQL) to use to build the SQL command.  For some reason, it will only get the text from a text box if the data was pulled the database.  If I add/edit data, then the SQL command will ha...

text box object changes size when a property is changed
Every time I change a property for a text box object, ie.e fon or text displayed, the text box changes to its original size and I must resize the object. Is there a way to prevent this from happening? I am using Infomaker 6.5.1. Thanks, Drives me crazy too, bu there is nothing you can do about it. Works the same in version 7 as well. -- Terry Dykstra (TeamSybase) Canadian Forest Oil Ltd. Check out Sybase Developer's Network: Jane Johnson <> wrote in message > Every ...

Enabling button after text changed on text box from form view control
I'm using form view to display some text box that contains user's personal info. There are "save" buttons for each text box which are disable as default. I want to enable them when text is changed on the the text box. I don't know how to write the the JavaScript function to do this task and i also don't know how to call the function from the the textbox control (onchange or ontextchange?). Here is the formview code: <asp:FormView ID="FormView1" runat="server" DataSourceID ="personalSQL"> <ItemTemplate > <ta...

Tabbing through text boxes on a web form
I have 3 text boxes within the body of my html on an page and when i render the page I am not able to tab from the first box to the next. How do you set this up? Thanks, -=angst=- You can use the TabIndex property of the TextBox object to do this. ex : <asp:TextBox id="myBox1" TabIndex="0" runat="server"/> <asp:TextBox id="myBox2" TabIndex="1" runat="server"/> <asp:TextBox id="myBox3" TabIndex="2" runat="server"/> Make sure each textbox has a un...

Change size of text box at runtime
Hi All, i am working with textbox control. i am inserting text in text box at run time. i do not want scroll bar in my text box. i want to know how to increase size of textbox at runtime according to the text inserted. Thanks & RegardsNeeraj hi give the textbox width in in percentage (100%), but if the textbox contains more data, the page will have the scrollbar, it is advisable to use textarea when the large data is there.Please Mark as Answer if it helps you...

clearing all text boxes on a web form
Howdy, I picked up the following code a while back but have only now had the time to try it. what I would like to do is clear the content of all the text boxes on a web form. here is the code: Private Sub ReadControls() Dim ctl As Control Dim intIndex As Integer ' First find the Form object For Each ctl In Page.Controls If ctl.GetType Is GetType(Web.UI.HtmlControls.HtmlForm) Then intIndex = Page.Controls.IndexOf(ctl) Exit For End If Next ' Loop through all controls within Form Control ' which is at Postion 1 in the Controls Collection ...

Passing Text of a text box in child form to a label in parent form
Hi Elite People !! I have a parent form with a number of ASP Labels and Buttons. Each ASP Label has a ASP Button next to it. What I want to acheive is when you click the button, it should open a new window with a ASP multiline text box and a "save" button. User can enter the text in the text box and when they click the SAve button, the Text in the text box of the Child window should be displayed in the label on the parent form.  I am successfully able to do this when I have a Text Box in the Parent form, but my requirement is to use Labels on the Parent Form. I am ...

Implementing .Net Form into an web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

changing the text on text box
hello, i need to build an addon which takes (on mouse click) the text of any given input text box and change it. how do i get theobject of the text box and set my text to its value. thanks... ...

Web resources about - changing text box properties at runtime -

General Growth Properties - Wikipedia, the free encyclopedia
Chicago , Illinois , U.S. General Growth Properties, Inc. is an American real estate investment trust , headquartered at 110 North Wacker Drive ...

RentalRoost Brings Facebook Into Process Of Matching Up Home Seekers, Available Properties
... places to live , as RentalRoost , a San Francisco Bay-area-based website that incorporates Facebook data into its rankings of available properties, ...

Extended Profile Properties - Facebook-Entwickler
These Permissions cannot be revoked in the Login Dialog during the login flow, meaning they are non-optional for Users when logging into your ...

PortPerry Properties (@brian14mckinlay) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Hawaii Real Estate Properties for iPad on the App Store on iTunes
Get Hawaii Real Estate Properties for iPad on the App Store. See screenshots and ratings, and read customer reviews.

Fluffy buyback extended to neighbouring properties that share a wall
... Fluffy buyback and demolition Chief Minister Andrew Barr extended the Fluffy buyback and demolition scheme on Tuesday to include some properties ...

Smart Buys: Sydney properties for less than $1 million
Domain's choice of smart Sydney properties this week.

Golden Mile a 'basketcase' as commercial properties lose value
Kings Cross will never again function as Sydney's late-night entertainment precinct, property owners say, with residential developers snapping ...

Nobody's home: Housing boom leaves swathe of empty properties
The nation's three-year property boom is leaving its biggest cities awash with empty homes, a report shows.

Queensland storms: Roofs ripped off houses in Warwick, 19,000 properties left without power
... roofs in Warwick, as wild storms move across south-east Queensland. More than a dozen homes have lost their roofs and close to 19,000 properties ...

Resources last updated: 12/10/2015 11:42:12 AM