How To Force Decimals To Display In Exponential Notation

I am programming a page that displays scientific data retrieved from a
data source to an asp-web page and i would like to force all number to
be formatted/displayed in scientific notation no matter what the value
is. (i.e. x = 123 would be displayed as x = 1.23e+02). The standard
function "formatnumeric(x[,n])" does not seem to be able to do this for
me or at least I don't know how to use it that way.

View Replies


ADVERTISEMENT

Decimals From MySQL

I'm as the topic notes, having some problems with recieveing decimal values from my database(MySQL). I'm pretty sure its a simple misstake, but since im pretty new to asp-syntaxes, I dont get it.

What I have is a table with a float(30,30) (yes, 30 decimals, its an experiment so I wanto "be safe"). I can take a variable, fill it with a jibberish numeric value say 1.111111111111 and write it in, works like a charm if I check the database manualy, however, I cant get it out!

Whenever I read from that database and into a value, I only get the first 5 decimals and the rest is left out, even if I display the database-value directly I cant get it to work!

If I do response.write MyResult("value") it still displays 1.11111 even if the actual value in the database is 1.1111111111->etc.

What could be wrong here?

If I do a little .....

View Replies View Related

Dropping Decimals

I created a "calculator" but it spits the results with too many decimals.Is there any way to write only the first two decimals as suppoused of all the ones the operation creates?

View Replies View Related

Rounding Decimals 2 Places

Right now I round my number to 2 decimal places... and since I am dealing with money values I need to show $100.70...but my calculations show $100.7. Is there a way to fix this? How can I tack on a "0" if it only shows 1 decimal place?

View Replies View Related

Show Fixed Decimals

How do I show a double with 2 decimal places in vbscript? Also is there a way to show a string that is holding a number with two decimal places or does it need to be converted to doulbe first and then converted back to string after manipulating the double?

View Replies View Related

How Do I Remove Decimals From A Shopping Cart Prices

I have almost completed a small japanese shopping cart in asp. The shopping cart was freecode in english and I converted it to japanese. The problem is japanese Yen does not use decimals and the prices are displaying decimals.

The cart uses a access db, I went into the db and specified the price to have no decimals but the decimals are still being displayed . Is there a easy way to get rid of the decimals Code:

View Replies View Related

Force Refresh

My main page shows a table to which a user can add data to by clicking on a button, this in turn loads up a pop up window where the data to be entered is typed. Once the data is submitted the popup window is closed via Close button, but the table on the main IE page only shows the updated information if the refresh button is clicked.

All i want to know is, is there a way of forcing refresh of the main page when the close button in the popup window is clicked. Code used for the close button:

<TD><a href="javascript:self.close()" title="Close"><IMG align="center" src="http://localhost/***/close.gif" alt="Close Window"></a></TD>

View Replies View Related

Force ASP Code

I need to find a way to force all the asp code on a web page to load
regardless if the user hits the reload or stop button on the browser.
I am seeing where more and more users are doing this and it is causing
me some problems on some pages. I would guess there is a way to do
this I am just searching for the wrong thing?

View Replies View Related

Force Grid

I got my excel doc to export but it has a white background, can i export it with with out the background and show the grid like a normal file

View Replies View Related

Force A Download

how would i for a browser to download a file (specifically mpgs) i can get it to go for small 4mb files, but the larger ones if they do go, take bout 15 mins to even begin the download.

View Replies View Related

Force Download

I'm trying to create mp3 downloader and force download instead open in explorer. it's ok if the song is at my server but what if songs are at another server. I try to split full path to file path and file name but doesn't work. Script don't work if is song at my server and path to song start with http://www...

View Replies View Related

Force Caching

Every time my page loads in IE6 the navigation reloads. How do I stop this happening? It works fine in FireFox.

I do have <% response.expires = -1 %> at the top of my page. Would this affect the navigation graphics as well?Can I force a user's browser to cache the nav?

View Replies View Related

Force Save AS

Is there a way to force a file to be saved instead of using the "default action". In my situation, I've got a series of MP3 files that are being used by my chorus as a learning tool for learning the current music quickly. I have instructions on the site telling them to save the files to their hard drives and to play them from there.

However, people are just clicking on the links and their default MP3 players are trying to play the files. Now, I have compressed the files pretty hard because some were griping about the filesizes, so if they are played right off the link, the quality is a bit choppy. If they save it to their hard drive and play it there, it sounds fine.

View Replies View Related

Force Prevailing 0

Is there an easy way to force ASP to display integers less than 10 thus: 01, 02, 03 etc

There must be an easier way than doing an If < 10 calculation etc. and adding a prevailing '0' - mustn't there

View Replies View Related

Force Full URL

Just curious: is there a bit of ASP code you can place in the top of a document that will force all root relative image and file paths in the HTML of this doc to expand to include the full URL?

I doubt it, but before I did it manually, I thought I'd ask. We use a template of sorts, but need one document to use the full URL, and it would better to just have it that way in the one document and not the entire template.

View Replies View Related

Force Download .pdf Files

I'm trying to force a file download using ASP but not getting very far... I want the browser to send .pdf files to the user rather than trying to open them within IE (or wotever browser). Does anyone know what code I should use for this?

View Replies View Related

Force Save As Dialog

Is there a way I can force a Save As dialog? I have a page with a bunch of files listed for download. Unfortunately, these files attempt to open directly in the browser. I need a way to force a Save As.

View Replies View Related

How To Force A File Download

How to force a file download

Is it possible to use ASP to create something like, the following webpage, where you click on the download Mozilla now and up pops the downloader.

http://www.download.com/Mozilla-Fire...eatured.editor

I need to make it so that I can download a .WMV video file. because giving users the direct link doesn't work and I think its alot better than asking them to right click and save item as..

View Replies View Related

Force Download Of .pdf Files

The below code forces a prompt to the user to open or save the .pdf file file to their local machine. It seems to work great except I have one user who can not open any .pdfs using this prompting method. He gets an error that says "File could not be found". However, if we choose the 'save' option instead, we can save the file to his local machine. He can open .pdf files from normal links to .pdf files. It's just this prompting method that is causing a problem. So, I'm perplexed.

I did some digging and found that there is also an FSO (File System Object) method (which may or may not solve my problem), but I'm not sure how to impliment the FSO or if that will even help me with this.

View Replies View Related

Force Download Of Pdf File

How do i force a user to download from a hyperlink as adobe pdf file, it loads up in a new window and I need them to download it, or at least give them the choice to download it.

View Replies View Related

Force Activex After Declined

We have a web application that prompts the user to accept an ActiveX control (in this case, a report creation control) and then continues. If the first time the user gets this prompt, they accidentally decline to accept, they have no way to force it to load later. Any suggestions on how we can force this prompts again?

View Replies View Related

WWW-Authenticate To Force Anonymous

I have a server that hosts a few intranet sites. The one that all my coworkers have their Home Page set for causes their browser to authenticate, which is all good.

The one i'm working on now requires Anonymous Access in order to work, but the authentication from the first one is carrying over to the other. Can I use WWW-Authenticate to force anonymous access isntead of using it to force NTLM, Basic, etc?

View Replies View Related

Force Character Wrap.

is there a function in ASP that can force a database result to automatically wrap at say.. 25 characters in length? Reason for this is because I have a database and people could go in and put a message like

"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM"

and when it is displayed on the site it will make the layout all messed up.

View Replies View Related

To Force The Dowload File

i want to force the download of file . i am using a win nt (iis4).

View Replies View Related

Force Scroll To Bottom Of Page?

I have a page that does a postback using ASP.NET and VB.NET. Basically, there is a form item that changes the settings on the page and it is near the bottom of the page. If you change it, the page has to refresh to display the changes to the page, but when it does, the refresh causes the page to be displayed at the TOP of the page.

Is there a way to force the page to either A: scroll to the bottom or B: (even better) scroll to a certain focus point on the page by giving the name of a control or something?

View Replies View Related

Force Page To Open In Table

I have 2 .ascx files and one .htm file. One of the .ascx files is basically just a table with four rows. One of the rows has table for the other .ascx file, which is the menu, and the .htm file, which is the body content. Code:

View Replies View Related

ASP Force Download Of File From Webserver

I am creating an asp application which is essentially a file management app. I am trying to get my head around a technically issue wonder if someone can offer some help.

I want to be able to force the download of the files are attached to a particular record.
The code which i use to force the download is:

<%
strPath = "C:MyFiles"
Set Upload = Server.CreateObject("Persits.Upload")
' Build path to file
strPath = uploadfilepathactual
Path = strPath & "" & strFileName
Upload.SendBinary Path, True, "application/octet-binary", True
%>

I want to be able to change the path to say something like

strPath = servernamec$myfiles

Is the above possible. Any other alternatives.

View Replies View Related

Force Refresh On Back Button

I'm writing a math quiz. Every time the page loads, random problems are generated. The student enters the answers in text fields. They submit the form and the answers are checked.

if they were to press the back button, the same page will be there, and the student can fix the wrong answers. Is there an elegant way to force the page to refresh when the student presses the back button?

View Replies View Related

Force Refresh On Back/Forward

How do I force the page to refresh when the user hits the back button on the browser? I have an 'add' record form and I have inserted code so that it will not duplicate if the user submits the form several times.

however I just discovered that if the user goes forward then back and submits again it will create a new record. I want it to display the 'page expired' message.

View Replies View Related

Is There A Way To Force A Post Without Using Submit Button?

Is there a way to force a post without using submit button?

View Replies View Related

Force Word Doc To Open In Browser

has anyone got a way to force a word doc to open in a browser (it's for an intranet site before anyone asks), I can force the download, but I don't know a way to force the browser to open it.

View Replies View Related

Force A File Download Dialog Does Not Work In 5.5 Sp1

i am using the following code to force a file download dialog in asp

Response.ContentType = "application/vnd.ms-excel"
response.AddHeader "content-disposition","attachment; filename=" &" &
StrFileName

Now the it works fine in ie5.5 sp2 but no ie5.5 sp1 it prompts the
user twice the open dialog box.

i found on microsoft site that it bug in ie 5.5 sp1 and it says to
upgrade to sp2.

but my users are not willing to ugrade there ie. can you please help me out how can work this in ie5.5 sp1 or anyu other way to force a file download...

View Replies View Related

How To Force Pdf Download - Not Open In Browser Window

How do I force a pdf to be downloaded rather than opened in a browser window?

I've got the code below, which seems to work in Firefox, but in IE7 it spits out a huge page of wierd characters:

<%
Response.ContentType = "application/pdf"
FPath = server.mappath("pdf/portfolio.pdf")
Response.AddHeader "Content-Disposition","attachment; filename=" & FPath
Set adoStream = CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(FPath)
Response.BinaryWrite adoStream.Read()
adoStream.Close
Set adoStream = Nothing
Response.End
%>

View Replies View Related







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