we have a list of names, generated by parsing an array JS source file.The site and the main page is ASP, linked to a Database.Is there a way to store the JS-generated text, inside the Database?To be more clear:Code:
<!-- excerpt from mypage.asp -->
<script type="text/javascript">
// VariableNames are an array result, but here we list a simple example:
i have a image that need user click on it and get the coordinates and store the coordinates to mysql database by using php. Here my code:
Code: <script type="text/javascript"> function(ev){ var pos=zxcPos(this.img); var mse=[ev.clientX-pos[0],ev.clientY-pos[1]]; var ary=this.ary; if (ary.length>4) [Code]...
Finally i got what i want but whar is missing is how how can i get those dynamically textboxes / Dropdowns strored or capture and stored into a database table.Un employee can go and select projects he is working on then the current 6 months time assignment to this project: each row or line is 1 project with respectibe assignment time.
I just recently started getting into JavaScript (2 days ago) after seeing how limited HTML and CSS by itself is, and I created a game where you have a certain amount of time to click as much as you can.
The game works fine but the problem is with my leaderboard. I want to be able to store the high scores and names so that everybody see's the same thing. I know cookies save data but is that only clientside? All I need to do is save 6 variables so that the leaderboard is always updated.
I too have a problem with Ajax POST method and Send. I have set up a Site Search using the Google Ajax Search API, and it works fine. The search term is stored in the variable (?) query. Just to make sure, I have set up a new variable (searchTerm) to read the value of query, and a temporary Alert box shows that this variable does indeed contain the search term.
I want to store the search terms in a database so I can see what people are searching for. So I set up a POST method to send the searchTerm to a php file, which uses if (isset($_POST['searchTerm'])) to obtain the searchTerm and then insert it into a MYSQL database. But it doesn't work.
When I couldn't insert into the database, I added a second (temporary) insert using a dummy value as the else part of the above if statement, to test (1) if the Ajax file was actually setting the php file going, and (2) to check my Insert code was working. Both work.
So the problem is clearly that either the Ajax code doesn't Send correctly, or the php isn't receiving it. I am stumped to find what is wrong. Here are the two relevant sections of code:
Quote:
Quote:
To repeat, the php is running and always loads the dummy variable from the else section, indicating that isset($_POST['searchTerm']) is null.
How do I store an object reference inside a variable when I want the object reference to to reference the first "ul" html element nested inside the current object (as referenced by this keyword)?
What I am trying to do is this, when I mouseover a link I want to get one part of the adress and use it as a variable in a mysql-query and get information from the database. I have made the mouseover function to show i div-tag, now i want to populate it with data from the database. Haven't been able to find any tutorials on the subject. So if anyone know how to solve it,
I am trying to generate javascript variables. It looks right in the source, but causes a problem. Can someone have a look and tell me why. I have a php script that is pulling out a load of map icons from a database: [URL]
I've attached a cut-down version of a script I am working on. It's a pretty simple button with a function attached, which creates a random number and compares it with a preset value.I can't seem to get the function to read the variables
I've always wonder if there is diference when declaring and initializing a varible inside/outside a loop.
What's a better practice? Declaring and initializing variables inside a loop routine, like this:
for(var i=0; i<list; i++) { var name = list[i]; }
or outside a loop routine, like this:
var i; var name;
for (i=0; i<list; i++) { name = list[i]; }
or are both the same....
As a programmer, i always try to practice good programming. I always thought that by declaring and initializing the variable inside the loop, i was creating a new memory space every time instead of just 1 time...
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?
I have some JavaScript which is splitting out the different variable elements from the URL.Now, how do I set the internal variables?Then I want to set the variable ScriptHeading to be Change and the variable ScriptType to be NewThread.I keep finding all sorts of lovely code showing how to split out the various sections in many different ways, but I can't find anything on how to actually set these variables.
I've been searching for about 3 days on this topic. I'm trying to get a template field inside of an ASP.Net detailsview control inside of an ajax updatepanel to work with the jquery datepicker. Very frustrating! I'm using VB with VS 2010. I can get the datepicker to work fine with a simple text box inside of an update panel but when I put it inside of a detailsview control it stops working.
var obj = {}; with(obj) { var x = 10; } print(x); print(obj.x);
It prints 10 and undefined. Here, one could expect that obj.x get the value 10. But it's not the case, because variable declarations are placed at the start of function code (or global code), so the previous code is equivalent with:
var obj; var x; obj = {}; with(obj) { x = 10; } print(x); print(obj.x);
You can clearly see now that x is placed in the outer context. But consider the next:
var obj = {}; with(obj) { eval("var x = 10;"); } print(x); print(obj.x);
I was expecting that obj.x would get the value 10 here. But no, it gives the same output as the previous code. I tested it with spidermonkey, kjs and ie jscript. Looking at the ECMA spec, I could not find anything that describes that behaviour. Code:
I am working on a cognos requirement, where we have implemented java script code. The thing is, At the run time, when we give a serial number in a text box and press finish button. The serial number which we gave has to be stored in the text box. Later when the user clicks the "Clear" Button. The serial number text box has to prompt for fresh value.
I am using JavaScript for a web project and I'm using cookies and I have 5 links for different movie trailers and I have a trailers.html page with a div with a id="movie" and want to know so that when you click on a Movie trailer link so that it stores a value in a cookie so that you can check on the trailers page which trailer was chosen and display in the div tag
I have 3 divs in a page, and each div contains a submit button. When the submit button is pressed, i want to process a form contained in that particular div and insert the id of the div into a database in which the submit button was there.So, i want to retrieve the id name of the div and store it in a PHP variable so that i can put it in my sql query. How do i achieve it?