The Artima Developer Community
Sponsored Link

Web Services Forum
How to convert the output format in Javascript

2 replies on 1 page. Most recent reply: Mar 21, 2007 1:10 AM by lily zhu

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
king star

Posts: 5
Nickname: kingstar
Registered: Dec, 2006

How to convert the output format in Javascript Posted: Dec 19, 2006 12:26 AM
Reply to this message Reply
Advertisement
How to convert the output format in Javascript
Mini commend

If you want to format the output in Javascript, you must realize your codes by yourself because there are no related functions in Javascrip. These days, I got a set of functions written in Javascript to realize the data formatting coded by AJAX WebShop (You can dowonload AJAX WebShop in theire official site: http://www.joyistar.com. Version 3 is recommended). They are very helpful.

Find “system.js” in the directory of AJAX WebShop and you will get these functions below:

function FormatFloat(value,mask)
{
return BasicFormat(value,mask,'FormatNumber')
}
function FormatDate(varDate, bstrFormat, varDestLocale)
{
return BasicFormat(varDate,bstrFormat,'FormatDate',varDestLocale);
}
function FormatTime(varTime, bstrFormat, varDestLocale)
{
return BasicFormat(varTime,bstrFormat,'FormatTime',varDestLocale);
}
function BasicFormat(value,mask,action,param)
{
var xmlDoc;
var xslDoc;
var v='<formats><format><value>'+value+'</value><mask> ;'+mask+'</mask></format></formats>';
xmlDoc=parseXML(v);

var x;
if(isIE)
x='<xsl:stylesheet xmlns:xsl="uri:xsl">'
else
x='<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">';
x+='<xsl:template match="/">';
if(isIE) {
x+='<xsl:eval>'+action+'('+value+',"'+mask+'"';
if(param)x+=','+param;
x+=')</xsl:eval>';
}
else
x+='<xsl:value-of select="format-number('+value+',\''+mask+'\')" />';

x+='</xsl:template></xsl:stylesheet>';
xslDoc=parseXML(x);
var s;
if(isIE)
s= xmlDoc.transformNode(xslDoc)
else{
//for mozilla/netscape
var processor = new XSLTProcessor();
processor.importStylesheet(xslDoc);
var result = processor.transformToFragment(xmlDoc, xmlDoc);
var xmls = new XMLSerializer();
s = xmls.serializeToString(result);
}
return s;
}


harry wellnes

Posts: 3
Nickname: winnipeg
Registered: Feb, 2007

Re: How to convert the output format in Javascript Posted: Feb 28, 2007 10:05 PM
Reply to this message Reply
helloooooooooooo
i know this types of problems sometime occurs so the solution for that problems is only go to the best wed companties who solve your problems. i know this type of company.

http://www.webdesigningcompany.net

lily zhu

Posts: 1
Nickname: lilyzhu
Registered: Mar, 2007

Re: How to convert the output format in Javascript Posted: Mar 21, 2007 1:10 AM
Reply to this message Reply
SpreadsheetConverter to HTML/JavaScript 3.6.4
SpreadsheetConverter to HTML/JavaScript offers you to create web pages quickly with Microsoft Excel. It converts an Excel spreadsheet into a HTML-page with embedded JavaScript.
SpreadsheetConverter to HTML/JavaScript converts an Excel spreadsheet into a HTML-page with embedded JavaScript. No programming or web design experience is required in order to use SpreadsheetConverter to HTML/JavaScript.

With SpreadsheetConverter to HTML/JavaScript all calculations and validations are done immediately when the user presses tab. Everything is done in the browser. If you set the format in Excel, all entered data is directly formatted. This software can support you to create forms with dropdown menus, checkboxes, radio buttons, and large text fields, list boxes in a breeze.

SpreadsheetConverter to HTML/JavaScript inherits the formatting from Excel: font, size, font color, background color, borders, border types and images. Once the web page is created, Excel is not required. Your web server doesn't need Excel, and your users don't need Excel.

SpreadsheetConverter to HTML/JavaScript can work on all web servers, and support JavaScript.

http://www.qweas.com/download/converters/document_converters/spreadsheetconverter_to_html_javascript.htm
SpreadsheetConverter to HTML/JavaScript offers you to create web pages quickly with Microsoft Excel. It can convert an excel spreadsheet into a HTML-page with embedded JavaScript.

This software inherits the formatting from excel including font, size, font color, background color and many others. You can use it as excel to create your web pages, and excel is not required once the web page is create. The web page looks just like the Excel spreadsheet. This program supports JavaScript and working on all web servers. Your web forms can have embedded calculations and validations. The entered data is collected and made available to you.

Flat View: This topic has 2 replies on 1 page
Topic: Problem accessing AXIS 1.4 Service Previous Topic   Next Topic Topic: Dekart  File Move

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use