HTML - Populating Table Data Based On The Data Selection In List Box
Hi Experts,
I am designing a webpage where based on the year selection the associated years webtable needs to be displayed in the webpage. Pls give som suggestions and if possible the code on to how to code this using HTML and Jav Script. I know I have to write afunction and then call the fn based on the input.but need your help on this. Thanks, Bsquare Similar TutorialsHi everybody! I have a jsp page with a form and a table. My aim is that when i press the submit button of the form,collect the data and fill the table with it. I am working with J2EE. I have already collected the data in a Java class,but I dont know how to introduce this data into the table. Best Regards! Alright, I finally figured out what I need to do. Below are two templates that are inserted in my vBulletin template design. I have modded them somewhat, but now I am stuck. I am trying to get it to look like the following: http://www.wowhq.com/forum/calendar....=2007-4-18&c=1 -- located towards the bottom of the thread. If you could help me figure out how the heck to finish coding this, it would be much appreciated. NOTE: I have created the dropdown box in the second template. What needs to happen is that data needs to get pulled from the user's answers on the calendar_rsvp_form template and displayed in two separate columns on the calendar_rsvp template. Look at the link above to see exactly how the data is output. calendar_rsvp template: Code: <if condition="!$eventempty"> <hr> </if> <if condition="$rsvp_yes"> <b>$vbphrase[calendar_rsvpd] $vbphrase[yes]: $rsvp_yes_count </b> <if condition="$eventinfo[rsvp_max_guests]"> (<phrase 1="$rsvp_yes_members" 2="$rsvp_yes_guests">$vbphrase[x_members_and_y_guests]</phrase>) </if> <table width="100%" border="0"> <tr> <th width="20">Count</th> <th width="100">Username</th> <th width="100">Class</th> <th width="100">Spec</th> <th width="200">Date Registered</th> <th>Comment</th> </tr> <tr> <th width="20"></th> <th width="100"></th> <th width="100"></th> <th width="100"></th> <th width="200"></th> <th></th> </tr> </table> </if> <if condition="$rsvp_maybe"> <b>$vbphrase[calendar_rsvpd] $vbphrase[maybe]: $rsvp_maybe_count</b> <if condition="$eventinfo[rsvp_max_guests]"> (<phrase 1="$rsvp_maybe_members" 2="$rsvp_maybe_guests">$vbphrase[x_members_and_y_guests]</phrase>) </if> <ul><if condition="$vboptions[rah_rsvp_showavatar]"><table>$rsvp_maybe</table><else />$rsvp_maybe</if></ul> </if> <if condition="$rsvp_no"> <b>$vbphrase[calendar_rsvpd] $vbphrase[no]: $rsvp_no_count</b> <ul><if condition="$vboptions[rah_rsvp_showavatar]"><table>$rsvp_no</table><else />$rsvp_no</if></ul> </if> calendar_rsvp_form template: Code: <form action="calendar.php?do=getinfo&e=$eventinfo[eventid]&day=$rsvp_day" method="post"> <input type="hidden" name="do" value="getinfo" /> <input type="hidden" name="cdo" value="rsvp" /> <input type="hidden" name="day" value="$rsvp_day" /> <input type="hidden" name="e" value="$eventinfo[eventid]" /> <input type="hidden" name="s" value="" /> <if condition="$bbuserinfo['userid'] AND $expires[0]>=0"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr><td class="alt2"> <if condition="$expires[unixdate]"> <if condition="$myrsvp"> <b><phrase 1="$rsvp_day_formatted" 2="$myrsvp">$vbphrase[calendar_rsvp_yoursvp]</phrase></b><br /> <font class="smallfont"><i><phrase 1="$expires[date]">$vbphrase[calendar_rsvp_maychangeby]</phrase></i></font> <else /> <b><phrase 1="$rsvp_day_formatted">$vbphrase[calendar_rsvp_attendquestion]</phrase></b><br /> <font class="smallfont"><i><phrase 1="$expires[date]">$vbphrase[calendar_rsvp_changeby]</phrase></i></font> </if> <br/> <else /> <if condition="$myrsvp"> <b><phrase 1="$rsvp_day_formatted" 2="$myrsvp">$vbphrase[calendar_rsvp_yoursvp]</phrase></b><br /> <font class="smallfont"><i>$vbphrase[calendar_rsvp_maychange]</i></font> <else /> <b><phrase 1="$rsvp_day_formatted">$vbphrase[calendar_rsvp_attendquestion]</phrase></b><br /> <font class="smallfont"><i>$vbphrase[calendar_rsvp_changelater]</i></font> </if> <br/> </if> <br/> <INPUT TYPE=RADIO NAME="response" VALUE="Yes" <if condition="$myrsvp=='Yes'">checked="checked"</if>>$vbphrase[yes] <INPUT TYPE=RADIO NAME="response" VALUE="Maybe" <if condition="$myrsvp=='Maybe'">checked="checked"</if>>$vbphrase[maybe] <INPUT TYPE=RADIO NAME="response" VALUE="No" <if condition="$myrsvp=='No'">checked="checked"</if>>$vbphrase[no]<br \> <if condition="$eventinfo['rsvp_max_guests']"> <i>$vbphrase[calendar_rsvp_guests_prompt] <input type="text" name="guests" id="guests" size="3" value="$myguests"> $vbphrase[calendar_rsvp_guests]. (<phrase 1="$eventinfo[rsvp_max_guests]">$vbphrase[calendar_rsvp_guest_limit]</phrase>)</i> </if> <br/>  <b>Class/Spec:</b> <select name="class"> <option value="Druid (Feral Combat)">Druid (Feral Combat)</option> <option value="Druid (Restoration)">Druid (Restoration) </option> <option value="Druid (Balance)">Druid (Balance)</option> <option value="Hunter (Beast Mastery)">Hunter (Beast Mastery)</option> <option value="Hunter (Marksmanship)">Hunter (Marksmanship)</option> <option value="Hunter (Survival)">Hunter (Survival)</option> <option value="Mage (Arcane)">Mage (Arcane)</option> <option value="Mage (Fire)">Mage (Fire)</option> <option value="Mage (Frost)">Mage (Frost) </option> <option value="Paladin (Holy)">Paladin (Holy)</option> <option value="Paladin (Protection)">Paladin (Protection)</option> <option value="Paladin (Retribution)">Paladin (Retribution)</option> <option value="Priest (Discipline)">Priest (Discipline)</option> <option value="Priest (Holy)">Priest (Holy)</option> <option value="Priest (Shadow)">Priest (Shadow)</option> <option value="Rogue (Assassination)">Rogue (Assassination)</option> <option value="Rogue (Combat)">Rogue (Combat)</option> <option value="Rogue (Subtlety)">Rogue (Subtlety)</option> <option value="Shaman (Elemental)">Shaman (Elemental)</option> <option value="Shaman (Enhancement)">Shaman (Enhancement)</option> <option value="Shaman (Restoration)">Shaman (Restoration)</option> <option value="Warlock (Affliction)">Warlock (Affliction)</option> <option value="Warlock (Demonology)">Warlock (Demonology)</option> <option value="Warlock (Destruction)">Warlock (Destruction)</option> <option value="Warrior (Arms)">Warrior (Arms)</option> <option value="Warrior (Fury)">Warrior (Fury)</option> <option value="Warrior (Protection)">Warrior (Protection)</option> </select> <br/> <br/> <if condition="$maxlength"> <table> <tr> <td><b>$vbphrase[comment]:</b><br \> <td align="right"><font class="smallfont"><i>($vbphrase[calendar_rsvp_maxlength] = $maxlength)</i></font></td> </tr> <tr> <td colspan="2"> <textarea name="comment" rows="2" cols="80">$mycomment</textarea> </td> </tr> </table> </if> <input type="submit" class="button" value="$vbphrase[submit]" /> </td></tr> </table> </form> </if> <if condition="$expires[0]<0"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr><td class="alt2" align="center" valign="center" height="75"><font size="2"><b>$vbphrase[calendar_rsvp_closed]</b></font></td></tr> </table> </if> Hi guys, I have a lengthy HTML page with terms and conditions. At the top of the page, there will be a few check boxes. If certain check box is checked, then the content will be shown. If the check box is empty, then the content will be suppressed. Is there a way to suppress a content based on user check boxes? Thanks! Hi there, I have a list box which is dynamically populated by data from an SQL Server database. I want there to be 2 columns of data inside the list box but the problem is the first column can be blank on some occasions, resulting in it looking like this: Code: example - example example - example - example example - example - example example - example Is there any way I can divide the list box into 2 seperate columns so the data lines up even in the first column is blank? Like this.... Code: example - example example - example - example example - example - example example - example Thanks! Matt oooooooooops! any1 knows how to add and remove data into/from html list at runtime Hi, I have a text box, when i press M ,it must populate a list of names that start with so that user can select any one of the name.on the selection of the name,it must appear in text box. In a short it must work like google search engine. Can any one provide me guide lines in this task Thanks & Regards in Advance So I've got a form with some input text. In addition to the data in the input text I want to send some other data that has already been predetermined on initial page load. How would I declare the other data within the form element? Thanks Hi I'm New to HTML. Can i bind the Data to the Table ? if yes please tell me How can i bind. simple example will be more help full Thank you Greetings I'm organizing a competition, or quest, between my forum members. Each competitor has to finish 37 tasks. So I built this table to use as a progress tracker. It lists the names of the participants at the left side, and a horizontal bar at top with 37 cells showing task number. Each time a user finishes a task, he PMs me and I then go edit his/her table row to change the color of the cell under that task, and type the date he finished it in. But this is too much work for me, as I have to edit the table many times each day.. so I was thinking, can someone help me do the following? It would be great if I have a form that users can fill in, and then that form submits its data into the corresponding cells in the progress tracker table, so that the table automatically reflects the new data. The user has to type a code that I assign for him, for the form to know which row to handle, and also to prevent others from playing tricks with his data. It would be even greater if another form can be made that automates the participation process, by adding a new row when a new user who wants to join the competition, submits the form. Then the form emails the user the code he would later need to submit data to his row. Many thanks for any help, code or examples given. Hey guys this is my first post and my first question ^^ Lets say I have a table with one row and two cells. Is it possible for the data in the second cell to appear first in code? Why you may ask, because we whant the text in the second cell to be picked up by spiders first. Thanks. I want to control the columns inside my table. link below show 3 inter columns, but the only way I can get the first column to be a one line test is for me to put breaks -BR- after every few words. this can't be right, how do I control the width of the columms? TIA http://www.nomagicneon.com/shorteez.html I have been using my site for some time now and it carries the image name over when you clicked on purchasing the print. It carries it still, but when you submit the form, the image name isnt there and the form errors because the field is blank. Here is the site: www.sthompsonphoto.com I cant seem to figure out why it disappears when you click Submit? Any help would be great! Hello, I am new to these forums, and I greet you all Here is the problem I am having. I have a 3x3 table, and I want to use the 6 bottom cells to display linkable pictures of merchandise. I want the cells to display a different picture each time the customer visits the website. I found a javascript for diaplying a random, linkable, picture each time someone visits, but the problem is you can't put the script in each cell. It conflicts with itself somehow. The pictures rotate, but the links only go to the last set of links in the last cell. What is the best method I can use to accomplish my goal? Or can the script below be edited in such a way as to be useable in each cell? Thanks! Code: <script language="javascript"> /* Random image slideshow- By Tyler Clarke (EMAIL REMOVED - Send PM to This User Instead) For this script and more, visit http://www.javascriptkit.com */ var delay=0 //set delay in miliseconds var curindex=0 var randomimages=new Array() randomimages[0]=["picturehere.jpg","linkhere"]; randomimages[1]=["picturehere.jpg","linkhere"]; randomimages[2]=["picturehere.jpg","linkhere"]; randomimages[3]=["picturehere.jpg","linkhere"]; var preload=new Array() for (n=0;n<randomimages.length;n++) { preload[n]=new Image() preload[n].src=randomimages[n] } var First=Math.floor(Math.random()*(randomimages.length)); var LnkURL=randomimages[First][1]; document.write('<img onclick="Link();" name="defaultimage" src="'+randomimages[First][0]+'">') function Link(){ if (LnkURL){ window.location=LnkURL; } } function rotateimage() { if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){ curindex=curindex==0? 1 : curindex-1 } else curindex=tempindex LnkURL=randomimages[curindex][1]; document.images.defaultimage.src=randomimages[curindex][0]; } setInterval("rotateimage()",delay) </script> Hi, I have a simple form he http://www.wirelessbroadband.net.au/wap/pay.html I would like to preload and disable the 'Mobile No. ' field based on the pulldown selection of field 'Preset' for example : if the pulldown select was set to 'Elijah Wood', then the 'Mobile No.' field would display 63917345345 and would be disabled stopping any editing. The only time the 'Mobile No.' field would function like a nornal field, is when the the 'enter cell number' option is selected. your help would be greatly appricated. mike Hey All! Am new to this HTML code been a VB programer for a while now!!! I am trying to enable radio buttons depending on what a use selects from a drop down combo box!!!!! help please here is what have already done!!! But this done not work!!!! <div> <select name="printer" size="1" id="printer" class="combo_box_txt"><?php /* onChange="ticket_print.submit(); */ ?> <option value="">Select Printer</option> <option value="KESW_LABELS2">ASM Printer</option> <option value="KESW_LABELS6">Buyers Printer</option> <option value="KESW_LABELS7">Reciving Printer</option> </select> </div> <?php if ( $printer == "") { ?> <strong>Select your ticket Size :</strong> <div> <input type="radio" name="size_ticket" id="size_ticket" value="_lge" disabled>Large <input type="radio" name="size_ticket" id="size_ticket" value="_med" disabled>Medium </div> <div class="submit"> <button style="font-size:20px; ; color:white; background-color:#FF0000; height:40px; width:120px;" name="publish_id" value="PRINT" type="submit" disabled>PRINT</button> <button style="font-size:20px; font-weight:bold; color:white; background-color:#FF0000; height:40px; width:120px;" name="publish_id" value="PDF" type="submit">PDF</button> </div> <?php } else { ?> </div> <strong>Select your ticket Size :</strong> <div> <input type="radio" name="size_ticket" id="size_ticket" value="_lge" checked>Large <input type="radio" name="size_ticket" id="size_ticket" value="_med" >Medium </div> <div class="submit"> <button style="font-size:20px; ; color:white; background-color:#FF0000; height:40px; width:120px;" name="publish_id" value="PRINT" type="submit" >PRINT</button> <button style="font-size:20px; font-weight:bold; color:white; background-color:#FF0000; height:40px; width:120px;" name="publish_id" value="PDF" type="submit">PDF</button> </div> <?php } ?> thanks in advance!!! I have a html table that contains data and i want to insert the data into an Access database. Any ideas how to do this? Table1: 01, Rich, Mike, 23, fred lane, 02, James, milner, 45, School Lane, 03, Rob, Matthews, 89, College Road, I connect to the database using this code: $db_conn = new COM("ADODB.Connection"); $connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("./Database1.mdb").";"; $db_conn->open($connstr); Hi guys, First of all, I'd like to apologize for my writing skills as I'm from a non english-speaking country and I moved to Australia not long ago. Anyway, I'm trying to help a friend developing a website and I'm having some trouble getting the page to look like what he wants. I am an absolute rookie in website development and I'm discovering Dreamweaver as I speak. I managed to understand a few concepts based on what I know in VBA in Excel and tried to use some templates I found on the net. The last part didn't go really well and I decided to get rid of what I tried to make my explanations as clear as possible. Basically, I have a drop down menu on the left side of the page that works quite well at the moment.Wwhat I want to do is : the user goes over the first link of the drop down menu (called "General for Sale" under the section "Buying") and when he clicks on it, he loads on the right side the content of another page called "generalforsale.html. All of this obviously without refreshing the whole page and with the option of clicking on another section from the drop down menu to load another page... And all of this knowing that I'd like one specific page to be displayed on the left when the user first arrives on the website that would then be replaced by a page, depending on what he selects from the drop down menu. I have honestly tried everything I found and could understand, unsuccessfully... I have attached a lighter version of what I'm trying to do in case one of you guys has the time to have a look. I completely understand if this is not the policy of the forum and therefor apologize in advance. Thanks for reading me and for your help :-) Sub I have 3 Radio buttons . When user selects first Radio button a page(demo.html for example) should be displayed. similarly when he selects second radio button another page should be displayed. can anybody help me out solving this issue. HTML Code: <div class="contactlistdiv"> <select multiple="yes" name="send" class="contactlistone" size="6"> <option value="1" >hello</option><option value="2" >gee</option><option value="3" >gluba</option></select> </div> I am creating a list like the one above. When I style it with CSS it wont let me select any options! E.g if i float left or right(float:right; ) with CSS it wont work. Where as if I place it absolutely somewhere it will work. Problem is to get it exaclty where I want i need to float it. I have tried placing it inside a relatively placed div absolutely but it still wont let me select. I have also tried styling both classes contactlistdiv and contactlistone but it doesnt make a difference. Any help appreciated. Thanks. |