C To F Temperature Printer - Conversion
Apr 9, 2010
so my professor suddenly took a left turn in class and we jumped from using HTML and CSS to programing in Javascript. It's not even covered in the book we're using for a text book. So I'm having some problems with it (big surprise right?) My assignment: Write a Java Script that will print out the Temperature in Celcius from 0 to 35, AND the corrosponding temperature in Fahrenheit. So basically it would generate the following:
0 Degrees in Celcius is Equivalent to 5 Degrees Fahrenheit
1 Degrees in Celcius is Equivalent to 6.125 Degrees Fahrenheit
2 Degrees in Celcius is Equivalent to 7.25 Degrees Fahrenheit
3 Degrees in Celcius is Equivalent to 8.375 Degrees Fahrenheit and all the way down to 35 degrees.
Here's the code I have so far:
[Code]....
View 4 Replies
ADVERTISEMENT
Oct 9, 2011
I have used a Javascript function for temperature conversion(attached with an external js file). When the temp is converted we are supposed to get a message box if the temps fall under a certain amount.
Example: <90 degrees celcius : a message is supposed pop up.
I haven't been able to code the message box correctly for it to work.
View 2 Replies
View Related
Apr 4, 2011
I am trying to fix a problem that I have with my JavaScript assignment for class. The code I have so far is beneath. I ran FireBug on it, and came back with "missing ) after argument list on Line 24"
<SCRIPT LANGUAGE="JavaScript">
function Convert(){
// declare a variable
var c
var f
// get variable's value
[Code]...
View 4 Replies
View Related
Jul 23, 2005
I have a problem with printer settings.
I want to let users to print an automatic generated image from a web page.
the problem is that the image is big (little smaller than A4) and if I print
the page from "File --> Print" the image is automatically resized or printed
in more than one page, if I set the page properties from the File menu I can
reduce print margin and cut off header and footer, and then it works fine.
So I would like to set page properties form javascript to let users print
the image with right dimensions.
View 2 Replies
View Related
Feb 23, 2006
The coloumns of the tables in my jsp page have links on them for sorting. The same table is displayed in the printer freindly version but i want to disable these sorting links on that printer freindly page.
View 1 Replies
View Related
Aug 4, 2006
I have a print button in PHP page which using javascript
window.print() to print web page.
However , when user click "print" , the print preview display that the
page cut-off and alignment is out.
Read on regarding the matter , and found that is not the issue of PHP .
Some users recommend to me to use CSS and HTML to create printer
friendly page.
However my page is extension is in php , can i use CSS and HTML to
create printer friendly page?
View 2 Replies
View Related
Jul 20, 2005
I need to take text from a database, turn it into a barcode from the
Web and print to a Zebra Z4M barcode printer. I am stuck at two
separate approaches.
1. Use ZPL II (Zebra's proprietary language to command the printer)
which is executed at a DOS Prompt with "COPY BarCode.txt LPT1" Is
there any way to run that from the web. Also, is there any other
method of sending the information in the text file to the printer?
2. Use some sort of ActiveX object to compile a barcode label image,
then use another ActiveX object to remove the Header/Footer and
Margins from the IE printout. I have found ActiveX objects that can
compile the image, but have not found anything to block out the
Header/Footer and Margins.
View 3 Replies
View Related
Apr 30, 2010
I have one image (sampleImage.png).. Already i connected my pc to printer....Manually i open the image and select print option , then i got image from printer....Now i want print image using javascript....
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
[code]....
View 3 Replies
View Related
Apr 21, 2010
I'm battling to print labels on a dot matrix printer. The available page sizes are all bigger than a single label and I can't make custom page sizes on this printer (panasonic KX-P1150). Whenever I print a label, the printer form feeds the label paper and does not stop after the label. I have googled and see that printer comands can be send directly to the printer with ActiveX controls from inside a javascript but the only examples I found changed the orientation etc. None changed the page size or disabled the form feed.
View 6 Replies
View Related
Nov 14, 2006
while login i am getting username & password.
if it is correct then i want to enable printer service.
my system having printer connection. how to disable this & enable this
through code. i didn't any way in php.
Is it possible in javascript?
View 9 Replies
View Related
Oct 13, 2011
Looking over other threads on this site I was able to use another members script to build my own for adding a network printer via JavaScript on our Intranet. With that, the script works perfectly fine when testing it on the local machine I built it on, but not on other machines in the office. Currently I'm remoted into the branch office I reside in from the corporate office where I'm currently at so the machines being tested are on different subnets, but the script is simple calling the UNC path for the printer. When tested on any other computer, and the link is clicked on the page, the user is taken back to the folder in windows explorer the HTML file is saved in, rather than executing the add printer portion of the script.
This is my full code as of now, I was trying to get the function correct before formatting the actual website (obviously)
Code:
<html><head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Printer Mapping</title>
</head>
<script>
function addPrinter25(){
var x=confirm("You are about to add printer GPSACC01. Would you like to make this your default printer?")
if (x==true){
WshNetwork = new ActiveXObject("WScript.Network");
var PrinterPath = "\\gpsprnt02\gpsacc01";
WshNetwork.AddWindowsPrinterConnection(PrinterPath);
WshNetwork.SetDefaultPrinter(PrinterPath);
alert("Printer GPSACC01 has been added successfully and set as default")
}else{
WshNetwork = new ActiveXObject("WScript.Network");
var PrinterPath = "\\gpsprnt02\gpsacc01";
WshNetwork.AddWindowsPrinterConnection(PrinterPath);
alert("Printer GPSACC01 has been added successfully")
}}
</script>
<font color="#0000FF" face="Arial">
<a href="" onclick="addPrinter25(); return false;">GPSACC01</a></font>
</body></html>
View 1 Replies
View Related
Apr 5, 2010
want to print some data using dot matrix printer on pre printed receipts,am using PHP and MYSQL database am getting data FROM DB , now am not getting how to align it, how to print using java script, exactly on those boxes on pre printed reciepts , please any provide me the code
View 3 Replies
View Related
Aug 24, 2009
I need to know this one. How can we get printer status using JavaScript and also how can we give MS word document print command using JavaScript.
View 3 Replies
View Related
Sep 11, 2007
I am developing a site for a client that requires the printer friendly verison of the site to appear in a separate pop-up window. I am having trouble figuring out the scripting needed to have the current page open in a separate window with a different style sheet applied to it.
View 4 Replies
View Related
Jul 23, 2005
I have a string that I'm properly URL-encoding to be passed in a URL.
Here's the tag from the HTML source:
<A HREF="javascript:openPopWin('takeit.php?568&10&dr.+hobo%27s+scalpel',
325, 325, 'scrollbars')">
But when I mouse-over the link, the %27 shows in the status bar as a ' and
when I click on it, I get a JS error because of the extraneous '. The +s
are not being decoded - why is this one character, and is there a way to
prevent it?
View 3 Replies
View Related
Jul 23, 2005
I have a string that is encoded simply by replacing the letter with the
next letter in the alphabeta. I need a function to convert it back.
Following is the function:
function cnvtBack(encoded)
{
var orig = "";
for (i=0; i < encoded.length; i++)
{
var letter = "";
letter = encoded.charAt(i);
if (letter > 'a' && letter <= 'z')
letter = <<previous letter in alphabeta >> // HOW?
orig += letter;
}
}
View 3 Replies
View Related
Apr 20, 2007
Is there a free js library for doing unit conversions? I am putting
together an app that needs to convert volume and weight, among
others. You'd think that one exists, but I have yet to find it.
View 2 Replies
View Related
Jul 6, 2009
conversion of meters to centimeters using java
View 3 Replies
View Related
Sep 2, 2011
I have such problem when I post my object from client to server (php).
The object should be like so:
Code:
I converti it:
Code:
And send it though jquery and ajax:
property val is the object...
Then on side of server I gota string $_POST["val"]:
Code:
I try to convert it:
Code:
View 2 Replies
View Related
Aug 23, 2005
Value entered in textarea is: "this "TEST" is not going well"
JS sends to server this value: "this "TEST" is not going well"
How to force JS not to convert the string ? I want JS to send exactly what
is typed in the form controls. Is there a function to call?
View 3 Replies
View Related
Sep 8, 2010
I ran into this issue yesterday, and no matter what I try I can't seem to get it work correctly.
I need to parse out single quotes from a field, and replace them with double quotes, so it doesn't blow up later, like it did yesterday.
I've tried using regex, but I'm sure its not the correct syntax.
javascript Code:
document.all.SalesOrderForm.ShipNote1.value = document.all.SalesOrderForm.ShipNote1.value.replace(/'/g,""");
document.all.SalesOrderForm.ShipNote1.value = document.all.SalesOrderForm.ShipNote1.value.replace(/'/g,""");
View 9 Replies
View Related
Apr 21, 2010
Im need to create a conversion-script for a company that do step-competitions. You should be able to input a time-variable, choose what activity you did from a drop-down meny, click convert ("omvandla" in swedish") and the script prints what that is equal to in steps. I found a code online that does other conversion so i just redid that code to fit my demands. Everything looks alright in the browser, but the script doesnt print anything when i click "omvandla". Forgive me for posting the entire code, which is pretty long. But most of the code is just repetition, cause you have 58 types of activities to choose from.
Some words are in swedish, but the only two i think you need to understand is:
View 4 Replies
View Related
Jun 10, 2010
let me know how to convert a string to double in Jquery. String is an amount field like (3,154) which needs to be converted to Double.
View 1 Replies
View Related
Jul 1, 2010
i've found out how to find the distance between 2 lat lng points using google's distanceFrom method:
Code:
// NR14 7PZ
var loc1 = new GLatLng(52.5773139, 1.3712427);
// NR32 1TB
var loc2 = new GLatLng(52.4788314, 1.7577444);
alert(loc2.distanceFrom(loc1) / 1000);
However, I'd like to be able to convert a distance to lat lng. The main reason I'm doing this is so that I can figure out the bounds of a certain area of a co-ordinate. For example I specify a point, and then I need to draw a box around this area going x distance North, South, East and West, but until I know how many units make up a kilometre this wont be easy.
I guess I could go to google maps, click on a point and then click on another point and keep doing that until I get exactly 1km away from the original point, then just minus or plus for the lat and lng to find out the unit value for 1km, but I have a feeling that this wont be accurate. Can anyone lend any advice, I realize that what I'm asking is more a map question than a google maps javascript api question, but perhaps someone has come across this before?
View 7 Replies
View Related
Jul 12, 2001
Can someone help me with the converting the values to string by using the 'toString'. in java script.
View 8 Replies
View Related
Oct 5, 2011
Is it possible to convert a document file to an image using javascript? Anyone ever tried it? Please suggest any codes for it because I've done my research and I see it only working for php, java and other languages.
View 3 Replies
View Related