Jump to content

Search the Community

Showing results for tags 'html'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. Hi all, I am trying to create a web page that has a tabular layout but without using table elements. The problem I am having is that whenever I add text to any of the divs the layout changes. I am not sure why this is happening. Attached below is the code. It is a simplified version of the layout containing only the divs and plain text. I have color coded the divs so that each stands out. The two versions in this code are identical. The only difference is that the second one has the text added to it. Notice how the the divs shift downward when the text is added. Does any one have a solution to why this is happening? Thanks in advance for any help that you might be able to give me. PeteM <!doctype html> <html lang="en" > <head> <title>PAGE TITLE</title> <meta charset=“utf-8"/> <style> .content { margin: 0px auto; /*center the content all browsers except IE*/ text-align: center; /*center the content IE*/ width: 1212px; } body { background-color:yellow; } .table-one { display: table; width: 1212px; } .row-one { display: table-row; width: 1212px; } .column-one { display: table-cell; width: 256px; } .column-two { display: table-cell; width: 956px; } .image-one { height: 256px; width: 256px; background-color:red; } .image-two { height: 256px; width: 256px; background-color:green; } .image-three { height: 256px; width: 256px; background-color:purple; } .image-four { height: 256px; width: 256px; background-color:tan; } .image-five { height: 256px; width: 256px; background-color:maroon; float:right; } .top-middle { background-color:pink; width: 700px; height: 256px; } .bottom-right { width: 956px; height: 768px; background-color:blue; } </style> </head> <body> <div class="content"> <header> headerheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheader </header> <section class="table-one"><!--table--> <div class="row-one"><!--table row 1--> <div class="column-one"><!--table COL 1--> <div class="image-one"></div> <div class="image-two"></div> <div class="image-three"></div> <div class="image-four"></div> </div><!--END table COL 1--> <div class="column-two"><!--table COL 2--> <div class="image-five"></div> <div class="top-middle"></div> <div class="bottom-right"></div> </div><!--END table COL 2--> </div><!-- END table row 1--> </section><!--END table--> <footer> footerfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooter </footer> </div> <!-- END content --> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <div class="content"> <header> headerheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheaderheader </header> <section class="table-one"><!--table--> <div class="row-one"><!--table row 1--> <div class="column-one"><!--table COL 1--> <div class="image-one"></div> <div class="image-two"></div> <div class="image-three"></div> <div class="image-four"></div> </div><!--END table COL 1--> <div class="column-two"><!--table COL 2--> <div class="image-five"></div> <div class="top-middle"> Welcome to My Home on the Web!<br /> <br /> I am a Multimedia Computer Programmer and Web Designer and I am currently living in New York City.<br /> <br /> Hello to all of the visitor's to this site. It is designed to be a place to view all of my current projects.<br /> <br /> Below are links to games and multimedia projects that I have recently created... </div> <div class="bottom-right"> list item 1<br /> list item 2<br /> list item 3<br /> list item 4<br /> list item 5<br /> </div> </div><!--END table COL 2--> </div><!-- END table row 1--> </section><!--END table--> <footer> footerfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooterfooter </footer> </div> <!-- END content --> <body> </html>
  2. When I am clicking reset, the background color in select field is not changing to white. Its displaying the color of the last selected option. Please help me out with this problem. I want to remove the background color too when I am clicking reset button. Thanks in advance for your help.. <body><form><input type="reset" class="resetButton" /><select id="select" style="color: white; width:60px;"onchange="changecolor(select,value)"><option value="white" style="background-color: white; "></option><option value="red" style="background-color: red; color: white;">AB</option><option value="blue" style="background-color: blue; color: white;">BC</option><option value="green" style="background-color: green; color: white;">CD</option><option value="orange" style="background-color: orange; color: white;">DE</option></select></form></body><script>$(function(){$('.resetButton').click(function(){$(this).closest('form').find('select').each(function(){$(this)[0].selectedIndex=0;});});});</script><script language="javascript" type="text/javascript">function changecolor(id,color){id.style.backgroundColor=color;}</script>
  3. Hello Community, i have a website but its available for all monitors except 1920px everything is not in the right place i am using this code html,body { margin:0; padding:0; width:100%; border:0; font-size:100%; height:100%; font:inherit; vertical-align:baseline;} then for example i do this for the div ids #header { background-image:url(../imgs/header.png); background-size:cover;background-repeat:no-repeat; position: absolute; margin-left: 0px; margin-top: -7px;width: 100%; height: 50%; z-index: 1; } i positioned the other stuff in px for example Margin-top:500px; thats why?
  4. Hi all, what a great forum you've created. I keep reading and eventually I need your help. I'm running that site and the W3 Validator spits out some errors related to the brackets. As you see, I'm using a wordpress theme and I don't even see those brackets in my code. Now I'm wondering if you have any solutions to that which you can offer. Thanks and regards Chris
  5. Hello, new here and also sorta new to PHP and all that. I'm trying to find a way to select certain checkboxes and input that data into a database. And then at times go back and view and update the database. The checkboxes may also change at times and I do not want to go add a bunch of fields into the database just to see who's all in it. What I have so far is peoples names in a checkbox form where I can select names and submit it. It then implodes and inserts it into the database like so responders(2,4,47,56) Its not going to be a thing like responders(0,0,1,0) type thing. My format so I do not confuse people responders = row in mysql (numbers) = data in the field in my row Am I way overthinking this, or is there a very simple way to do this? Please note, the name list may update in the future as in names being added, I would like an easy way to add people without killing myself modifying my php/html files. If I lost you in anyway let me know I will see what I can do to make it not confusing.
  6. I was not sure whether this question belongs here of in the PHP forum since my problem may be with one or the other or both. I use the following html and php code to select and upload multiple files.HTML <form action="uploadFiles.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file[]" multiple="multiple"/></br> <input type="submit" name="submit[]" value="submit" /> </form> uploadFiles.php <?php if(isset($_POST['submit'])) { if ($_FILES["file[]"]["error"] > 0) { echo "Error: " . $_FILES["file[]"]["error"] . "<br>"; } else { $numFilesUploaded=count($_FILES['file']['name']); echo "No. files uploaded : ".$numFilesUploaded."<br><br>"; for ($inc=0; $inc<$numFilesUploaded; ++$inc){ echo "File " . $inc . ": " . $_FILES["file"]["name"][$inc] . "<br>"; echo "Upload: " . $_FILES["file"]["name"][$inc] . "<br>"; echo "Type: " . $_FILES["file"]["type"][$inc] . "<br>"; echo "Size: " . ($_FILES["file"]["size"][$inc] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"][$inc]; echo "<br><br>"; } } } ?> If I select 2 files, each having names of character length 8, the code works fine. However, when I select files with names of character length 32, $_POST is an empty array. What is the best way to upload multiple files where the file names may be long? I ran phpinfo() and it did indeed say "This server is protected with the Suhosin Patch 0.9.10 ..." Some people have suggested that it may be a problem with the file size. However, I never get to even try to upload files since the names are not properly passed to the PHP code if the filenames are too long. Also, I have modified /etc/php5/apache2/php.ini to allow the upload of files larger than the files I am trying to upload. Also, I do not have this problem if I shorten the names of the files I am having trouble with. Many thanks in advance for any help.
  7. Please can one of the forum moderators delete this thread. I can't see the option to delete it myself and I feel that my question is not appropriate for the HTML forum.
  8. Hello, Can anyone help? My site's homepage doesn't appear well on Internet explorer. It does fine on mozilla and chrome. Also I noticed on some netbooks/pc's it shows fine on IE and others it doesn't. Anyway here my site: http://www.post-traumata.com/ Ideas, help, suggestions very welcome. Regards Roland
  9. i am trying to learn how to make a text editor.here i creat a paragraph using "para" button.and inside the paragraph there will be a quote.Every time I press 'enter' within this paragraph, a new paragraph is created, rather than a line break tag (<br>). How can I force a line break tag to be created instead of a paragraph element?also i cant even get outside of the quote tag.though designMode is on and contenteditable is true for both paragrap and quote <head><meta charset="utf-8"><title>Untitled Document</title><style>*{margin:0px;padding:0px;}#idContent{ background-color:pink;}div{ border:1px solid black;}</style></head><body onLoad="loads();" style="position:relative;"><iframe id="idContent" width="600" height="280" contenteditable="true" ></iframe><input type="button" value="para" onClick="para();"><script>function loads(){ idContent.document.designMode="On";}function para(){ var m=document.createElement("p"); m.setAttribute('style',"border:1px solid black;height:100px;width:500px;position:relative;background-color:white;");m.setAttribute('designMode',"on");m.setAttribute('contenteditable',"true"); var t=document.createElement("q"); t.innerHTML="quote here"; t.setAttribute('designMode',"on"); t.setAttribute('contenteditable',"true"); m.appendChild(t); idContent.document.body.appendChild(m); }</script></body></html>
  10. I'm a retired programmer and haven't kept up with the latest techniques. I see many web pages these days that show a photo in a new way; i.e., when I click on it, it pops up in a larger format (size) and the area surrounding gets darkened. While in this mode, the user can only hit ESC key to get back to viewing thumbnails. I'm sure there is a tutorial here on how to code it but perhaps someone can save me a little time and point me in the right direction. I'm fairly familiar with jQuery and plain HTML but I've been unable to find info on this code -- primarily because I don't know what to search for. Tried to read the source code of some pages, but they are mostly unreadable. TIA, Pete
  11. trying to make a text editor.the "creatdiv" button is used to make a paragraph inside the iframe editor.but while typing inside the paragraph the texts overflows and spill out of the paragraph boundary.so my question is how can i manage to force the text to remain inside the paragraph boundary.and also want the paragraph boundary will increase along Y-direction as the amount of texts inside is being increased <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>a { cursor:pointer; text-decoration:none;}img{ width:16px; height:16px;}#hide{ position:absolute; width:50px; height:50px; background-color:pink; border:1px solid black; top:210px; left:660px; padding:1px; display:none;}</style></head><body onLoad="loads();" style="position:relative;"><iframe id="idContent" width="600" height="280" contenteditable="true" ></iframe><input type="button" value="B" onClick="bolds();"><input type="button" value="l" onClick="ilink();"><input type="button" value="color" onClick="show();"><input type="button" value="UL" onClick="ul_list();"><input type="text" value="" list="datalist1" id="ff" /><datalist id="datalist1"><option value="1" ><option value="2" ><option value="3" ><option value="4" ><option value="5" ><option value="6" ><option value="7" ></datalist><input type="button" value="< font size" onClick="isize(ff.value);"><input type="button" value="creatdiv" onClick="crtdiv();"><div id="hide"><img src="yellow.jpg" onClick="icolor('yellow');"/><img src="red.jpg" onClick="icolor('red');"/><img src="violet.jpg" onClick="icolor('violet');"/><img src="black.jpg" onClick="icolor('black');"</div><script>var p=0;function loads(){ idContent.document.designMode="On";}function bolds(){ idContent.document.execCommand("bold",false,null);}function ilink(){ var m = prompt("put url here"); idContent.document.execCommand("CreateLink",false,m);}function show(){ var m=document.getElementById("hide"); m.style.display="block";}function icolor(col){ var m=document.getElementById("hide"); if(p==1){ idContent.document.execCommand("forecolor",false,'black'); p=0; } else{ idContent.document.execCommand("forecolor",false,col); setTimeout(function(){ m.style.display="none"; },5000); p=1;} }function ul_list(){ idContent.document.execCommand("InsertUnorderedList",false,null);}function isize(el){ idContent.document.execCommand("FontSize",false,el);}function crtdiv(){ var para=document.createElement("p"); para.innerHTML="dfdfdfdfkdf"; para.setAttribute('style',"background-color:green;background-image:url(image1.jpg);border-radius:10px;border:1px solid black"); idContent.document.body.appendChild(para); }</script></body></html> creatdiv function here function crtdiv(){ var para=document.createElement("p"); para.innerHTML="dfdfdfdfkdf"; para.setAttribute('style',"background-color:green;background-image:url(image1.jpg);border-radius:10px;border:1px solid black"); idContent.document.body.appendChild(para); }
  12. i want to creat link using selected text.codes aren't working.how can i fix this? <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>#its{ border:1px solid black;}</style></head><body><div id="its" contenteditable="true" ><p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p></div><input type="button" value="select and change" onClick="addLink();"><script>function addLink(){var links=prompt("add link","http://");document.execCommand('creatLink',false,links);}</script></body></html>
  13. what is the actual meaning of these statement #if(!var_name) #if(var_name)
  14. browser detecting problem .before that codes works fine.its job is to make a div up and down within a period of time.after 10/12 times it crashes?what is the reason and how can it be fixed? <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>#its{ width:200px; height:0px; background-color:blue; display:block; color:white;}#h{ background-color:green;}</style></head><body><div id="its">this is it</div><input type="button" value="down" onClick="view();" id="h"><script>var i=100;function view(){ var m=document.getElementById("its"); var n=document.getElementById("h"); m.style.webkitTransition="height .5s ease-in-out"; m.style.height="100px"; n.value="up" setTimeout(function(){ m.style.height="0px"; n.value="down"; },600); setInterval(view,1200); } </script></body></html>
  15. i want to creat link using selected text.codes aren't working.how can i fix this? <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>#its{ border:1px solid black;}</style></head><body><div id="its" contenteditable="true" ><p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p></div><input type="button" value="select and change" onClick="addLink();"><script>function addLink(){var links=prompt("add link","http://");document.execCommand('creatLink',false,links);}</script></body></html>
  16. I am going to design a webpage, which contains <div>(s) that allow users to submit their (X)HTML with CSS, and being inserted into those <div>(s). I understand it will suffer from XSS seriously, so I will use HTML Purifier to sanitise the (X)HTML and CSS. For instance, I will definitely not allow <script>, <iframe>, and external resources. But I wish to allow almost all other tags and CSS attributes. Here comes the question. I wish to keep client elements (visually) inside the <div>(s). I have tried a partial solution, by using position: absolute; and overflow: hidden;, as follow: <html><head><style>div#jail { position: absolute; overflow: hidden; border: 1px dotted red; height: 200%; width: 50%; left: 25%; top: 25%;}/* All client's CSS is ensured prefixed with div#jail */div#jail .client_code { margin: 0; position: absolute; top: -8px; z-index: 1000;}</style></head><body><div id="jail"> <p class="client_code">elements being jailed</p></div></body></html>The effect of the codes above is as follow: The red dotted line is the "Jail". The purpose is to make any HTML codes with any CSS (prefixed with div#jail) to visually keep inside the box. As shown above, the line of text tried to move out of the box. However, because of overflow: hidden, it is just clipped. So nothing could escape the "Jail". This is good. So far, I have successfully jailed <p> inside div#jail for most kinds of client's HTML elements and CSS, except when user uses position: fixed;. div#jail .client_code { position: fixed; top: 0px;}The following is the screen capture, which the "jail" failed: As shown above, if the position: fixed CSS is applied to the jailed elements, the result is that the line of text can be shown outside the box - i call it a breakthrough of the jail. This is not good. So, my question is, how to ensure everything are visually "jailed" inside the box? If position: fixed is the only CSS which can cause this breakthrough, i can just prohibit position: fixed and the Jail would be enforced. If there are any other ideas/design to achieve this, any solutions are welcomed! Thanks a lot!
  17. i am trying a dynamic max power and "x" value input.everything is fine the problem is i can not replace the (x^something) dynamically with replace() method. <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>#gap{ width:200px; height:50px; border:1px solid black;}thiss{ width:200px; height:50px;}</style></head><body><div id="gap"></div><p id="thiss"></p><input type="button" value="replace this" onClick="change();"><script>function change(){ var m=document.getElementById("gap"); var n=document.getElementById("thiss"); var t=document.getElementById("thiss").innerHTML; var power=prompt("input highest power of x:"); var i; var arr=new Array(); for( i=power;i>=0;i--){ arr[i]=prompt("coeff of x^"+i); } i=power; for(i=power;i>=0;i--){ if(arr[i]>0 && i==power){ n.innerHTML += arr[i]+"*x^"+i; } else if(arr[i]<0 && i==power){ n.innerHTML += arr[i]+"*x^"+i; } else if(arr[i]>0 && i!=power){ n.innerHTML += "+"+arr[i]+"*x^"+i; } else if(arr[i]<0){ n.innerHTML += arr[i]+"*x^"+i; }else if(arr[i]==0){ n.innerHTML += ""; } } var x_val=prompt("solve with x =");i=power;for(i=power;i>=0;i--){ m.innerHTML=eval(t.replace(/x^i/,"Math.pow(x_val,i)"));} }</script></body></html> mainly problem is here.i know this is garbage .but how can it be fixed.how can i replace using variable for(i=power;i>=0;i--){ m.innerHTML=eval(t.replace(/x^i/,"Math.pow(x_val,i)"));}
  18. why the first one works and second one doesn't work? <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>#gap{ width:200px; height:50px; border:1px solid black;}</style></head><body><div id="gap"></div><p id="thiss">3*x2+4*x2</p><input type="button" value="replace this" onClick="change();"><script>function change(){ var m=document.getElementById("gap"); var n=document.getElementById("thiss").innerHTML; var rep=n.replace(/x2/g,"Math.pow(3,2)"); m.innerHTML=rep; var t=eval(m.innerHTML); m.innerHTML=t;}</script></body></html> this doesn't work. i used a ( ^ ) sign after x to clearly indicate that it is a square <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>#gap{ width:200px; height:50px; border:1px solid black;}</style></head><body><div id="gap"></div><p id="thiss">3*x^2+4*x^2</p><input type="button" value="replace this" onClick="change();"><script>function change(){ var m=document.getElementById("gap"); var n=document.getElementById("thiss").innerHTML; var rep=n.replace(/x^2/g,"Math.pow(3,2)"); m.innerHTML=rep; var t=eval(m.innerHTML); m.innerHTML=t;}</script></body></html>
  19. I didn't know where to add my new topic, but because my problem involves coding in HTML. I thought this might be the right place. So.. I'm new to web design/coding and i'm coming to you guys for help because the company i work for has now got a new website which uses Umbraco CMS to add and edit content. What they neglected to tell us was that we'd need to know HTML to edit certain data. I have added the HTML coding below for the Table of specs for one of the products we sell at my work, but my problem is getting the color_boxes to align centrally with all the rest of the data. (see image attached of 'The Table as viewed on the webpage'). HTML: <table border="0" class="comm_table" align="center"><tbody><tr><th colspan="2" width="129">Size/ref/code</th><th class="table_th1" style="text-align: center;">W½</th><th class="table_th1" style="text-align: center;">W1</th><th class="table_th1" style="text-align: center;">W2</th><th class="table_th1" style="text-align: center;">W3</th></tr><tr><th colspan="2" width="129">Colour</th><th><div class="color_box"><span class="color" style="background: none repeat scroll 0% 0% #ffffff;">color</span></div></th><th><div class="color_box" style="text-align: center;"><span class="color" style="background: none repeat scroll 0% 0% #99CC00;">color</span></div></th><th><div class="color_box"><span class="color" style="background: none repeat scroll 0% 0% #D00000; align: center;"> color</span></div></th><th><div class="color_box"><span class="color" align="center" style="background: none repeat scroll 0% 0% #333399;">color</span></div></th></tr><tr><th class="table_th1" rowspan="2" style="text-align: center;">Height of Walker (cm)</th><th class="table_th1" style="text-align: center;">STD Wheels</th><td>37-46</td><td>41-55</td><td>48-64</td><td>59-78</td></tr><tr><th class="table_th1" style="text-align: center;">Activity Wheels</th><td>41.50</td><td>45-60</td><td>52-68</td><td>63-82</td></tr><tr><th class="table_th1" colspan="2" style="text-align: center;">Hand-grip width (cm) </th><td>34</td><td>34</td><td>34</td><td>38</td></tr><tr><th class="table_th1" colspan="2" style="text-align: center;">Frame width (cm) </th><td>58-60</td><td>58-60</td><td>60-62</td><td>62-64</td></tr><tr><th class="table_th1" colspan="2" style="text-align: center;">Frame Length (cm) </th><td>52-59</td><td>56-62</td><td>69-83</td><td>77-89</td></tr><tr><th class="table_th1" colspan="2" style="text-align: center;">User Height (cm) </th><td>up to 95</td><td>91-122</td><td>107-137</td><td>129-152</td></tr><tr><th class="table_th1" colspan="2" style="text-align: center;">Max User Weight (kg </th><td>27</td><td>27</td><td>39</td><td>60</td></tr><tr><th class="table_th1" colspan="2" style="text-align: center;">Frame Weight (kg) </th><td>3</td><td>3.3</td><td>3.85</td><td>4.85</td></tr></tbody></table><p> </p><p style="text-align: left;">*All dimensions are based on four wheeled walkers. Frame weight is calculated based on the frame with wheels but excludes accessories. Activty wheels will affect the adjustment range of each walker. Colours shown are standard for each size. Special colours are available at an additional cost.</p><p style="text-align: justify;"><span class="Apple-style-span">Measuring correctly:</span> Whilst the user is standing with their arms by their side and with a few degrees of flexion at the elbow, measure from the crease in the palm of the hand to the floor. Always remember to adjust the walker as the user grows to maintain good posture and efficient walking.</p><p style="text-align: left;"><span>For further information about the Kaye Walker and the accessories available please request our brochure via our online enquiry.</span></p> Looking at the coding in red, which is relative to my problem. This will need tidying up a lot, after i have tried so many times to edit the coding to do what i want it to. But i had no success.. I have also attached a screen grab of the HTML coding we are looking at (as edited in Umbraco CMS): I have also included two more screen grabs of the Table as viewed in Umbraco CMS & the Table as viewed on the webpage if this is of any help. The Table as viewed in Umbraco CMS: The Table as viewed on the webpage: As you can see above the colour boxes are not aligned central to the rest of the data input in the table. i would appreciate someone to help me understand the correct way of coding. As i am an ultra newbie and have taken it upon myself to learn HTML, anyone who might offer any course in HTML coding, please get in touch via PM. Thanks, Reb
  20. Hello All, I put my question straight here. If my website address is www.abcd.in a ""Click Here"" button should be linked to http://www.XXXXXXXX.com/?r=1234567 [FIXED] If my website address is www.abcd.in/?r=1111111 a ""Click Here"" button should be linked to http://www.XXXXXXXX.com/?r=1111111 ["1111111" Its a 7digit number may vary per user] Please help me a HTML Code with javascript in it for creating a Click here button. Refer: www.click2rupee.com www.click2rupee.com = CLICK HERE Button= http://www.clixsense.com/?r=3488429 www.click2rupee.com/?r=12312312 = CLICK HERE Button= http://www.clixsense.com/?r=12312312 Thanks All.
  21. Not sure if this has been asked before. I did a search but couldn't find it. If this does end up being a duplicate thread, my bad. So I have this form, and what it does is it takes the information that the user inputs and sends it via email to us using a PHP script when submit is clicked. The information is sent to us in a certain way that fits into our client relationship manager nicely. But what the script does is another story. I'm concerned about the HTML. Looks kinda like this. <form action="email.php" class="container" id="mail" method="post" enctype="multipart/form-data" language="JavaScript" name="FrontPage_Form2"><li></li><label>Title</label><select id="title" name="title" tabindex="3"><option value="">Select</option><option value="">Mr.</option><option value="">Ms.</option><option value="">Mrs.</option></select><input name="Submit" class="submit" tabindex="16" type="submit" value="Submit" /> Etc. What I want to know is how to, if possible, have the form set up so that it executes a different script if the user clicks a checkbox. Like <form action="email.php" class="container" id="mail" method="post" enctype="multipart/form-data" language="JavaScript" name="FrontPage_Form2"><li></li><label>Title</label><select id="title" name="title" tabindex="3"><option value="">Select</option><option value="">Mr.</option><option value="">Ms.</option><option value="">Mrs.</option></select><li></li><label>Have the email sent directly to sales</label><input name="checkbox" tabindex="17" type="checkbox"><input name="Submit" class="submit" tabindex="16" type="submit" value="Submit" /> So when that checkbox is clicked, instead of executing email.php, it executes another script instead that sends a different message to a different person. If that makes any sense. If you want the real code, I can give it to you, it's just a lot longer and I don't see it as necessary to illustrate my point. If anyone knows how to achieve this, or has any ideas, I will implement them immediately, and pledge undying loyalty to said user.
  22. i need my code to search among four different conditions and only one will be executed.but i have found four if statement in a row doesn't work.how can i fix this.it is for finding roots of a cubic function of the form ax^3+bx^2+cx+d=0. (note i have encountered the same prob before,there were two if statements.so somehow i was able to manage it.but its cofusing to fix four instead of 2.so please help me out) function solve_cube(){ var m=document.getElementById("gets"); var n=document.getElementById("divs"); n.style.display="none"; var a=prompt("put coeff of x^3"); var b=prompt("put coeff of x^2"); var c=prompt("put coeff of x"); var d=prompt("put value of d"); var front=(-b/(3*a)); var root; var for_cube_root1; var for_cube_root2; var cube1; var cube2; var final1,final2,final3,final4,final5,final6; var three=2*(-Math.pow(-b,3))-(9*a*b*c)+27*(a*a)*d; var last=-Math.pow(-(b*b-3*a*c),3); var under_root=(three*three)-(4*last); if(under_root<0){ root=-Math.sqrt(-under_root); } else if(under_root>0){ root=Math.sqrt(under_root); } for_cube_root1=(1/2)*(three+root); if(for_cube_root1<0){ cube1=-Math.pow(-for_cube_root1,0.33); } else { cube1=Math.pow(for_cube_root1,0.33); } for_cube_root2=(1/2)*(three-root); if(for_cube_root2<0){ cube2=-Math.pow(-for_cube_root2,0.33); } else { cube2=Math.pow(for_cube_root2,0.33); } final1=(1/(3*a))*cube1; final2=(1/(3*a))*cube2; final3=((Math.sqrt(3))/(6*a))*cube1; final4=((-Math.sqrt(3))/(6*a))*cube2; final5=((-Math.sqrt(3))/(6*a))*cube1; final6=((Math.sqrt(3))/(6*a))*cube2; var x1=front-final1-final2; var real=front+(1/(6*a))*(cube1+cube2); var imag1=final3+final4; var imag2=final5+final6; x1=x1.toFixed(2); real=real.toFixed(2); imag1=imag1.toFixed(2); imag2=imag2.toFixed(2); if(imag1<0 && iamg2>0){ m.value="x1="+x1+",x2="+real+""+imag1+"i"+","+"x3="+real+"+"+imag2+"i"; } if(imag1<0 && imag2<0){ m.value="x1="+x1+",x2="+real+""+imag1+"i"+","+"x3="+real+""+imag2+"i"; } if(imag1>0 && imag2>0){ m.value="x1="+x1+",x2="+real+"+"+imag1+"i"+","+"x3="+real+"+"+imag2+"i"; } if(imag1>0 && imag2<0){ m.value="x1="+x1+",x2="+real+"+"+imag1+"i"+","+"x3="+real+""+imag2+"i" ; } }</script> statements are seperated here if(imag1<0 && iamg2>0){ m.value="x1="+x1+",x2="+real+""+imag1+"i"+","+"x3="+real+"+"+imag2+"i"; } if(imag1<0 && imag2<0){ m.value="x1="+x1+",x2="+real+""+imag1+"i"+","+"x3="+real+""+imag2+"i"; } if(imag1>0 && imag2>0){ m.value="x1="+x1+",x2="+real+"+"+imag1+"i"+","+"x3="+real+"+"+imag2+"i"; } if(imag1>0 && imag2<0){ m.value="x1="+x1+",x2="+real+"+"+imag1+"i"+","+"x3="+real+""+imag2+"i" ; }
  23. alzami

    Math.pow

    whay it gives me NAN Math.pow(-.39,0.33); if you want u can check my previous posts where i made a calculator and check "x^y" button actually here var cube2 value is giving NAN; function solve_cube(){ var m=document.getElementById("gets"); var n=document.getElementById("divs"); n.style.display="none"; var a=prompt("put coeff of x^3"); var b=prompt("put coeff of x^2"); var c=prompt("put coeff of x"); var d=prompt("put value of d"); var front=(-b/(3*a)); var three=2*Math.pow(b,3)-(9*a*b*c)+27*(a*a)*d; var last=Math.pow((b*b-3*a*c),3); var under_root=(three*three)-(4*last); var root=Math.sqrt(under_root); var for_cube_root1=(1/2)*(three+root); var for_cube_root2=(1/2)*(three-root); alert(for_cube_root1); var cube1=Math.pow(for_cube_root1,0.33); var cube2=Math.pow(for_cube_root2,0.33); cube1=(1/(3*a))*cube1; cube2=(1/(3*a))*cube2; var x1=front-cube1-cube2; m.value="x1 = "+x1; }
  24. Every time i build a website i always get mysterious borders appearing. Heres the code i have <!DOCTYPE html><head><html><title>Untitled Document</title><link href="mainstylesheet.css" rel="stylesheet" type="text/css" /><style>.body{ margin: 0px; padding-bottom: none; }</style></head><body><div class="header">stuff</div><div class="content1">stuff</div><div class="content2">stuff</div><div class="content3">stuff</div><div class="footer">stuff</div></body></html> so i always end up doing trial and error and changing padding and what not. Can someone give me a surefire method to avoid this
  25. alzami

    complex form

    i have posted my calculator codes in my previous posts.i have made a equation solver .which gives me solution of a quadratic equation if the roots are only real number.if the roots are in complex form or complex root it gives me NAN.how it can be manipulated to show complex roots like (5+3i)?? function solve(){ var m=document.getElementById("divs");m.style.display="none"; var q=document.getElementById("gets"); var a=prompt("put coeff of x^2"); var b=prompt("put coeff of x"); var c=prompt("put value of c"); var p=(b*b-4*a*c); var nom=Math.sqrt(p); var de_nom=2*a; var x1=(-b+nom)/de_nom; var x2=(-b-nom)/de_nom; q.value="x1 ="+ x1 +","+ " x2 ="+ x2 ;} for convinience i am posting the whole code here... <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>.its{ width:32%; font-size:20px; color:blue; margin:0 auto; }#gets{ width:289px; height:50px; font-size:20px; color:black; background-color:white; }#divs{ width:289px;height:50px;font-size:10px;color:black;background-color:white;display:none;position:absolute;top:13px;left:10px;border:1px solid black;}</style></head><body style="position:relative;"><div id="divs"><a href="#" onClick="solve();"><b>ax^2+bx+c=0</b></a></br><a href="#" onClick=><b>ax^3+bx^2+cx+d=0</b></a></div><form style="background-color:grey;display:inline-block;height:350px;width:300px;padding:10px;"><input type="text" id="gets" value="calculator(press CLR to begin)"></br><input type="button" value="0" onClick="calc(this.value);" class="its"><input type="button" value="1" onClick="calc(this.value);" class="its" ><input type="button" value="+" onClick="calc(this.value);" class="its"> <input type="button" value="2" onClick="calc(this.value);" class="its"><input type="button" value="3" onClick="calc(this.value);" class="its"><input type="button" value="-" onClick="calc(this.value);" class="its"><input type="button" value="4" onClick="calc(this.value);" class="its"><input type="button" value="5" onClick="calc(this.value);" class="its"><input type="button" value="÷ " onClick="calc(this.value);" class="its" ><input type="button" value="6" onClick="calc(this.value);" class="its"><input type="button" value="7" onClick="calc(this.value);" class="its"><input type="button" value=" ✕" onClick="calc(this.value);" class="its"><input type="button" value="8" onClick="calc(this.value);" class="its"><input type="button" value="9" onClick="calc(this.value);" class="its" ><input type="button" value="=" onClick="ev('gets');" class="its"><input type="button" value="sqrt" onClick="sqr('gets');" class="its" ><input type="button" value="%" onClick="calc(this.value);" class="its"><input type="button" value="CLR" onClick="clr('gets');"class="its" ><input type="button" value="ln" onClick="lnit('gets');" class="its" ><input type="button" value="sin" onClick="trig('gets',Math.sin);" class="its" ><input type="button" value="tan" onClick="trig('gets',Math.tan);" class="its"><input type="button" value="cos" onClick="trig('gets',Math.cos);"class="its" ><input type="button" value="cosec(x)" onClick="rev_trig('gets',Math.sin);" class="its" ><input type="button" value="cot(x)" onClick="rev_trig('gets',Math.tan);" class="its"><input type="button" value="sec(x)" onClick="rev_trig('gets',Math.cos);"class="its" ><input type="button" value="x^(y)" onClick="power('gets');"class="its" ><input type="button" value="log2" onClick="log2('gets');"class="its" ><input type="button" value="log10" onClick="log10('gets');"class="its" ><input type="button" value="solve" onClick="solve_show('divs');"class="its" ><input type="button" value="X" onClick="calc(this.value);"class="its" ></form><script>var i=0;var t=300;function calc(i){document.getElementById("gets").value +=i; }function ev(el){var c=eval(document.getElementById("gets").value); document.getElementById("gets").value=c;}function clr(el){ var m=document.getElementById(el); var c=document.getElementById("divs"); c.style.display="none"; m.value="";}function sqr(el){var c=document.getElementById(el);var v=Math.sqrt(c.value);c.value=v;}function lnit(el){ var c=document.getElementById(el); var v=Math.log(c.value); c.value=v;}function trig(el,oprtr){ var m=document.getElementById(el); var p=(m.value)*( Math.PI/180); var v=oprtr(p); m.value=v;}function power(el){ var m=document.getElementById(el); var v=prompt("put power : "); var p=Math.pow(m.value,v); m.value=p;}function log2(el){ var m=document.getElementById(el); var p=Math.log(m.value)/Math.LN2; m.value=p;}function log10(el){ var m=document.getElementById(el); var p=Math.log(m.value)/Math.LN10; m.value=p;} function rev_trig(el,oprtr){ var m=document.getElementById(el); var p=(m.value)*( Math.PI/180); var d=oprtr(p); var g=1/d; m.value=g;}function solve_show(el){ var m=document.getElementById(el); m.style.display="block";}function solve(){ var m=document.getElementById("divs");m.style.display="none"; var q=document.getElementById("gets"); var a=prompt("put coeff of x^2"); var b=prompt("put coeff of x"); var c=prompt("put value of c"); var p=(b*b-4*a*c); var nom=Math.sqrt(p); var de_nom=2*a; var x1=(-b+nom)/de_nom; var x2=(-b-nom)/de_nom; q.value="x1 ="+ x1 +","+ " x2 ="+ x2 ;}</script></body></html>
×
×
  • Create New...