I have a calculate.js javascript file where all the function that execute the calculation is consist in this file. Now, I want to retrieve a data from the database for javascript calculation and be done in this calculate.js file. I have search a lot of methods to do this but most said cannot do this from a client-side.
Does anyone know if this is possible to have a online database? Or can I use access to make a database and then post it online and have it work on the internet?
i'm having the user input their state (from a drop down list) and type in a zipcode (there are 1,143 zip codes in the database to match to)..
what i want to happen is once the user selects the state they live in, and type in a zip code, i need the page to query the database if the user selected Ohio, and match the counties in the database with the zip code they entered, and then create a drop down list of the counties for them to select the one they live in Code:
im trying to get values from a database and assign them to icons which display on my page. The icons that are generated on the page are generated in javascript- and they do work. Howver i want icons to hold the names that are in the database/table.
how would i do this? would this be using a query result in asp to get the values from the database?? how would i do this? please provide code or guide.
then, how would i assign the database value with the icons???? ive heard javascript arrays??? how would i assign the values??
How would I make my page I have connect to a database using javascript dependent dropdowns? I have all the things I need to get the database working where it displays all the info in the database but I only want it to display based on what they select not all of it.
we had someone write this script for us a few years ago and we thought it was working fine until this week. It uses javascript to generate a dependant drop down menu eg. Depending on what the user chooses in the first drop down menu, (in this case a manual/book title) the second drop down displays the chapter/category headings that are available within that manual and then the users uploads a file that appears under that heading.
If our user adds a chapter/category heading with an apostrophe in it the script quits and the second drop down does not display the corresponding chapter headings. We are storing the info in a mysql database and use php and javascript to extract the data/build the drop down menus. Code:
Not sure if this is the correct forum as it covers data retrieved from mysql in a .js file...
I need to grab the last 5 rows from my database (2 fields per row) and list all 5 in a table but from within a .js file that I can externally link to.
I can manage the php / mysql and the output to a .php page but how can this be contained within a .js file?
I believe it is possible but after 2 days of searching on google I'm appealing for assistance.
I realise this could be done with a php include or iframe but that isn't an option and the only way available to import this data is via an external javascript script.
I have this PHP page that has the following functions...Insert Form into Table in MySQL DatabaseDelete Entry from Table in MySQL DatabaseA Link to a separate page where I Edit entries I have coded a PHP function for Delete. Looks like this:
// delete if provided if (isset($_GET['id'])) { // query to delete $query = "delete from student where STUDENT_ID =".$_GET['id']; //execute query if ($db->query($query)) {
Somewhere else I query the results and print them into a table. I added a column to this table with a Delete link for each row. Clicking on delete will execute the PHP function to delete.
From here however I need to change those links to Buttons. One for Delete and another for Edit and use JavaScript functions to make them work as they originally did. So this is what I've done...
Next I need to write functions...this is where I am lost. Usually I'd know what to do when referencing elements in forms, i'd do something like document.formname.inputname, but my problem is those links or should I call them actions are replaced by those new buttons.
Should I put them into a form, or make them hidden, and then name the element? Or should my function look something like this...all I really want to do is to call the function, and have the function just do the action of loading the link (don't know if that sounds clear). I've tried to do this but it does not work.
<script> function Delete() { document.myform2.action="href='$_SERVER['PHP_SELF']."?id=".$row[0]'"; document.myform2.submit(); } </script>
Can anyone tell me what i am doing wrong, and could you please point me in the right direction?
IE 6.0 (not interested in other browsers at the moment)
I have looked everywhere I can find to look and googled until I am cross-eyed and am hoping somebody knows what I'm doing wrong.
I have an HTML application (.hta) working fine, except one thing. I'm trying to write to a local database from a .htm window (opened from the main .hta window) and it doesn't work with any of the combinations I've tried (and I admit to having tried a lot).
Here is one method I've tried:
strSQL = "Update myTable SET myField = 'myValue' WHERE myID = 12;" var db = new ActiveXObject("ADODB.Connection"); db.Provider = "Microsoft.Jet.OLEDB.4.0";0 db.ConnectionString = "Data Source='c:myDirectorymyDatabase.mdb'"; db.Open; db.execute(strSQL);
I can easily access the information in the myDatabase.mdb and display it on the screen.
I can ask for updated information to be input on the screen.
But stuffing that updated information back into the database is the problem.
Since I'm stuck in an .htm window, I don't have VBScript available, do I? If VBScript isn't available and it isn't physically possible with Javascript, then I'll have to revert to .hta windows, where I know I have VBScript available. But I'd rather do it all in Javascript within the .htm so as to avoid the security message that pops up when the .hta opens a new .hta. For various reasons I don't think it is possible for me to do this whole project within a single .hta.
I am making a webpage that can query a database table of employees and return them in a html table. Currently I have submit buttons beside each employee to open the page to edit their details. I have been using php/HTML to do this, but wondered if it is safe to use javascript to just click on the name of the employee to jump to the edit page. I've been looking on the web for sometime about how to do this without any luck. Any thoughts?
I have been searching how to connect to a database and execute some queries, and then use the data that I get to populate some tables in a web page, all this using javascript.
I am confused because I have seen in some webpages that javascript is not designed to connect with databases, and also I have see other pages where they say that it is possible.
Does anyone know if it is possible to use javascript to connect to a database (informix), and execute some procedures or queries?
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 am attempting to create an Access database connection from within an HTML page. I am using Javascript to make the connection and then test a basic UPDATE statement.
The following code is throwing back an error 'UPDATE statment syntax incorrect'
Code:
I thought the syntax was correct, but maybe it is something else?
According to this[url] I prepared mine search which works fine. it displays which products are intel and which amd for example. I wonder how can i add a second similar search for sochet or something else,but not separate one for example if i have selected the intel as 1st option then choosing my 2nd one it display only intel products.
i want to add a image tag on my database so that while filling student form.they can also add image of student by selecting that image from the computer.how can i do this
I'm making a list on a web page of my different books (exemple).
<a href="#" id="permissions1">my favorite book </a> <a href="#" id="permissions2"> best selling book </a> <a href="#" id="permissions3">most expensive book </a> When the user clicks on the link, I want to do a dropdown sheet with the info of the book (the info is in a mysql datebase), name , author, nb pages etc)
I have generated onclick fonctions automatically, that passes a parameter (ie 1,2,3) but don't know how link it to the info in my database.
There are only 25 books, so I could just create an array and get it that way. But the day that I modify info in my database, I'd need to correct my code and I would like to avoid that.
I am currently working on a static website for an auto parts company. I've spent quite a long time with the owner of the business in developing a javascript version of a windows explorer type of navigation to be able to find these parts.
I was just notified that the individual that wants this done also does not want the external .js file to be able to be copied, and someone else profit from his/our work. I know that you cannot hide a client side file; no matter how hard you try someone can get it. However, if I deciped to go with a database instead, could I use a variant of this file or convert it to another type that will allow me to use an access dbase that we have, and yet keep my navigation the way I programmed it?
I do not know the value of both PHP-Values, they come from a database. I have tried now some hours to grab the values of this array, because i have to compare them to other values in similar inputs. But I simply do not know how? For a simple test i simply want to change the value of the chosen fields. I tried (nearly) everything from something like $("input[name='combi']").val('test'); to $("input[name='combi'//[//]//[//]]").val('test'); . In PHP I have absolutely no problem, i go simply through the arrays with:
I'm looking to fill out an input box, and onBlur get info from the database and echo it. Very similar to how you register on this site, when you fill out a username, onBlur it checks to see if the username is available and echos yes or no. I want to fill out a username, and when you click out of the textbox, echo the First and Last name if it exists.