HTML - Comma Separate Number
Hi
I know this subject has been covered many times before and I have certainly done much research and tried all sorts of code to put a comma in a number located in a text box but to no avail. The original calculation is calculated by these lines of code: function updatesum() { var userVl = getUserValue(); var av3 = getav3(userVl); document.getElementById('av3').value = (av3.toFixed(2)); function getav3(vl) { document.getElementById("av3").value = ((vl-0) *2.5) return ((vl-0) *2.5); } The above works absolutely fine as far as calculating my number and showing the resulting number with decimal point , 2 places, but I can't seem to get any 'comma separating' code to work. I am really dumb at writing the code but can usually change given code to suit, but this one has be stumped. This is only one of many calculations on the page but even if you can give me code to make this one work I will play around with the others on my own. Here is the web page if anyone wants to have a look although on here it does not yet reflect all my changes but will give an idea as to what I am trying to achieve. http://www.teamkiwi.890m.com/tk/calculator9999999.html Thank you to anyone who may help me Cheers Dai Similar TutorialsMy commas show up as a box... Any ideas Hi there - I've created my site using a free user-created theme in Tumblr. All is ok except that on this page: http://jeffnottingham.tumblr.com/testimonials There is a comma ' , ' that you'll see appears in green on a separate line, as an extension to a link. It's driving me crazy becaus eI can't seen where to kill it. I was going to post the full html for my site, but it's too long for this post - I've posted the parts I THINK might contain the issue.... Many thanks in advance for your help, Jeff HTML Code: <style type="text/css">{CustomCSS}</style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script src="http://static.tumblr.com/usaykzx/4P5ky45bz/jquery.example.js"></script> </head> <body> <div id="container"> <div id="header"> <div align="center"> <iframe src="http://player.vimeo.com/video/38915812?title=0&byline=0&portrait=0" align="middle" width="450" height="253" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> </div><br> <h1><a href="/">{Title}</a></h1> {block:Description} <p>{Description}</p> {/block:Description} <br> <ul> <div> <li><a href="http://dl.dropbox.com/u/5560088/Jeff%20CV%20March%202012.pdf" target="_blank">current CV with contact details</a></li> {block:HasPages} {block:Pages} <li><a href="{URL}">{Label}</a></li> {/block:Pages} {/block:HasPages} {block:AskEnabled}<li><a href="/ask">{AskLabel}</a></li>{/block:AskEnabled} {block:SubmissionsEnabled}<li><a href="/submit">{SubmitLabel}</a></li>{/block:SubmissionsEnabled} </ul> </div> {block:Posts} <div class="post"> <div class="post-meta"> <a href="{Permalink}">{Month} {DayOfMonth}, {Year}</a> {block:IfShowNotes} {block:NoteCount} • <a href="{Permalink}">{NoteCountWithLabel}</a> {/block:NoteCount} {/block:IfShowNotes} {block:IfDisqusShortname} • <a class="dsq-comment-count" href="{Permalink}#disqus_thread">{lang:Comments}</a> {/block:IfDisqusShortname} {block:ContentSource} • <a href="{SourceURL}" style="max-width:300px; text-overflow:clip;">{block:SourceLogo}<img src="{WhiteLogoURL}" width="{LogoWidth}" height="{LogoHeight}" alt="{SourceTitle}" style="vertical-align:top;" />{/block:SourceLogo}{block:NoSourceLogo}{SourceTitle}{/block:NoSourceLogo}</a> {/block:ContentSource} </div> <div class="post-content"> {block:Photo} <div class="photo{block:Caption} captioned{/block:Caption}"> <div class="photo-wrapper">{LinkOpenTag}<img src="{PhotoURL-500}" alt="{PhotoAlt}" />{LinkCloseTag}</div> {block:Caption} <div class="body"> {Caption} </div> {/block:Caption} <div class="clear"></div> </div> {/block:Photo} {block:Quote} <div class="quote"> <div class="q-wrapper"><q class="{Length}">{Quote}</q></div> {block:Source} <div class="body"> {Source} </div> {/block:Source} </div> {/block:Quote} {block:Text} <div class="text"> {block:Title}<h2>{Title}</h2>{/block:Title} <div class="body"> {Body} </div> </div> {/block:Text} {block:Video} <div class="video{block:Caption} captioned{/block:Caption}"> <div class="video-wrapper">{Video-500}</div> {block:Caption} <div class="body"> {Caption} </div> {/block:Caption} <div class="clear"></div> </div> {/block:Video} {block:Audio} <div class="audio"> <div class="audio-info {block:AlbumArt}hasart{/block:AlbumArt}"> {block:AlbumArt} <div class="audio-info-left"> <img src="{AlbumArtURL}" /> </div> {/block:AlbumArt} <div class="audio-info-right {block:TrackName}hasmeta{/block:TrackName} {block:Artist}hasmeta{/block:Artist} {block:Album}hasmeta{/block:Album}"> {block:TrackName}<div class="audio-trackname">{TrackName}</div>{/block:TrackName} {block:Artist}<div class="audio-artist">{Artist}</div>{/block:Artist} {block:Album}<div class="audio-album">{Album}</div>{/block:Album} {block:ifWhiteAudioPlayer} <div class="audio-player">{AudioPlayerWhite}</div> {/block:ifWhiteAudioPlayer} {block:ifNotWhiteAudioPlayer} <div class="audio-player">{AudioPlayerBlack}</div> {/block:ifNotWhiteAudioPlayer} </div> <div class="clear"></div> </div> {block:Caption} <div class="body"> {Caption} </div> {/block:Caption} </div> {/block:Audio} {block:Chat} <div class="conversation"> {block:Title}<h2>{Title}</h2>{/block:Title} <table cellspacing="0"> {block:Lines} <tr class="user{UserNumber}"> <th>{block:Label}{Label}{/block:Label}</th> <td>{Line}</td> </tr> {/block:Lines} </table> </div> {/block:Chat} {block:Link} <div class="link"> <h2><a href="{URL}" {Target}><span>{Name}</span></a></h2> {block:Description} <div class="body"> {Description} </div> {/block:Description} </div> {/block:Link} {block:Answer} <div class="answer"> <div class="answer-question"> <div class="answer-label">Q</div> <div class="body"> {Question} </div> <div class="answer-asker post-{PostID}"> <div class="answer-point"> <div class="answer-point-top"></div> <div class="answer-point-bottom"></div> </div> <style> .post-{PostID} .answer-asker-avatar { background: url({AskerPortraitURL-64})} </style> <div class="answer-asker-avatar">{Asker}</div> </div> <div class="clear"></div> </div> <div class="answer-answer"> <div class="answer-label">A</div> <div class="body"> {Answer} </div> </div> </div> {/block:Answer} </div> {block:IfShowNotes} {block:PostNotes} <div class="post-notes"> {PostNotes} </div> {/block:PostNotes} {/block:IfShowNotes} {block:PermalinkPage} {block:IfDisqusShortname} {block:Permalink} <div id="disqus_thread"></div> <script type="text/javascript" src="http://disqus.com/forums/{text:Disqus Shortname}/embed.js"></script> <noscript><a href="http://{text:Disqus Shortname}.disqus.com/?url=ref">{lang:View the discussion thread}</a></noscript> {/block:Permalink} {/block:IfDisqusShortname} {/block:PermalinkPage} </div> {/block:Posts} </div> </div> <div align="center"> <hr /> <p class=MsoNormal><span lang=EN-UK style='font-size:12pt;font-family:Baskerville, "Times New Roman", Times, serif; font-style: italic; color:gray'> I gained my Masters in Screenwriting and Producing for Film and Television at the<br> University of Westminster. My films have been screened around the UK, and <br>in 2011 my debut play Lost In Mozart played to sold-out theatres in <br>Edinburgh and London, supported by the Arts Council.<br<br> I work directly with writers, producers, and production companies; <br>writing, editing, and advising. Contact via CV above or<br> jeffnottingham@gmail.com | +44 7739339387<br><br> </span> </div> </div> Hello guys! Let me explain the problem... I have a website full of radios, 12 on total, and all of them have something like this: <object id="Radio01" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject" width="140" height="45" align="middle"> <param name="FileName" value="Link_to_the_stream"> <param name="Autostart" value="False"> <param name="enableContextMenu" value="False"> <param name="ShowControls" value="True"> <param name="ShowDisplay" value="False"> <param name="ShowStatusBar" value="False"> <param name="Volume" value="100"> <embed src="Link_to_the_stream" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp" width="140" height="45" align="middle" autostart="0" enableContextMenu="0" showcontrols="1" showdisplay="0" showstatusbar="0" volume="100"></embed></object><br> <b><a href="Link_to_the_website" target="_blank"> Radio_name </a> As the radios are continually going on and off, sometimes I need to switch them. But the html of my website is too long and I would not like to edit it every time I need to switch a radio. I would like to, instead, create an apart document with variables like: Link_to_stream = "http://www.link.com:port/" Link_to_the_website = "http://www.radiowebsite.com/" Radio_name = "Name of the radio" And then make the html call these variables, so if I wish to switch a radio, I would only edit the file... The tricky part would be to edit the object src, I think. Is there any way to do that? Any method? I'm using conventional html on my website. Thanks in advance! I'm going to be placing a survey on the web eventually and I had a few questions. One is I don't want all the questionnaires on just one page I want to have an submit button after every one and then have it go to the next page. How do I go about doing that? Secondly, after the they are finished I was told there is a way to have their data transmitted to excel. How do I do that as well? Thanks in advance! Hi, Since we know we can use Div tag to right align and left align but everytime we use it, it gets printed on the next line. Suppose we have 2 paragraphs and we want to right align one and the other left align on the same line, how do we achieve it. I know frames are not the most popular thing in the world, but I was wondering if there was a way I could make a link on a page open two separate pages in two separate forums... say I have a link port, and I want it to open portside.html in frame "orange" and port.html in frame "main" all with one link... I would include code, but seeing as I have no idea how to do it, I can't Thanks for any help you can give me... knud Hello, I have an image that I want to cut into about 10 separate links. Is this hard? How do I do this? Thanks, Hi, I have a general question. I need a single landing page for 2 different domains. I know, it's a long story. Is there a better or even best way to set this up? Right now, I've simply copied the landing page and uploaded it to both sites where it splits into an "Enter Here" for one site, and an "Enter Here" for the other site. When done, the plan is to NOT point both domains to the same index page but keep them totally separate. I just would like to know if this is the right way to go about it and if not, what would be the best way? Any help would be appreciated. Thank you. Ok I've always been told with the age old myth of "you should never keep your domains and hosting with the same company." It was something about if they change their rules they can lock you in or something weird? Because of this I have always had all of my domains with godaddy and bounced around with hosting & now I have my hosting with hostgator. Whats the real scoop on this? I'm very new to HTML/CSS/Javascript. In the website I'm trying to build, I want to display a relatively simple navigation menu on the left side of the webpage, similar in look to the one here (example): http://build-website.com/design/opportunity.html Is there some way to put the initialization text for the navigation menu in a separate .html file (or, just some other file), so that every time I want to add a section/link to the nav menu, I won't have to go through each of my web pages individually and add the code for the link? (I am not going to use frames because, among other things, that would make it more difficult to bookmark and copy addresses of individual pages) I have been teaching myself through the w3schools tutorials, but despite looking through them and googling for answers I haven't been able to find a solution. Is this possible in HTML? Something that would allow something like like <div src="navmenu.html"> would be ideal but I haven't been able to find anything. (At the moment I'm just using notepad and typing in code manually) The paragraph tag only goes up to six or so, correct? Well, what if I want an additional paragraph? Whatever do I do? Hi how can i change the bullet to a number in an unordered list? this is what i want 1 etc 2 etc 3 etc can someone help I want to create a lotto system on my vbulletin forum..I have designed .gif graphics for each ball 1-49. I need a script ( whether java or html ) to randomly select 6 numbers without selecting the same number twice...I have saved the balls as smilies, so need the results to show lb1 lb2 lb3 etc... I hope you understand what I mean... Any help would be very much appreciated I need to know the html code to preset a bin counter to start at a certain number, say 5100. My page was shut down and now I want to move it to another site and start the counter at it's previous setting. Any help appreciated. Thanks. How can I limit the number of characters that will be shown from a field of a DDBB on a td ? Thanks, Ignacio Francisco Penin Hi, I am creating a table with some number of rows and I want to get the value of the row number and pass the value to css to color odd and even row alternatively. How can I retrieve the row number and please also tell abt column number Regardfs Ok so I think I have to use JavaScript in order to achieve this but Im not sure. What I want to do is have a bunch of different pages and have the page numbers below. Kinda like the page numbers in google. I also am wondering how to make a link to go to the next page in the group or to go to the very last one and than back to the first and so on... Any help..sry if I didnt explain it the best I'm working on a web page that will offer a massive amount of content. I figured out I need upwards of 8000 pages to get the result I want. Now obviously thats a problem because all of those pages would just be duplicates of the main layout with different content in the same spot. Now say I wanted to change something on the main layout, I'd have to do it to every page! I thought I could use frames to solve this but from what I've heard its not the best route. There has to be a better way. All I know is HTML but if someone could show me the major benefits of another site programming language then I may consider learning it, but right now I would love to know if there is a better way to approach this with HTML. Ok, I'm sure the title was very vague, but I didn't know how to ask this. Lets say, for example, I have a view count for certain page on my website that is automatically generated. I want to take that number, and have it also automatically generated on another page, that links to that page. So say I have a page about elephants that has a view count of 57. I want to have on another page a picture of an elephant (that is also a link) and beside that picture, I want it to say View Count: 57. Is there some type of javascript or html coding or something I can do to make this happen? Please help. |