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 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'm trying to use Javascript to have an array of images that load randomly AND work in a slideshow manner so change every 3 seconds (in a logical order). The code I have below presents a random image but how do I get them to continue from the random image and change to the next every 3 seconds?
I've looked for a solution to this issue, but it seems like a little different scenario than other situations. I made a system for generating friend requests on Facebook. I have a grid that is 6 x 3, for a total of 18 cells. Each cell has a picture in it, and the picture is linked to the Facebook friend request page. My problem is that since each cell is populated at random from the array, I'm getting lots of repeats. For example, some picutures are in 5 cells, and some are in none. I'm trying to figure out how to make it so that once a picture is used once in the grid, it does not get used again in the same grid.I still want every cell filled at random on each page load, I just want to prevent the repeating.
Here's my current code: <script type="text/javascript"> var vip_list=new Array( new Array('http://profile.ak.fbcdn.net/v225/1616/88/s1220771654_2158.jpg','http://www.facebook.com/addfriend.php?id=1220771654'), new Array('http://profile.ak.fbcdn.net/v223/1233/29/s904885342_9055.jpg','http://www.facebook.com/addfriend.php?id=904885342'),
For my website I would like to create a famous last words generator (randomized), and random page generator (within my site). What is the code for random quotes and random links?
I am new to javascript but have been using java for quite a while. I am looking to make a random quote (out of ten possible quotes) appear in my h2 tag in a page i am working on. In java, i would make a random number generator, in javascript it looks like this:
Code: var randomnumber=Math.floor(Math.random()*11) Then make an if statement: Code: if randomnumber=1 { var quote="Live long and prosper" }
document.write(var quote); Could someone more experienced than me tell me if my code looks good and how would a go about getting "var quote" in my h2 tag?
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 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.
I start to use JQuery and see how is really simple...! I just have a question that I couldnĀ“t find in documentation or here in the forum, andI have a PHP Script that is a combobox with a several textareas. What I would like to do is, select a data in combobox andit will get some data in MySQL database and put it the textarea inputs.The combobox is from name of persons, and the textareas is address, telephone, email, etc... all of them are in MySQL database.
I am not a javascript programmer, however are checking as I would like to investigate if I can do following:
I have a calculator that check the price for the properties for a choosen date, I use php and mysql to get the result and the result are displayed on the same page refreshing the page using this in the form: action="<?=$_SERVER['SCRIPT_NAME']?>#formdestination">
I know you can print the result using ajax or other javascripts to do this without having to refresh the page and jump to the result.
Was doing a research and I quckly found this link:[URL]..It does not look so complicated, however as I can see the form is done in javascript so I suppose if you have javascript disabled you cant use the calculator.
I would like to have a non javascript solution with the way I am doing it to work if javascript is disabled. An exampel of the calculator can be viewed on this link for exampel:[URL]..