Conversion Script Not Showing Results

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


ADVERTISEMENT

Showing The Results Of A Form Submission In A New Window

Oct 2, 2004

I use php includes to display a small form on a web page.The form has only about 2 fields,and when the user hits submit I want the form to be submitted but at the same time I dont want the page to be redirected.Instead I want a small window to pop up saying thank you or whatever.To see a demonstration of what I want to do,please go to download.com ,scroll down to the bottom of the page and you'll see a poll.When you make a vote a new window pops up showing the results of the vote but you arent moved from download.com's homepage to any other page in the parent window.How can I acheive that?I'm using this code right now:

<script language="JavaScript">
function showpoll() {
window.open('manage.php','manage','width=260,height=360,status=no,scrollbars=yes,resizable=no,toolbar=no');
document.forms["form1"].submit();
}
</script>

<form method="post" action="manage.php" onSubmit= "showpoll();" name="form1">
When I hit the submit button on the form a new window does pop up containing manage.php but it doesnt submit the form since manage.php doesnt give the message that its supposed to give when the form is submitted.It instead asks me to input all the fields.While the parent window is redirected to manage.php and it shows the message that its supposed to show when the form has been submitted.I hope I made myself clear.

View 1 Replies View Related

Character Conversion

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

Char Conversion

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

Library For Unit Conversion?

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

Conversion Of Meters To Centimeters?

Jul 6, 2009

conversion of meters to centimeters using java

View 3 Replies View Related

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 View Related

Conversion Of JSON Object ?

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

How To Avoid Special Character Conversion ?

Aug 23, 2005

Value entered in textarea is: "this "TEST" is not going well"

JS sends to server this value: "this &quot;TEST&quot; 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

Single To Double Quote Conversion

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

Jquery :: String To Double Conversion?

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

Google Maps Distance Conversion?

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

'how To Use The 'toString' In Java String For The Conversion

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

Document File To Image Conversion?

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

Primitive To Object Conversion Workaround?

Jun 2, 2010

I'm currently constructing a javascript "terminal" on a site I'm building so that I can test objects and functions outside of the web developer terminal in google chrome.

Given that I have active javascript defining an object called item, typing item in the chrome terminal returns Object and goes on to list the properties of item.

Moreover, I can define a function in the terminal like this: function(x) { return x }, and then function(item) will return Object and list the properties. However, if I use form data and user input in the place of the argument, the datatype becomes a string and not an object, so typing item in the form and clicking a button that performs function(document.form.text.value) returns the string item and not Object.

Is there any way to convert this primitive string to an object so that I can then iterate through properties, and so on?

View 2 Replies View Related

Lower Case Conversion In Replace Function

Jul 20, 2005

I'trying to use a regExp in Javascript to replace any all upper case word in a string by the same word having only its first letter in upper case.

This expression detects the words:

View 3 Replies View Related

Compare Dates In The Format Used In Twitter / Conversion?

May 9, 2010

I would like to compare dates in the format used in twitter, which is this: Wed Apr 08 14:30:10 +0000 2009 How do I do this? Do I need to convert to a timestamp first, and if so, how do I do this?

View 4 Replies View Related

Local Time Conversion Code/Script?

Dec 31, 2009

We facilitate webinars/conferences and post the date/time of the events on our website.Presently, we list the times in various United States time zones to make it easier for viewers to determine what time the event will take place within their time zone.However, posting the date/time in all the time zones makes the event calendar look too busy,cluttered, and somewhat confusing.Is anyone aware of an html code/script that would allow me to post the times in my time zone (Mountain Standard Time) to where the time is automatically converted to the viewers local time on their computer? If there is a code/script of this nature

View 2 Replies View Related

Date String Conversion - Convert The P20DT9H1M14S

Aug 9, 2010

I am working with an API that delivers a date like this: P20DT9H1M14S Standing for a period of 20 days, and time of 9 hours, 1 minute, and 14 seconds. I am trying to figure out how to convert the P20DT9H1M14S to this: 20 days, 9 hours, 1 minute, and 14 seconds.

View 5 Replies View Related

Function For Temperature Conversion With Popup Message

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

How Can I Avoid Type-conversion (object Variable To String)

Jul 23, 2005

How can I avoid type-conversion (object variable --> string) when
passing an object variable to a function?

Example:
-->
catch(myerrorobject)
alert(myerrorobject.filename);
{
my_function('bla: ',myerrorobject);
}
<---

I get the "myerrorobject.filename" in the alert-Box, but I get an
"undefined"-error, if I try to access myerrorobject.filename (or other
properties) in the function "my_function". Why?

View 1 Replies View Related

Superscript Conversion - Surrounds The Text With HTML <sup> Tags

Feb 7, 2009

I need to have an alert message that has an exponent in it. The only problem is, the built in "sup" function javascript has merely surrounds the text with HTML <sup> tags, and sadly, they do not work in alert messages. Is there any way to convert normal strings into superscript in a way that works with alerts?

View 3 Replies View Related

Ajax :: Adding Google Conversion Tracking In Form?

May 15, 2010

adding my Google Adwords conversion tracking code to my new site?I am using a template that uses Ajax to submit a form. I don't really know anything about ajax, so I am confused about how to add the tracking code.

View 1 Replies View Related

Binary Conversion Program - Take User Input And Convert The 8 Digits

Mar 28, 2011

I am writing a program that will take user input and convert the 8 digits the user enters (the 0's and 1's) and converts them into an integer between 0 and 255. It is a very simple program but I am still having some errors :

import javax.swing.*;
public class BinaryToInteger
{
static String userInput = JOptionPane.showInputDialog("Enter a binary number with 8 integers to convert.");//Dialog Box that asks for user input
static int binaryValue = Integer.parseInt(userInput);//Parses the user's input into an integer
[Code]...

View 7 Replies View Related

Jquery :: Scrolling - Pages Don't Scroll As Fast Or Smoothly As They Did Before After The Conversion

Jul 1, 2010

I have a site that made extensive use of javascript event handlers embedded in the html. I am trying to port the code to jquery and I notice that after the conversion, pages don't scroll as fast or smoothly as they did before. I actually notice this on many sites that make use of jquery or some other jscript library. What causes this behavior, and is there anything that can be done to minimize the sluggishness of the site?

View 1 Replies View Related

JQuery :: MooTools To Function Conversion - Not Playing Nicely On Site

Dec 9, 2010

I have a MooTools drop down menu I need converted over to jQuery as they are not playing nicely together on my site. Here is the MooTools code:

[Code]...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved