The following function converts a decimal number representing a color stored in the way that Microsoft windows stores colors (low byte is red), and converts it to a hex string which is needed for web applications, namely "#RRGGBB".
[CODE=javascript]
function decimalColorToH TMLcolor(number ) {
//converts to a integer
var intnumber = number - 0;
// isolate the colors - really not...
User Profile
Collapse
-
The question should have been:
How does the client keep control, and use the server as a servant and not just package something for the server and the server spits out a new page, leaving the original client out of the loop?
The answer is AJAX. Since I am learning PHP, I still will write the server side code in PHP. But if my PHP does generate HTML, it will send it back to the client who called it, and the client decides where... -
This is not a question about any piece of code. It is a question to explain how to do something in PHP.
I am new to PHP (this week).
In my experience, each time a PHP file is "run" it sends an entire page back to the browser. So, then the user needs to press the back button to get back to where they were before. And in this case, I do not want that to happen.Leave a comment:
-
Use PHP ONLY to write to database
Is there a way to use PHP to ONLY write to the database?
I am calling a PHP using POST to send data to the server to be stored in the database. The logic to save it is in the PHP.
What I want to happen is that the program calling the PHP (with a SAVE button) pops up a modal window indicating that the database operation was a success or not a success. What is happening now is that I am getting a blank page in the browser... -
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Test javascript reset of radio buttons and reload</title>
</head>
<body>
<form name='Form'>
<input type="text" name="Entry" size="20">
</form>
<script type="text/javascript">...Leave a comment:
-
My code is involved, so I would have to do a test case. I will do that. But for now, I have added a button, which has the javascript function of cleaning up all the forms and reseting them to their initial values.Leave a comment:
-
How to send mutiple rows dataset to PHP(mySql) from javascript
I may need to post this on another forum, but I will try here first.
I have a browser client application which generates a dataset - meaning many rows of data, in an internal javascript array.
And, I would like to get this data into a database in the form of several rows.
How do I do this in a javascript function? I have seen cases where PHP generates javascript in order to read (Select) a dataset and... -
This seems to work fine for browsers other than Internet Explorer. With Internet explorer it throws an exception....Leave a comment:
-
How do I prevent IE from reloading contents of Form fields?
I have a javascript routine which is at the bottom of the HTML right before the </body>. In it, I initialize some form fields. This code I know only gets executed when the page first loads and when I press reload (refresh) (F5). And in Firefox and in Opera, the form fields are reset in my javascript and it stays reset. However, in IE, after I reset the form fields in my javascript, IE is filling them out with what they had in them from before...
No activity results to display
Show More
Leave a comment: