HTML - Dynamic Text/label
Is there a way to dynamically create text in html/jsp based on a value the user chooses? I have the following code in a jsp and based on the value of the returntype that the user chooses.
The value SSN: has to change to SSN/FEIN: depending on what is choosen in the return type drop down (note, the change has to be in the text and not the inputType field). Is there an easy way to do this? Here is the form code... <form action="CompareData" method="post"> <center> <table cellspacing="5" border="0"> <col width=450> <tr> <td align = "LEFT" colspan=2><b>Please enter the parameters below to retrieve the information:</b></td> </tr> </table> </center> <center> <table cellspacing="5" border="0"> <col width=200> <col width=100> <tr> <td align = "LEFT"><b>SSN:</b></td> <td><input type="text" name = "SSN" value="000000000" ></td> </tr> <tr> <td align = "LEFT"><b>End Year:</b></td> <td><input type="text" name = "ENDYEAR" value="2007" ></td> </tr> <tr> <td align = "LEFT"><b>Num of Years:</b></td> <td><input type="text" name = "NUMYEARS" value="2" ></td> </tr> <tr> <td align = "LEFT"><b>Return Type:</b></td> <td> <select name="ReturnTypeDropDown" > <option value="WI">WI</option> <option value="IRS">IRS</option> <option value="Informational">Informational</option> </select> </td> </tr> <tr> <td><input type="hidden" name="RETURNTYPE" value="" ></td> <td><input type="button" value="Retrieve" onClick="validate(this.form)"></td> </tr> </table> </center> </form> Similar TutorialsGood day guy's. Im very new to html programming and scripting, but I was wondering if it would be possabe to insurt a dynamic label field in you body where to content must be fetch from a notepad or wordpad ( /docs/someting.txt ) Thanks Well, I think that's what it would be considered. Anyways, I have a simple project where I'm making a website that has a drop down menu with a list of items. I also have a table which will define the items. What i want to know is how to change the text in one of the table boxes when a new item in the drop down menu is selected. This is the code i have so far... Code: <html> <head> <title> My Definitions </title> </head> <body> <script type="text/javascript"> var define= new array() define["Unicode"] = "unicoded" define["Hexadecimal"] = "hex" define["Binary"] = "bin" define["Compiler"] = "compil" define["Interpreter"] = "inter" define["Topology"] = "top" define["Server"] = "ser" define["Overflow Error"] = "of" define["Phishing"] = "phish" define["Network"] = "net" function definition(def) { } </script> Select a definition from the list: <select id="list"> <option>Unicode</option> <option>Hexadecimal</option> <option>Binary</option> </select> <br> <br> <table border="1" width="100" cellpadding="5"> <th>Definition:</th> <th>Pictu </th> <tr><td>two</td> <td>one</td></tr> </table> </body> </html> any help would be greatly appreciated. Right - I am looking for way to do the following... I want to have a 3 URLs on a page > something like Code: <a href="http://www.somesitesomewhere.com" alt="no 1">Click here for option 1</a> <a href="http://www.somesitesomewhere.com" alt="no 2">Click here for option 2</a> <a href="http://www.somesitesomewhere.com" alt="no 3">Click here for option 3</a> which will take the viewer to another website landing page which will have a body of text that will contain an area that will be changed depending on which of the above links has been clicked... i.e.: Code: <p>this is copy for the body of the landing page. You clicked option {dynamic_text}, nice choice.</p> So the "alt" state appears dynamically - I know that the link will have the dynamic text elsewhere in the anchor tag (not in the 'alt' tag) - but am not sure where/how to implement. Can anyone help? Cheers YB Hello Everyone, Can anyone help me with my html problem?? I have a form showing one chunk record at one time. This record is from a table. I want this form to bold certain text from that chunk of record. Since the record is not hardcoded/type inside the form. I want the bold funtion to be dynamic. Let say, Record one: I have an apple. I want to eat it now. Record two: I have a strawberry. I dun want to eat it now. First case, I want to bold the whole first line,with the word 'have' in it.. But this line can be anywhere in the page.. It doesn't always have specific position as long as the sentence have the word 'have' in it. Second case, I want the script to bold the word 'want' every time it finds it.. And only that word! Can anybody help me on how to do this.. I really dunno how to? Hello. I'm new here so I'd like to apologise for two things: 1. The possibility that I've posted in the wrong forum section - the problem contains what I believe to be an HTML issue primarily, as opposed to CSS; although I'm probably wrong due to my inexperience with web design. 2. That I haven't worded my title properly or that this problem has already been resolved. I've tried searching numerous forums but I'm having difficulty expressing myself articulately and consequently, I can't find anyone with a similar problem. Here's my problem: I'm building a website which contains the owner's latest tweet on the page, in this instance it's at the top. I'd like this text: 'Latest tweet:' to appear on the left-hand side of the actual tweet and for both items to be aligned to the centre of the X axis. Typically, all the options I've tried have resulted in 'Latest tweet:' appearing above the tweet or being occluded by the tweet. A simple solution would be to create a div containing 'Latest tweet:' and position it next to the div containing the tweet. The problem here is that the 'Latest tweet:' text will remain stationary, whilst the tweet will grow or shrink dynamically, depending upon the number of characters in the tweet. This will usually leave an unsightly gap between 'Latest tweet:' and the tweet. Is there any way I can get 'Latest tweet:' to appear right at the start of the tweet, regardless of its size? Here is a crude illustration of the gap:- Latest tweet:____________"This is a relatively small tweet." Here is what I'd like to happen:- Latest tweet: "This is a relatively small tweet." The relevant (I think) code is pasted below. I'd really appreciate the help of anyone who's reading this - even if you're not sure yourself! If you need more information or code then please let me know. I don't have a working link yet but I could upload it if necessary. Best wishes, thereisnoteapot. PS HTML <div id="twitter_div" style="position: relative; top: -35px; height: 35px; font: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; font-style: italic; font-size: 14px; display:inline;"> Latest tweet: <p id="twitter_update_list"> </p> </div> CSS #twitter_update_list { list-style-type: none; } #twitter_update_list span a { display: inline; color: #fff; } Hi, I want to create a header (<h1>,<h2>,...) like on the picture (see attachment) with html and css. It is possible to create sth like that without using pictures? Thanks I am trying to make a page that has a DTML (dynamic expanding links), and a right hand column - Below is my code. I want to make the right hand colunm (most common questions grey area) a fixed height. It seems to be the length of the page as if all the menus are clicked on and opened even if they are closed. How can I make it a fixed height regardless of how many links (dhtml) are opned or not so that most common questions are no longer than say 500 pixles. Any suggestions would be handy. I can send code / page as its to long to paste here! Thanks, Ryan I am trying to slowly put together a very simple content management site for a footy club i run, the data is stored in a mysql database and lined to the web page using a dynamic table from within dreamweaver, it displays all the info except one thing it appears in one huge paragraph, take a look at my page Link is at: http://itdesignz.co.uk/Clients/RTFC/cms/home.php The Data in the mysql has the spaces and enters breaks in it, but these are not reflected in my page. I am really new to dreamweaver and am not sure how to overcome this problem, Please help Andy I have a website that I'm using as a test project of sorts. The link is he http://www.RyanzLair.com/OnTheFarm/index.html What I'm wanting to do is, when the user clicks on one of the thumbnails, for there to be a dynamic text box above the image in the main window that will also change depending on the picture. Basically I'm wanting to caption my photos. Right now I'm using a php script to load the pictures into the main window (so I don't have to create a separate page for each image). I'm new to all of this, so I don't know if you need me to copy and paste any code or what not, but I can get whatever you require to help out. Thanks! i have added dropdown list and associated label with it and i want to know the value for label and the value selected in dropdown list. How can I access both values inside javascript? can anybody help? Afternoon everyone, I have a table with many rows and a checkbox in the first cell of each row. I want the user to be able to click anywhere on the row and activate the checkbox, so I'm using a label tag in front of each row. The following code works in IE7, but not Firefox or Chrome. Any ideas how to make it work cross-browser? Code: <table> <label for="X"> <tr> <td> <input type="checkbox" id="X"/> </td> <td> THIS TEXT SHOULD ACTIVATE THE LEFT CHECKBOX </td> </tr> </label> </table> Thanks! 2 Quick questions: 1) Is it considered good, poor, or indifferent programming style to implicitly connect labels with other form tags. For instance, is one of these preferable to the other? Code: <label for="username">Username</label> <input type="text" name="username" id="username" /> <label>Username: <input type="text" name="username" id="username" /></label> 2) Is it good or bad programming style to have the name and id of a tag the same? For instance, in the example above, the input object has an id and name of "username". Is this considered ok? Tahnks for all the help~ I have a <select> drop down list. I have a label associated with this element. Here is the code; <select name="v" id="v" value="0" size="1"> <option>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> <label for="v">No. required</label><br /> The problem is that when the user clicks on the text of the label, the value in the <select> list is changed back to 0. For example, the user selects 3 using the drop down list. Then if the user ever clicks on the label's text, this value returns to 0. How can I stop this from happening and maintain the initially diisplayed value of the <select> list as 0? Hi, I'm a HTML newbie (have some programming experience though), so please forgive me if my question is maybe unclear or naive. I've managed to build a newsletter that displays nicely in the most-used webmail clients and offline clients. For personalization I can add form fields (like: name) to the html code that graphicmail will fill with the indivual recipient's data (like: Bob) on sending out the newsletter. To add an "Unsubscribe" link to the newsletter, graphicmail recommends to insert this code: <DIV><LABEL class=FormField data="Unsubscribe">Unubscribe</LABEL></DIV> This results in a simple: Unsubscribe text in the newsletter. If the reader clicks on it, the unsubscribe webpage is opened. I would like to achive the same functionality but with something different than the LABEL tag, since this plain text "Unsubscribe" doesn't fit the design of the newsletter. Ideally I'd like to be able to use an image that when clicked provides the same functionality as the label tab does. Sorry for the confused description. Thanks for your help. Mark Hi, I know the label element is for associating a text label with a control, and that when you click it the control gets focus. But is that its only purpose? Is it supposed to be used for describing a more general semantic relationship. In particular can/should/is it intended to be used to associate key value pairs to describe a semantic relationship sort of like <dt> <dd>? For example say I have a listing of key values pairs from say a config file. Should I do this: <label for="val0">screenheight:</label><span id="val0">7560</span> I dont know, maybe I should use <dt> <dd> and re-style with CSS? Or maybe thats what the ":" is for(!) and I dont need to express this in HTML (Thinking about the boundary between presentation and semantics makes my crazy, its very fuzzy in my opinion). Any thoughts appreciated. Thanks. How do I place a label for a radio button above the radio button? im wondering if any1 can help me figure out how i can keep my domain name and link it to my Apache Home Server with a Dyanmic IP i have tried no-ip.com but i dont like having sitename.no-ip.com i want sitename.com does any1 know a way to do this?? Hi, Is there anyway to script in such a way that if i never enter a specify to a cell, and give it 100% instead, my cell below will go all the way to the bottom by putting my whole table as 100% too? |--------------------------| | | | 100% | | | |--------------------------| | 50px | | | |--------------------------| something like that. well, it actually work in firefox and not IE, and i cant solve the problem. Thanks in advance. I have no idea where to post this question. I want to create a calculator for my website, similar in function to an excel spreadsheet although it doesn't have to look like one. Anyone have any idea how I can go about doing this? My apologies if this is in the wrong area, i have searched forum and could not find what i'm needing/doing wrong. I have a website that was in cold fusion, i am changing it to html/css. So i sliced it up and everything is good except the area i need to be dynamic for wordpress. Only half is stretching. The part where i want widgets to go is not stretching with rest. Sorry if my code is a mess, i'm just learning. Thanks for any advise or directions. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="css.css" rel="stylesheet" type="text/css" /> </head> <body background="images/bg.jpg"> <body> <div id="wrapper"> <div id="header"> <div id="topleft"><!--start of content keep left --> </div> <div id="home"> </div> <div id="about"> </div> <div id="process"> </div> <div id="yachts"> </div> <div id="blog"> </div> <div id="news"> </div> <div id="contact"> </div> <div id="headbanner"> </div> </div><!--header --> <div id="contentwrap"> <div id="leftcontentwrap"> <div id="static"> </div> <div id="dynamic"> </div> </div><!--leftconentwrap --> <div id="rightcontentwrap"> <div id="sidebarwrap"> <div id="sidebar"> </div><!--end sidebar --> <div id="sidedynamic"> </div> </div><!--sidebarwrap --> </div> </div><!--contentwrap --> <div id="footwrap"> <div id="footer"> </div><!--footer --> </div><!--footer wrap --> </div> <!--wrapper --> </body> </html> CSS Code: @charset "utf-8"; /* CSS Document */ #header { height: 280px; width: 891px; } #headbanner { background-image: url(images/island_12.png); height: 203px; width: 891px; float: left; } #home { background-image: url(images/island_04.png); height: 77px; width: 63px; float: left; } #sidebarwrap { float: left; height: 348px; width: 200px; } #dynamic { background-image: url(images/island_15.png); width: 659px; min-height: 427px; } #contact { background-image: url(images/island_10.png); float: left; height: 77px; width: 140px; } #news { background-image: url(images/island_09.png); float: left; height: 77px; width: 55px; } #footer { background-image: url(images/island_16.png); height: 75px; width: 891px; float: left; } #sidedynamic { background-image: url(images/sidedynamic.jpg); float: left; height: 77px; width: 232px; min-height: 77px; } #rightcontentwrap { height: auto; width: auto; float: left; } #contentwrap { width: 891px; min-height: 348px; } #sidebar { background-image: url(images/island_14.png); height: 348px; width: 232px; } #static { background-image: url(images/island_13.png); float: left; height: 152px; width: 659px; } #process { background-image: url(images/island_06.png); float: left; height: 77px; width: 93px; } #about { background-image: url(images/island_05.png); height: 77px; width: 67px; float: left; } #blog { background-image: url(images/island_08.png); float: left; height: 77px; width: 61px; } #leftcontentwrap { width: 659px; min-height: 348px; float: left; } #topleft { background-image: url(images/island_03.png); height: 77px; width: 347px; float: left; } #yachts { background-image: url(images/island_07.png); float: left; height: 77px; width: 65px; } #wrapper { width: 891px; min-height: 800px; margin-right: auto; margin-left: auto; padding-top: 25px; padding-bottom: 0px; padding-left: 15px; padding-right: 0px; } |