JavaScript - Need Some Help On Logic Choices For Showing Div's
Hello everyone.
I need some guidance on what might be the best way to tackle this problem. I am creating a page for work. It is a local html site that will be used to show different "questions" in the form of a number of different <div>'s. Currently, the page is set up to have two initial questions that are always visible. The first question asks the user to select from 9 checkboxes and the second asks to choose between 7 radio buttons. Choosing both calls on an onclick javascript event called setup page. This is where I need the help. There are currently 25 hidden <div>'s on the page. The premise is that, depending on your answers to the first two questions, some of those 25 divs become visible for the user to answer those questions only. Currently, when that setup page onclick event is called, the setup page function goes through each of the 25 questions and says Code: pseudocode: if q1_a.checked || q1_b.checked && q2_a.checked, show question 3 div if q1_c.checked && q2_b.checked, show question 4 div etc... I'm thinking there's got to be a better way. This page is becoming unruly and hard to troubleshoot with so much javascript/variables. I was thinking about using case statements but with so many variable options between those two first questions I think there would be too many cases. Any suggestions on another way I can go about this? Thanks!! Similar TutorialsI need to create javascript that will create the ringup line (see code) based on accomodation selections. If they chose Wednesday as arrival and depart Thursday they will get the breakdown_wed_supplement value. If they arrive Wednesday and depart later than Thursday they will get charged for Wed and Thursday and finally if they arrive Thursday, they will get charge for Thursday. The Friday - Sunday values are working, but I can't get the Wed/Thurs to work. They were written by someone else and were working, but I needed to change it for the Thursday departure. I am really new to javascript and haven't got a clue where I went wrong. Code: if (getControlValue(form.accommodation)==="Yes") { if (getControlValue(form.occupancy)==="Single") { total.ringup(conferencePrices.lodgingFeeConference,'Conference lodging for single person, Friday through Sunday','breakdown_lodging'); } else if (getControlValue(form.occupancy)==="Double") { total.ringup(conferencePrices.lodgingFeeConferenceRoommate,'Conference lodging with roommate, Friday through Sunday','breakdown_lodging'); } if (form.arrivedate.selectedIndex===1 && form.departdate.selectedIndex===2) { if (getControlValue(form.roommate)==="Assign" || form.rm_arrive.selectedIndex===1 && form.rm_depart.selectedIndex===2) { total.ringup(conferencePrices.lodgingFeeNightlyRoommate,'Wednesday pre-conference lodging, with roommate','breakdown_wed_supplement'); } else { total.ringup(conferencePrices.lodgingFeeNightly,'Wednesday pre-conference lodging, single person','breakdown_wed_supplement'); } } if (form.arrivedate.selectedIndex===1 && form.departdate.selectedIndex===>2) { if (getControlValue(form.roommate)==="Assign" || form.rm_arrive.selectedIndex===1 && form.rm_depart.selectedIndex===>2) { total.ringup(conferencePrices.lodgingFeeNightlyRoommate,'Thursday pre-conference lodging, with roommate','breakdown_thurs_supplement'); total.ringup(conferencePrices.lodgingFeeNightlyRoommate,'Wednesday pre-conference lodging, with roommate','breakdown_wed_supplement'); } else { total.ringup(conferencePrices.lodgingFeeNightly,'Thursday pre-conference lodging, single person','breakdown_thurs_supplement'); total.ringup(conferencePrices.lodgingFeeNightly,'Wednesday pre-conference lodging, single person','breakdown_wed_supplement'); } } if (form.arrivedate.selectedIndex===2) { if (getControlValue(form.roommate)==="Assign" form.rm_arrive.selectedIndex===2) { total.ringup(conferencePrices.lodgingFeeNightlyRoommate,'Thursday pre-conference lodging, with roommate','breakdown_thurs_supplement'); } else { total.ringup(conferencePrices.lodgingFeeNightly,'Thursday pre-conference lodging, single person','breakdown_thurs_supplement'); } } } how could i save radio buttons choices especially when i have many groups of radio buttons. i mean when refreshing the page they stay as they are.
im trying to add the following numbers: 0+1+2+3+4. The actual answer being 10 obviously. i dont realy get why its coming out as 5 and not 10. Code: var sum = 0; for (i = 0; i < 5; i++); { sum = sum + i; } document.write("Sum is: " + sum); How can we identify logical errors from other types of errors?
I was going through LinkedIn today, when I noticed something that I couldn't figure out, logic-wise. When you search using their search feature at top left, results come up live... no big deal, easy enough, keyup, no biggie. When you click outside the input box, it disappears, which is blur. However, if you click out of the input onto the search results, it remains, and stays up until you click somewhere outside of the input box or the search results. This I have no idea how is done. Is there a way to know what element a user clicks on? Anyone have thoughts/guidance for this? I'm using jQuery as a framework if that helps? Putting some javascript into a pdf file and can't get this to work out right. Basic setup: Field X = checkbox; Field Y = numeric input field; Here's what should happen (increment is toggled): Y has a value. When X is checked, Y is increased by 5. When X is unchecked, Y goes back to its original, unmodified value. Here's what really happens (increment is subtracted): Y has a value. When X is checked, Y is reduced by 5. When X is unchecked, Y is reduced by 5 again. Anytime X is clicked on, Y is reduced by 5 yet again. Here's the code: Code: function check_box(X, Y){ if(X.checked == true){ Y.value += 5; } else { Y.value -= 5; } Any help or advice is greatly appreciated. In my previous post, I asked how to create a function that would allow me to add to or subtract from a maxvalue, and thankfully I got help regarding that. However, something's got me stumped for the past few weeks that I still can't resolve... This is the relevant code: Code: <html> <head> <script type="text/javascript" language="Javascript"> function chgAdv(btn) { var form = btn.form; var newqty = parseInt(btn.value); var maxqty = form.maxqty; var maxadv = form.maxadv; if (eval("btn.checked") == true && parseInt(maxadv.value) + newqty <= 15) { var newmax = parseInt(maxqty.value) - newqty; var newadv = parseInt(maxadv.value) + newqty; } else if (eval("btn.checked") == false && parseInt(maxadv.value) - newqty >= 0) { var newmax = parseInt(maxqty.value) + newqty; var newadv = parseInt(maxadv.value) - newqty; } else { var newmax = parseInt(maxqty.value); var newadv = parseInt(maxadv.value); } if ( newadv >= 0 && newmax >= 0) { maxqty.value = newmax; maxadv.value = newadv; } } function chgDis(btn) { var form = btn.form; var newqty = parseInt(btn.value); var maxqty = form.maxqty; var maxdis = form.maxdis; if (eval("btn.checked") == true && parseInt(maxdis.value) + newqty <= 10) { var newmax = parseInt(maxqty.value) + newqty; var newdis = parseInt(maxdis.value) + newqty; } else if (eval("btn.checked") == false && parseInt(maxdis.value) - newqty >= 0) { var newmax = parseInt(maxqty.value) - newqty; var newdis = parseInt(maxdis.value) - newqty; } else { var newmax = parseInt(maxqty.value); var newdis = parseInt(maxdis.value); } if (newdis >= 0 && newmax >= 0) { maxqty.value = newmax; maxdis.value = newdis; } } </script> <link rel="stylesheet" type="text/css" href="styles.css"> </head> <body> <form name="f1"> <b>Advantages</b> (<input type="text" class="RO" name="maxadv" value="0" />)<br /> <input type="checkbox" class="RO" name="Absolute Direction" onclick="chgAdv(this);" value="2" />Absolute Direction<br /> <input type="checkbox" class="RO" name="Allies" onclick="chgAdv(this);" value="3" />Allies<br /> <hr> <b>Disadvantages</b> (<input type="text" class="RO" name="maxdis" value="0" />)<br /> <input type="checkbox" class="RO" name="Antisocial" onclick="chgDis(this);" value="2" />Antisocial<br /> <input type="checkbox" class="RO" name="Ascetic" onclick="chgDis(this);" value="4" />Ascetic<br /> max quantity: <input type="text" readonly class="RO" name="maxqty" value="40" /> </form> </body> </html> styles.css is simply: Code: input.RO { border: none; width: 40px; text-align: center; } As it stands, it works as long as the total value is less than or equal to the limit (for advantages it's 15, for disadvantages it's 10). However, the moment it goes past the limit -- for instance, if you change Antisocial's value from 2 to 7, or if you add several additional checkboxes with any values -- the whole thing starts going crazy; specifically, maxvalue doesn't revert to 40 when the all the checkboxes are unchecked. What I'd want to happen is that the user cannot select or apply advantages or disadvantages if the maximum advantage is greater than 15 or the maximum disadvantages is greater than 10. I'm thinking that a button for adding disadvantage points to/subtracting advantage points from the maxvalue (that becomes disabled if the user goes past his limit on advantages/disadvantages) is useful at this point, but I'm really stumped on the implementation of the idea. An alternate idea of mine is that all other advantage/disadvantage checkboxes would become disabled if their value is greater than the remaining number of points, but I don't know how that is possible either. Any and all help is greatly appreciated. was wondering if it made sense to optimize the comparison order inside an if() statement if one of the comparison targets is a function call eg: Code: var a = true, b = function() {return false;}; if (b() || a) {...} if (a || b()) {...} would the second statement run faster because it would theoretically never need to call b() in this situation? can the eval order be relied on? does this depend on the js engine/internal optimizations? thanks, Leon Hello all, As this is an active javascript programming forum...i'm really hoping i'll get a solution for my problem...please help me out.... I have a html: text inside a logic:iterate block like this.. <logic:iterate name="AllocationsForm" property="newSearchAllocations" id="allocations" indexId="myindex" > <html:text name="allocations" property="newStartDate" indexed="true" onblur="allocationTest(this, " + myindex + ");" /> </logic:iterate> i want to write a onblur event for this text field inorder to validate it. Is it the correct way i wrote or something i need to make a change in the above code inorder for the javascript to work. Can we really able to write a onblur event for a indexed text field that is inside a logic:iterate block. please let me know. Thanks in advance. Hey there. I'm creating my web-site now. I'm planing to have some slide/object change by itself. I know Java Script perform this task. I have get the code and apply to the image I want. It works. My idea is each of my image upper left corner have the representative number of the slide. When the slide1 go to slide 2 automatically, the number will change colour from 1 to 2. When the user click the number, the slide will change according to the number. Let said I have 3 slide. Each slide and have no 1 ,2 ,3 move forward, move backward icon on the upper left corner. I have slide1 ,slide2, slide3 change by itself within 2.5 second. When the user go thru slide 1, slide 2 and till slide3, user find out he/she interested on slide 1 and by clicking 1 on the upper left corner, the slide will change back to slide 1. Something like showing on the home page at www.easyjet.com.EN or http://www.thomascook.com/ . Both home page show a slide. This is what exactly I want. I learn HTML code before but not Java Script. I have borrow many Java Script reference book. but no idea how to inside the number on the upper left corner on each slide and how the number work accordingly with the slide. So sorry if you can't understand what I was talking about. But, anyone who understand me or have any idea how can I mortify the Java script to what I want. Just answer or email me to trista_soo@yahoo.com or facebook me on sym107@hotmail.com. Thanks for your time and efforts. Your help I really appreciate. Cheers! Hi, I am using a wordpress jquery based plugin. TheThe Sliding panels. You can see the jquery he - http://www.get-me-heard.com/wp-conte...jquery.ttsp.js The panel currently auto-opens when the page loads. Which is what I want, however I would like it so that once a user has clicked to close the panel, for it to stay closed even when navigating pages, until they decide to click open again. I would also need the cookie flushed when they leave the website so that the next time they return the panels auto open again. Essentially I just dont want the users to have to click close every time they navigate throughout the website if they don't want to see the panels. NOTE: The plugin has several panels which you can choose from. I am only using the left panel and the right panel. They are all controlled within the jquery. Thanks! I don't understand the logic of Break, Return False, Return True. It was never really covered in our college class, and I see everyone using it. I got an A in the class, if that 'proves' that I really tried to apply myself. NOTE: I understand what the function is doing. I just don't understand WHEN to use break, return false or return true if the the translator can determine the conditional statements. PHP Code: function submitForm(){ var ageSelected = false; for (var i=0; i<5; ++1){ if (document.forms[0].ageGroup[i].checked == true) { ageSelected = true; break; } } if (ageSelected == false){ window.alert("You must select your age group"); return false; } else return false; } if the the translator can determine the conditional statements, why not write it like this: PHP Code: function submitForm(){ var ageSelected = false; for (var i=0; i<5; ++1){ if (document.forms[0].ageGroup[i].checked == true) { ageSelected = true; break; // what's the point for the 'break'? Won't the rest of the code be ignored since it passed the first condition? } } if (ageSelected == false){ window.alert("You must select your age group"); return false; } // why not leave the last else out? is it just a 'safety' catch, in case something other than true or false is inputted? else return false; // what's the point? } Questions: Why use return true, if the translator knows it's ture? Why use "return false" if the translator knows it's false and the alert window has already gone up? why not use "break" to stop the code? Why use the "return false" at the end "else" statement? I am supposed to create a calendar and have the calendar show up in the top right of the screen while also highlighting the current date set on it. Nothing shows up... HTM: Code: <?xml version="1.0" encoding="UTF-8" ?> <!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"> <!-- New Perspectives on JavaScript, 2nd Edition Tutorial 3 Tutorial Case The Chamberlain Civic Center Author: Date: Filename: ccc.htm Supporting files: back.jpg, calendar.css, calendar.js, ccc.css, ccc.jpg, logo.gif --> <title>The Chamberlain Civic Center</title> <link href="ccc.css" rel="stylesheet" type="text/css" /> <link href="calendar.css" rel="stylesheet" type="text/css" /> <script src="calendar.js" type="text/javascript"></script> </head> <body> <div id="head"> <script type="text/javascript"> calendar("March 25, 2011"); </script> <img src="ccc.jpg" alt="Chamberlain Civic Center" /> </div> <div id="links"> <table><tr> <td><a href="#">Home</a></td><td><a href="#">Tickets</a></td> <td><a href="#">Events</a></td><td><a href="#">Tour</a></td> <td><a href="#">Directions</a></td><td><a href="#">Hours</a></td> <td><a href="#">Packages</a></td><td><a href="#">Contact Us</a></td> </tr></table> </div> <div id="main"> <p id="firstp"><img src="photo.jpg" alt="" />March is another banner month at the Chamberlain Civic Center, with performances of the award-winning musical, <span>The Producers</span> by the Broadway Touring Company on March 4, 5, and 6. Tickets are going fast, so order yours today.</p> <p>Celebrate the season on March 11 with the Chamberlain Symphony and their special selection of classical music with Spring themes. The next day, March 12, exercise your mind by attending the Charles Dickens mystery <span>Edwin Drood</span>.</p> <p>Jazz lovers have a lot to celebrate in March with a visit from <span>The Jazz Masters</span> on the 17th. Then on March 24, enjoy the music of The Duke with <span>An Ellington Tribute</span> performed by the Jazz Company of Kansas City.</p> <p>Pins, bottles, plates, and chairs are flying at the Chamberlain Civic Center in March. <span>The Taiwan Acrobats</span> return with another amazing performance on Sunday, March 13. On March 20, the <span>Madtown Jugglers</span> get into the act with their unique blend of comedy, juggling, and madness.</p> <p>Enjoy a classical brunch every Sunday afternoon with music provided by the Carson Quartet. Seating is limited, so please reserve your table.</p> </div> <address> The Chamberlain Civic Center · 2011 Canyon Drive · Chamberlain, SD 57325 · (800) 555-8741 </address> </body> </html> Java Code: /* New Perspectives on JavaScript, 2nd Edition Tutorial 3 Tutorial Case Author: Date: Function List: calendar(calendarDay) Creates the calendar table for the month specified in the calendarDay parameter. The current date is highlighted in the table. writeCalTitle(calendarDay) Writes the title row in the calendar table writeDayTitle() Writes the weekday title rows in the calendar table daysInMonth(calendarDay) Returns the number of days in the month from calendarDay writeCalDays(calendarDay) Writes the daily rows in the calendar table, highlighting calendarDay */ function calendar(calendarDay) { if (calendarDay == null) calDate=new Date() else calDate = new Date(calendarDay); document.write("<table id='calendar_table'>"); writeCalTitle(calDate); writeDayNames(); writeCalDays(calDate); document.write("</table>"); } function writeCalTitle(calendarDay) { var monthName = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "Octoboer", "November", "December"); var thisMonth=calendarDay.getMonth(); var thisYear=calendarDay.getFullYear(); document.write("<tr>"); document.write("<th id='calendar_head' colspan='7'>"); document.write(monthName[thisMonth]+" "+thisYear); document.write("</th>"); document.write("</tr>"); } function writeDayNames() { var dayName = new Array ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"); document.write("<tr>"); for (var i=0; i < dayName.length; i++) { document.write("<th class='calendar_weekdays'> "+dayName[i]+"</th>"); } document.write("</tr>"); } function daysInMonth(calendarDay) { var thisYear = calendarDay.getFullYear(); var thisMonth = calendarDay.getMonth(); var dayCount = new Array (31,28,31,30,31,30,31,31,30,31,30,31); if (thisYear % 4 == 0) { if ((thisYear % 100 != 0) || (thisYear % 400 == 0)) { dayCount[1] = 29; } } return dayCount[thisMonth]; } function writeCalDays(calendarDay) { var currentDay = calendarDay.getDate(); var dayCount = 1; var totalDays = daysInMonth(calendarDay); calendarDay.setDate(1); var weekDay = calendarDay.getDay(); document.write("<tr>"); for (var i=0; i < weekDay; i++) { document.write("<td></td>"); } while (dayCount <= totalDays) { if (weekDay == 0) document.write("<tr>"); if (dayCount == currentDay) { document.write("<td class='calendar_dates' id='calendar_today'>"+dayCount+"</td>"); } else { document.write("<td class='calendar_dates'>"+dayCount+"</td>"); } if (weekDay == 6) document.write("</tr>"); dayCount++; calendarDay.setDate(dayCount); weekDay = calendarDay.getDay(); } document.write("</tr>"); } CSS (calendar) Code: /* New Perspectives on JavaScript, 2nd Edition Tutorial 3 Tutorial Case Filename: calendar.css This file contains styles applied to the calendar table */ #calendar_table {float: right; background-color: white; font-size: 9pt; font-family: Arial, Helvetica, sans-serif; border-style: outset; border-width: 5px; margin: 0px 0px 5px 5px} #calendar_head {background-color: rgb(223,29,29); color: ivory; letter-spacing: 2px} .calendar_weekdays {width: 30px; font-size: 10pt; border-bottom-style: solid} .calendar_dates {text-align: center; background-color: white} #calendar_today {font-weight: bold; color: rgb(223,29,29); background-color: ivory; border: 1px solid black} CSS (page) Code: /* New Perspectives on JavaScript, 2nd Edition Tutorial 3 Tutorial Case Filename: ccc.css This file contains styles used in the ccc.htm file */ body {margin: 0px; background: white url(back.jpg) repeat-y scroll 820px 0px} #head {width: 750px; height: 150px; padding: 5px} #links {clear: right; width: 750px; padding: 0px} #links table {width: 750px; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; margin: 0px} #links table td {text-align: center; background-color: white; border: 1px solid black; letter-spacing: 5; padding: 2px} #links table a {text-decoration: none; color: rgb(223,29,29); width: 100%} #links table a:hover {color: white; background-color: rgb(223,29,29)} #main {width: 750px; font-family: Arial, Helvetica, sans-serif; padding: 10px} #main p {text-align: justify; font-size: 9pt} #firstp:first-line {font-variant: small-caps} #main img {float: right; margin: 0px 0px 10px 10px} #main p span {color: rgb(223,29,29)} address {width: 750px; font-size: 8pt; font-style: normal; color: rgb(223,29,29); font-family: Arial, Helvetica, sans-serif; text-align: center; border-top: 1px solid rgb(223,29,29); padding-bottom: 10px} Can anyone see something wrong? This is really frustrating me as I'm not very good with javascript but thought I did this one right... thanks this problem has been solved
The alert at the top of this function will not show... Code: function getXmlHttpRequestObject() { alert("HTTP XML REQUEST!"); var httpxml; if (window.XMLHttpRequest) { // code decent browsers like Firefox, Chrome, Opera, Safari. And IE7+... httpxml = new XMLHttpRequest(); return httpxml; } else { if (window.ActiveXObject) { //Code for crap like IE httpxml = new ActiveXObject('Microsoft.XMLHTTP'); return httpxml; } else { httpxml = null; } } if (httpxml == null) { document.getElementById('p_status').innerHTML = "Status: Could not create XmlHttpRequest Object, please upgrade your browser!"; return null; } else { return httpxml; } i've been having some trouble with showing images and i think it's a problem with the image source, i would like to know how i must alter my code to fix this thnx. i should also point out that the images are the 6 sides of a dice Code: <html> <head> <title>My Script</title> <script type = "text/javascript"> if (document.images) { image1 = new Image(10,10); image1.source = "d1.gif"; image2 = new Image(10,10); image2.source = "d2.gif"; image3 = new Image(10,10); image3.source = "d3.gif"; image4 = new Image(10,10); image4.source = "d4.gif"; image5 = new Image(10,10); image5.source = "d5.gif"; image6 = new Image(10,10); image6.source = "d6.gif"; } alert(image1); alert(image2); alert(image3); alert(image4); alert(image5); alert(image6); </script> </head> <body> </body> </html> i am having some problem showing and hiding some div i want to show the div with the id="universitiesDiv" on one point and the div id="highSchoolsDiv" on another depending on the user choice of selected option. Code: function Show (titleImg){ // the id of the content element from the id of the title element var contentID = titleImg.id.replace (/title/, "content"); var contentDiv = document.getElementById (contentID); contentDiv.style.display = "block"; return false; } function Hide (titleImg){ // the id of the content element from the id of the title element var contentID = titleImg.id.replace (/title/, "content"); var contentDiv = document.getElementById (contentID); contentDiv.style.display = "none"; return false; } the functions work fine i have tested them on input type="checkbox" and they work fine Code: <select name="education" id="education" onfocus="Show(this.options[this.selectedIndex].value);"> <option selected value="00">-الرجاء الاختيار-</option> <option value="highSchoolsDiv">مدرسة ثانوية</option> <option value="universitiesDiv"> كلية </option> <option value="universitiesDiv">درجة البكالوريوس</option> <option value="universitiesDiv">درجة عليا</option> <option value="universitiesDiv">دكتوراه / ما بعد الدكتوراه</option> <option value="07">اسألني فيما بعد</option> </select> </span> </div> </td></tr></table> </div> <div> <div class="Left"></div> <table class="step2" ><tr><td> <div class="Right"> <div class="Inner" id="Inner"> <div id="universitiesDiv" class="Row innerError" style="display:none;"> <div class="Left"> <label for="universities">الجامعة / الكلية</label></div> <div class="Right"> <input type="text" name="universities" id="universities" class="text" autocomplete="off" onfocus="focusInput(this);" onchange=" validate_JoinPersonalInfoForm_universities();" onblur="blurInput(this); validate_JoinPersonalInfoForm_universities();" size="55"/> </div> </td></tr><tr><td> </div> <div id="highSchoolsDiv" class="Row innerError" style="display:none;"> <div class="Left"> <label for="high_schools">المدرسة الثانوية</label></div> <div class="Right"> <input type="text" name="high_schools" id="high_schools" class="text" autocomplete="off" onfocus="focusInput(this);" onchange=" validate_JoinPersonalInfoForm_high_schools();" onblur="blurInput(this); validate_JoinPersonalInfoForm_high_schools();" size="55"/> </div> </div> </div> </div> </td></tr></table> </div> here is doesn't do nothing i have tried onblur onfocus onchange onselect everything i even tried then in side the option <option onselect... !!!!! anyone can help me, that would be great thanks Hi, I have the following codes but my checkbox is not appearing. The values of the checkbox do print out in the alert. Can anyone tell me what is wrong with it? Thank you! Code: var table = document.getElementById('maintable'); var i; // iterator var item; // pointer to item in received list for(i = 0; (item = contacts.ReturnValue.getNext()) != undefined; ++i) { table.insertRow(i + 1); var result = "<td>"; if(item.FirstName != undefined) { result += item.FirstName.Value; } result += "</td><td>"; if(item.LastName != undefined) { result += item.LastName.Value; } result += "</td><td>"; if(item.MobilePhoneGen != undefined) { result += item.MobilePhoneGen.Value; } result += "</td><td>"; if(item.EmailGen != undefined) { result += item.EmailGen.Value; } var td1 = document.createElement("td"); var chkbox = document.createElement('input'); chkbox.type='Checkbox'; table.rows[i + 1].innerHTML = result; chkbox.value=item.MobilePhoneGen.Value; td1.appendChild(chkbox); alert(chkbox.value); } I have 1 html page and 1 flash object on it when i click on that flash object than a image should b appear and flash object will hide when i click on that image than flash object should b appear and image will hide the page should b same no other pages can i do this using javascript? if yes than please send the code |