HTML - Getting The Different Output In Firfox And Ie
I don't know what is going wrong with this code.
Showing well formatted in IE but not in firefox <ol start="1" style="font-size: 10pt; font-family: Arial; margin-left:50px; " type="1"> <li> <p style="font-size: 10pt; font-family: Arial; margin-left: 50px;padding-left:-5px;">text1 </li> <li> <p style="font-size: 10pt; font-family: Arial; margin-left: 50px;">text2</li> <li><p style="font-size: 10pt; font-family: Arial; margin-left: 50px;"> text3</li> </ol> Similar TutorialsHi, i've recently designed a website using IE as my previewer, so I got it looking good in IE. then I viewd it in Firefox and it lookud disgusting with things out of place everywhere??? the web address is www.echothevoiceofgod.com I fixed most of the problems that Firefox was making but the only thing that I can't fix is that Firefox is cutting the side of the menu????? is there any way I could make it appear correct in both browsers?? thanks for any suggestions Emmanuel <HTML> <HEAD> <TITLE> Jogging Summary </TITLE> <LINK REL="stylesheet" TYPE="text/css" HREF="tma03.css"> <SCRIPT LANGUAGE = "JavaScript"> //days of the week var dayArray = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri','Sat', 'Sun']; //date of a sample week var weekBeginning = '12 July 2010' //distance in kilometres run each day in the sample week var distanceArray = [2,4,2,1,5,4,3]; //Part (i) //Add code to display a heading, then a blank line, // then the information for each of the seven days. document.write('Summary for week beginning 12 July 2010'+ '<BR>'); document.write('<BR>'); for (var day = 6; day < dayArray.length; day = day +1 ) { document.write('Mon ' + - + '2'+ 'km' + '<BR>'); document.write('Tue ' + - + '4'+ 'km' + '<BR>'); document.write('Wed ' + - + '2'+ 'km' + '<BR>'); document.write('Thu ' + - + '1'+ 'km' + '<BR>'); document.write('Fri ' + - + '5'+ 'km' + '<BR>'); document.write('Sat ' + - + '4'+ 'km' + '<BR>'); document.write('Sun ' + - + '3'+ 'kn' + '<BR>'); document.write('<BR>'); } //Variable to hold the maximum value in distance array. var maximumDistance; //Part (ii) //Add code to find the maximum distance. maximumDistanceindex = 0; for (var distance = 0;distance<distanceArray.length ; distance = distance + 1 ) { if (distanceArray[day] > distanceArray[maximumDistanceindex]) { maximumDistanceindex = day; } } //Part (iv) //Add code that will write out the maximum distance and the days it was run on in a suitable message. document.write('The maximum distance was '+ maximumDistanceindex + ' km ' + 'run on ' + dayArray[maximumDistanceindex]); </SCRIPT> </HEAD> <BODY> </BODY> </HTML> Can anyone help me with this i can not find out how to output the correct maximum distance please? think i've cracked it. <HTML> <HEAD> <TITLE> Jogging Summary </TITLE> <LINK REL="stylesheet" TYPE="text/css" HREF="tma03.css"> <SCRIPT LANGUAGE = "JavaScript"> /* * M150 TMA03 2010J Q3. * Program to analyse the distances run by a jogger each day over the course of a week. */ //days of the week var dayArray = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri','Sat', 'Sun']; //date of a sample week var weekBeginning = '12 July 2010' //distance in kilometres run each day in the sample week var distanceArray = [2,4,2,1,5,4,3]; //second sample week //Part (v) uncomment the next two lines. //weekBeginning = '19 July 2010' //distanceArray = [2,6,3,1,6,4,2]; //Part (i) //Add code to display a heading, then a blank line, // then the information for each of the seven days. document.write('Summary for week beginning '+ weekBeginning + '<BR>'); document.write('<BR>'); for (var day = 6; day < dayArray.length; day = day +1 ) { document.write('Mon ' + - + '2'+ 'km' + '<BR>'); document.write('Tue ' + - + '4'+ 'km' + '<BR>'); document.write('Wed ' + - + '2'+ 'km' + '<BR>'); document.write('Thu ' + - + '1'+ 'km' + '<BR>'); document.write('Fri ' + - + '5'+ 'km' + '<BR>'); document.write('Sat ' + - + '4'+ 'km' + '<BR>'); document.write('Sun ' + - + '3'+ 'kn' + '<BR>'); document.write('<BR>'); } //Variable to hold the maximum value in distance array. var maximumDistance; //Part (ii) //Add code to find the maximum distance. maximumDistance = distanceArray[0]; for (var day = 1; day < distanceArray.length ; day = day + 1 ) { if (distanceArray[day] > distanceArray[maximumDistance]) { maximumDistance = day; } } //Part (iv) //Add code that will write out the maximum distance and the days it was run on in a suitable message. document.write('The maximum distance was '+ distanceArray[maximumDistance] + ' km ' + 'run on ' + dayArray[maximumDistance]); </SCRIPT> </HEAD> <BODY> </BODY> </HTML> Seems to work mostly anyway. Here is my link http : // 173 dot 45 dot 229 dot 122 / phpBB3 / (without spaces) I give this url and check for validation I get sum 41 errors. - This is one way I do View Source and check for validation I get 103 errors - This is another way Why do I get different results like this? Am using a PHPBB3 thats a CMS kind application where 80% would be driven by default phpbb3 itself 20% is my work.... what to do for this kind of site???? am depressed Any solutions? Hi everyone , my boss asked me to make our email address in our webpage and change it to a picture because of spammers. (cant copy and paste)Is there an easy way to do this because I am trying to create a gif in photoshop but it is not displaying exactly the same way that it looks now. At the bottom of www.meshoxford.com their is a link for email I want to to be an image file that looks just like the current page info@meshoxford.com Is there a way dreamweaver can make this easy? I have a series of checkboxes and the user can check one or more of them. When I display their submission back to them for verification, I want to display only those which have been checked. I have a form processor (FormProcessorPro) and they tell me that they can't guarantee that PHP code will parse correctly. And they're correct, it isn't parsing correctly - unless I'm missing something. Here's an example of what I'm trying to do: <?php $blmc = "[blmc-gp]"; // [blmc-gp] FPPro's access to field names if ($blmc == "YES") { echo "<tr>"; echo "<td align="right" class="maintext">General Pastor :: </td>"; echo "<td><font size="2">[blmc-gp]</font></td>; echo "</tr>"; } ?> First question, should the above work in suppressing the table row if the checkbox hasn't been checked? Second question, is there a way in pure HTML (no PHP, PERL or JAVA) to accomplish my goal of suppressing any table rows where the checkbox hasn't been checked? Thank you, Roy Hi all! im hoping someone here can help me. i got refurred by a friend. basicly i have an order form witch has a number of selection boxes. and on POST, the selected options are divided and calulated in javascript. id like to add a realtime output box wich calclulates the options and outputs the new value, a price calculator. i can do it in PHP but the page has to be Submitted for it to output. thats not what im after. my javascript code is very simple Code: { form.totalprice.value = ((Number(form.price.value) * Number(form.cfgplayers.value)) + Number(form. cfgbranded.value) + Number(form.cfgsrctv.value)); return (true); } here is an example of it item price is form.price.value then * by the Quantity (form.cfgplayers) and it adds on what ever value option cfgsrctv and cfgbranded have. i really need help to make these boxes calculate a realtime value (total cost of order) If anyone is confused because of my bad example please say so, any help is appreciated! Thanks in Advance. I was learing HTML from w3schools.com. It says something about Computer Output tags. it just says <code>Computer code </code> <br> <kbd>Keyboard input</kbd> <br> <tt>Teletype text</tt> <br> <samp>Sample text</samp> <br> <var>Computer variable</var> <br> Does not say enything else about that. What are they?and where are they used?. can anybody explain with example. I am using PHP to generate the headers to output a PDF file. The PDF file on every browser (IE, FF, Saf) exports with no content (0 bytes) whether it is opened or saved. This works correctly on my local development machine, but not on the actual server. The server requires credentials to access it, so I can't provide a link for demonstration. <? if( $format == 'csv' ) { header( 'Content-type: text/csv' ); header( "Content-Disposition: attachment; filename=\"Report Export.csv\"" ); include "userfiles/$loginid.csv"; } if( $format == 'pdf' ) { header( 'Content-type: application/pdf' ); header( "Content-Disposition: attachment; filename=\"Report Export.pdf\"" ); include "userfiles/$loginid.pdf"; } ?> Basically the referring page determines what format the user is requesting. "$loginid" is a cookie with the user's ID, so the system can locate that users specific file in the 'userfiles' directory. The CSV outputs perfectly. (exact same code with respective formats changed) I've validated that the PDF file is in the directory and does have content. The PDF content does export to file when attached to an email sent by the server. Any help is appreciated. I have a theory this may be an issue with the server configuration... Hello All, I'm working in SAP . I've a HTML File in my SAP Server. The content of that file is in Spanish. When I see the output of it from my SAP Server it's correct. But when I import that file in my SAP ABAP Program and then chk the output then I'm getting some junk values in it. I guess this is a UNICODE Problem. Request you guys to help me out ! Regards, Sandy. I have a form where a user makes selections from selection lists. As they make selections a counter displayed in the form keeps them up to date with how many selection they have made. To display this counter I have been using an input box as follows; <input type="text" id="counter" name="counter" value="0" size="2" /> A JavaScript function updates the value of this input box every time the user makes another selection from any selection list on the form. The JavaScript funtion is called from the selection lists' attribute declaration as follows; onchange="calllFunction()" However I feel the input box is not the right element to use to display the counter's value. An input box does the job but it allows the user to enter stuff in it, and I don't want this to be allowed. Any suggestions? Hi Can someone help or advise me I am after a piece of code that will show a search box, which will display two different results depending on what is entered into the search. If someone was to enter one of my selected keywords a successful message appears. But if any other word is enter a nun-successful message appears. I think what i am after is some kind of "form"?? but have search lots of sites with little success. The search does Not need to email or add information to any files, just dispaly a succsessfull or un-successful message result. thanks Hi Guys, I am building a website for a client, and I have included a contact form on the website. It turns out that they would prefer it if the form could be printed out instead of emailed. All I have is 3 fields, and I want them to output to a page where they can print directly. The design of the output page will be minimal as in the end the forms will be faxed to a number. Is there some way I can do this with HTML? Or is advanced language needed? Cheers LTC Hi I am trying to make this pop up effect pass the W3C validation test This is the page in question: http://www.newmedia.lincoln.ac.uk/je...sts/popup.html This is a direct link to the W3C XHTML Validation results: http://validator.w3.org/check?verbos...s%2Fpopup.html Please can someone help? Hi guys.. I currently have a php file that will take information from my phpbb forum and post it on the main section of my joomla website. What I want it to do, works. I just can't get it to look the way I want it to. Here's the code: Quote: { echo "</a><li><strong>Forum</strong> <a href=\"".$urlPath."/viewforum.php?f=".$row['forum_id']."\">".$row["forum_name"]."</a><strong> Thread</strong> <a href=\"".$urlPath."/viewtopic.php?p=".$row['post_id']."#".$row['post_id']."\">".$row["topic_title"]."</a> by <a href=\"".$urlPath."/profile.php?mode=viewprofile&u=".$row['user_id']."\">".$row['username']."</li>"; } it currently looks like this: http://img260.imageshack.us/img260/9721/faramdx8.png as you see, I would like FORUM to be in one column, THREAD in another, and author in another column. Aligned to center. I was hoping to get something like this: it's in spanish but I guess you can get the idea. Mainly I would love to have the php output in columns, that's my main concern. But it would be nice to have the different kind of colors for each line. Like Dark gray, next light gray, etc. Well anyways.. If somebody knows how to do this and is willing to help me out, I'd very much appreciate it http://img241.imageshack.us/img241/4821/19744730zr5.png Hi I need my html page to display button which once pressing it. It will perform ssh to a unix server and display continues log information on a text box or list box or other suggestion on the page Thanks Dan Hi All, I'm trying to create an information page with HTML whereby people can find an address of a store based on the conditional dropdown boxes selected. Based on the choices selected, it would display the results. E.g. Dropdown 1: Select State Dropdown 2: Select Retail Store Output: Address of the retail store (displayed on the same page) I came across a solution in one of the threads for making multiple conditional dropdowns for a form. The code given works extremely well but I'm not sure how to have a text output result on the same page. Can anyone help? Thanks a bunch in advance! HTML Code: <script type="text/javascript"> // Place in this array the ID of the element you want to hide var hide=['the_minutemen','Planet_Smashers','crass','Madonna', 'the_misfits','next','id2']; function setOpt() { resetOpt(); // Call the resetOpt function. Hide some elements in the "hide" array. for(var i=0,sel=document.getElementsByTagName('select');i<sel.length;i++) { sel[i].onchange=function() { if(this.parentNode.tagName.toLowerCase()!='div') resetOpt(); // Hides the elements in "hide" array when the first select element is choosen try { document.getElementById(this.value).style.display=''; } catch(e){} ; // When the value of the element is not an element ID } } } window.addEventListener?window.addEventListener('load',setOpt,false): window.attachEvent('onload',setOpt); function resetOpt() { for(var i=0;i<hide.length;i++) document.getElementById(hide[i]).style.display='none'; // Hide the elements in "hide" array } </script> Artist: <select> <option value="the_minutemen">The Minutemen</option> <option value="Planet_Smashers">Planet Smashers</option> <option value="crass">Crass</option> <option value="Madonna">Madonna</option> <option value="the_misfits">The Misfits</option> </select> <div id="the_minutemen"> The Minutemen Album: <select> <option value="album">The Minutemen album1</option> <option value="next">Show next 'select' element</option> <option value="album">The Minutemen album3</option> <option value="album">The Minutemen album4</option> <option value="album">The Minutemen album5</option> </select> </div> <div id="Planet_Smashers"> Planet Smashers Album: <select> <option value="album">The Planet Smashers album1</option> <option value="id2">Show element with the id of 'id2'</option> <option value="album">The Planet Smashers album3</option> <option value="album">The Planet Smashers album4</option> <option value="album">The Planet Smashers album5</option> </select> </div> <div id="crass"> Crass Album: <select> <option value="album">Crass Album1</option> <option value="next">Show next 'select' element</option> <option value="album">Crass Album3</option> <option value="album">Crass Album4</option> <option value="album">Crass Album5</option> </select> </div> <div id="Madonna"> Madonna Album: <select> <option value="album">madonna Album1</option> <option value="id2">Show element with the id of 'id2'</option> <option value="album">madonna Album3</option> <option value="album">madonna Album4</option> <option value="album">madonna Album5</option> </select> </div> <div id="the_misfits"> The Misfits Album: <select> <option value="album">the_misfits Album1</option> <option value="album">the_misfits Album2</option> <option value="album">the_misfits Album3</option> <option value="id2">Show element with the id of 'id2'</option> <option value="album">the_misfits Album5</option> </select> </div> <div id="id2"> Element with an ID of "id2" <select> <option>Opt1</option> <option>Opt2</option> <option>Opt3</option> </select> </div> <div id="next"> "Next" element <select> <option>Opt1</option> <option>Opt2</option> <option>Opt3</option> </select> </div> //Html code <html> <head> <script language="javascript"> function abc() { var fname=document.myform.fno.value; if(fname==""||fname==null) { alert("Name Field is blank"); return false; } output(); } function output() { alert("Output Section"); var name=document.myform.fno.value; document.getElementById('name').innerHTML=name; var vehobj=document.myform.vehicle; var vehchecked=[]; var numberofoptions=vehobj.length; for(k=0;k<numberofoptions;k++) { if(vehobj[k].selected==true) { vehchecked[k]=vehobj[k].value; } } var vehicles=vehchecked.join(" "); document.getElementById('veh').innerHTML=vehicles; var fruity=document.myform.fruit; var fru=[]; var fruit_total=""; for( i=0;i<fruity.length;i++) { if(fruity[i].type=="checkbox") { if(fruity[i].checked) { //fru.push(fruity[i].value); fruit_total+=fruity[i].value+" "; } } } document.getElementById('fruity').innerHTML=fruit_total; alert("Ends"); } </script> </head> <body> <form name="myform" onsubmit=" return abc()"> <br><br><br><br><br><br> Name : <input type="text" name="fno" maxlength=20/><br><br> Phone Number :<input type="text" name="pno" maxlength=10/><br><br> Email : <input type="text" name="email" maxlength=20/> Address : <textarea name="address" maxlength=200></textarea> <br><br> Vehicle: <select name="vehicle" multiple="multiple"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> <br><br> Fruits you like<br> Mango:<input type="checkbox" name="fruit" value="mango"><br> Grapes:<input type="checkbox" name="fruit" value="grapes"><br> Apple:<input type="checkbox" name="fruit" value="apple"><br><br> <input type="submit" value="submit" /> </form> <br><br><!-- Click to get output<input type="button" value="Click" onclick="output()"/> --> <h2>Output</h2> Name : <b id="name"></b><br> Phone Number :<b>8825247455</b><br> Email :<b>y_j@gmail.com</b><br> Address :<b>Akshay Flat no 22,Linking road,Mumbai</b><br> Vehicle :<b id="veh"></b><br> Fruits :<b id="fruity"></b><br> </body> </html> ************************************************* I am learning javascript this is just a practicing code. What i want is as soon as validation part is over next function must be called up and o/p must be printed at the ends. It works but as final line of output method executes the data disappear from output. Please help me to resolve this issue. How do I hide the field names in the output from a form in email ? ex. Name. I want just the persons name to appear, not proceeded by the word name. Hi all, for some reason when I delete the comments from my code, it runs differently than when the comments are in there. I want a green horizontal navigation bar to appear at the top of the page, and when the comments are in there, my ul list is in default style. Can anyone figure out why this is happening? Thanks so much in advance. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <!-- head section contains general page attributes --> <title> Navigation </title> <!-- Title (on tab) says "Navigation" --> <style type="text/css"> <!-- Use css style --> <!-- navbar is the tag of the main navigation bar, ul means it's an unordered list --> #navbar ul { <!-- Attributes of main bar --> height: 30px; margin: 0; padding: 0; list-style-type: none; text-align: center; <!-- Alignment of links in horizontal bar --> background-color: #009966; <!-- Color of main bar --> } #navbar ul li { <!-- Attributes of list --> display: inline; <!-- Display list elements horizontally --> float: left; } #navbar ul li a { <!-- Attributes of link boxes --> text-decoration: none; font: arial; display: block; <!-- Put each link in a block --> width: 10em; <!-- Width of each block --> height: 30px; <!-- Height of each block --> color: #FFFFFF; <!-- Color of link text --> background: #009966; <!-- Color of block --> text-align: center; } #navbar ul li a:hover { <!-- Attributes of block when hovered over --> color: #FFFFFF; background-color: #006666; } </style> </head> <body> <div id="navbar"> <ul> <li><a href="index.html">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Past Events</a></li> <li><a href="#">Videos</a></li> <li><a href="#">Articles</a></li> <li><a href="#">Links</a></li> </ul> </div> </body> </html> I am trying to make my contact page pass the W3C validation test. I have tried putting the form names (your name, your email and subject) in a p class with a defined font family and size because I think this is what W3C is telling me what to do but I still get lots of errors.. This is my form: HTML Code: <form method="post" action="contact.php">your name:<br /> <input type="text" name="name" size="19"><br />your email:<br /> <input type="text" name="email" size="19"><br />subject:<br /> <textarea rows="5" name="message" cols="30"></textarea> <br /> <input type="submit" value="submit" name="submit"> </form> Please can someone shed some light onto this? |