Nowhere as complex as some of the scripts posted in this section, but just a little one I wrote. You just use three lines to create and render the barchart:
<html> <head> <title>Bar Charts</title> <style> .barchart { table-layout:fixed; font:normal normal normal small normal monospace; }
<script> function Barchart(id) { var entries=new Array(); var maxHeight=0; var absoluteMax=300;
this.setEntries=function() { for (i=0;i<arguments.length;i+=2) { entries[i/2]=new Array(); entries[i/2][0]=arguments[i]; if (!isNaN(arguments[i+1])) { entries[i/2][1]=arguments[i+1];// COULD USE toPrecision() for newer maxHeight=(entries[i/2][1]>maxHeight)?entries[i/2][1]:maxHeight; } else { throw "Value of parameter "+(i+1)*1+" is not a number"; } } };
<body> Test Page for Bar Charts<br><br> <script> // THE CALL TO CREATE AND RENDER THE BARCHART IS BELOW - 3 LINES var b=new Barchart(); b.setEntries("Anton", 30, "Angela", 55, "Cecile", 24, "Leon", 64, "Rosie", 18); document.write(b); </script> </body> </html>
From inside a javascript function i need to execute a vbscript sub routine. You might be thinking why i can't do it in javascript. well i probably can but i am better at VBscript and it would be a lot easier.
I ve got a bit of a problem adding new options to select. It works fine out of the getJSON routine (see commented line) PHP data supplier returns proper values and alert displays them fine, but can not add them to select
Using Multiselect widget from - http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ and jQuery 1.6 + UI 1.82
[URL]
$("#1").bind("multiselectclose", function(event, ui){ var checked1 = $("#1").multiselect("getChecked").map(function(){return this.value;}).get(); if (checked1<1){
I am having no luck with my post form to mysql. It is only posting the first letter of the word/phrase for the text input fields to the mysql database. It is a photo and text post form. The photo and only first letter of text are posting to database. I am using Jqtouch, jquery, and phonegap.
I have a form button with id="submit". When pressed, ClickGeocode(credentials) is called. This works fine and dandy with: $('submit").click(ClickGeocode) Despite there being no indication that the function takes an argument 'credentials'. So when I want to call the function at some point in my code, I should be able to do something like ClickGeocode(credentials) ... no? However, my issue is that credentials isn't once defined in my code - it is part of Bing Maps function... like so:
function ClickGeocode(credentials) { map.getCredentials(MakeGeocodeRequest); }
So why does it work using .click(), and how can I call the function without user interaction (simply somewhere in my code) even if 'credentials' is not defined?
I am writing a javascript that read and write to MSQL database. I am yet to come accross any documentation on it. Could someone please send me some links to any anydocumention on it. Alos I am writing this under Windows platform.
i am faceing a problem here ..i want that user click on button and it give him a random online user from database...but dont know how to do it ..i am trying..
{ $i=0; while ($i < $num) {
[Code].....
i just want that onclick give me random user for chat ...
I am going to be developing a dynamic dropdown menu for my site, using Javascript (which I know very little about).
Now I need to populate the menu's with items from a MySQL DB. I was wondering how well Javascript and MySQL mix together, if at all. Does anybody have any handy links that might give me some more info on this?
I have a PHP script but ive been told what i want to acomplish cant be done in PHP, but it can in Javascript.
when a user selects another user from a dropdown menu i want a separate field (NON-EDITABLE) to show some information from a variable which holds MySQL Info ....
I have a database holding roughly 20 fields of data per entry. I want to make only one request to the database, store this information in some manner on my client, and then use javascript to deliver this information to the user. Initially the user will be presented with just a list describing each entry, when clicked upon, all corresponding fields will populate. I know how to do this with javascript fairly easily, but I'm not confident in my methods for getting that data from my database ala php to javascript.
The first thing that comes to mind is to write some PHP code to pull from my DB and then echo out a two dimensional javascript array. I have seen posted elsewhere that this method is not ideal... And I can see why as I always run into issues with attempting this... plus it is ugly as all hell. What is clean way to get all this information onto my client so no subsequent server requests must be made?
I am trying to get data from mysql into a variable, that should be read by protovis.
I tried /* abfrage_LB.php echoes a json string with the data from mysql */ var parsedData; $.post('abfrage_LB.php', function(data){ parsedData = JSON.parse(JSONdata); });
the error message says, that parsedData is undefined. How can I display, what is in parsedData?
I have a javascript on my websute that i want to hide from all users , i want put it on a database mysql and recall it, in order to hide the code, how I can make?
I am trying to save a div where I have inserted an image with insertimage() to a mysql databe, everytime it garbles my table for some reason, a div with text only works like a charm. I use serialize/deserialize.
What i want to do is populate a dropdown with data brought from mysql. However there is are two radio buttons i have which i want to choose what data the dropdown i populated with. This is the code i have so far. I don't have no js yet as my skill is php and mysql, not javascript. Code:
When the amount boc changes value, it must change the $credit amount and effect the $total_crt amount (ex. 10 + 10 in credit value - $total_crt value) So whenever the client chooses a new value from the select box, it must change it emidiately with javascript, but only send to the database once an update button is pressed.
Have an html page with form data manipulate a MySQL database.i KNOW my html form and its data are correct so my problem lies within the JSP codehere it is.
Inputting fields works but i cannot delete, this code so things delete from the database properly?
statement.executeUpdate("DELETE FROM Members WHERE (clubMembers = '"memb"')"); statement.executeUpdate("DELETE FROM Members WHERE (MemberAddress = '"addr"')"); statement.executeUpdate("DELETE FROM Members WHERE (MemberTelephoneNumber = '"phon"')");
I have a 'to do' item in a page that has an ID attached to it. These items are stored in a database. When clicked I want to reverse the 'state' of the item (active to complete or complete to active) by updating the database using jquery & PHP.I think I almost have it. As all the values are collected ok and if I change the the page that writes to the database to GET and pass the data through the URL it updates the database fine.[code]
I want to ask you is it possible to use jquery dialog with php. Using this tutorial [URL] I want to call a php script with will delete a row into Mysql database.