. I basically have a simple AJAX voting sytem for stories. The problem I have is the php script takes a $_GET['id'] to work. What I was wondering was how I can pass the id value via AJAX to the PHP script.
1. it reads some variables: [php]... echo "<tr><td></td> <td><input id ='desc' type='text' name='desc'></td> <td><input id ='sap_nr' type='text' name='sap_nr'></td>
I was wondering if there exists a script that would do two things:
1) Determine the IP address of the site visitor
2) and, based upon the IP address being either an odd or even number, display a particular version of a webpage. (Odd-numbered IP would show page version A, even numbered IP would show version B)
The reason for desiring the above function is to be able to do a split-test to find out the pulling-power of two slightly different page designs.
I have a html page with a lot of thumbnails. The idea is that when the user clicks on an image the onClick event is to display another detailed form and deliver to that form the name of the image in a variable. In the detailed php-form there is a query to MySQL to retrieve a record. The record will be retrieved by a Query based on the name of the picture. Apparently the PHP cannot do the job. I had an idea to make the thumbnail page as a form and to use use a hidden field with the thummnail name which should be carried on with the $_POST array through the submit button but i do not want to have a submit button. The more elegant way is just by clicking the picture the detailed page is opened and the variable is transferred where my php code can make use of the variable for the query. I have never used java before so you have to excuse for the lack of knowledge.
I have looked at this code and determined I will get the following if I run individual variable. x = 10 y = 5 z to 5
However I am not sure. Because when I run the function using document.write Like this: Code: document.write(get_xyx()); I get undefined
Here is the code: Code: <script type="text/javascript"> var n=5; var x=n + n; var y=n + n; function get_xyz () { var x = n; y = n; z = n; } get_xyz(); </script>
I want to be able to enter a value on a page (like 3.2), and then read it as a 32-bit float and break it into it's individual bytes.
I've tried using bitwise operators, but they seem to convert the value into an integer first, and i've tried using the toString() method to convert it into a hex value so i can parse it, but that also seems to first convert it into an integer.
I'm trying to use the $.ajax to load an html file that has content grouped by divs with id's. I would then call the correct content via its id depending on the window.location.hash. I'm having trouble figuring out how to append the content to the existing <div class="content"> on the page.
Basically I have created 3 pages - index.html, page1.html + page2.html
I have 2 links in index.html that link off to page1.html + page2.html
My question is, can I use javascript in such a way that if I click link 1 then page1.html opens in a new window but if I then click link 2 then page2.html appears in the window that currently has page1.html?
I have a page that has a scrolling ticker at the top and streaming video in the middle. I want the scrolling html marquee at the top to refresh every 30 seconds but I can't reload the entire page or the video will restart.
I know that javascript could do this but I have no idea where to start or how to do it.
has anyone done this and can paste me some code to use?
I was wondering if anyone was aware of a script that would reccomend products from a list on another individual products page?
I would like something that will list three products that a customer might be interested in when they are viewing an item on my site.
I have an ecommerce site where I was told that I needed to use javascript to avoid paying alot of money for something very complex and more than what I need.
Does anyone know if this is possible and if so, do you have a script to get me started?
Now, my problem is, I'm not sure how to combine the words to only show once (i.e. only show the word "the" once, with a ": (number of times the words has appeared)" next to it.
By the way, this is what the assignment says:
To do this have two local arrays in your method, words, which is a String[100] array and count, which is an int[100] array. (There won�t be more than 100 unique words in the file.) Each time you read in a new word using next() first scan through the values currently in the words array to see whether it is already there. If it is, then add one to the value in count with the same index. If it isn�t then add the word to the words array and set the corresponding count element to 1. As you have in previous programs you�ll need a variable called, say, nextIndex, which is initially zero and gives the next available location in the array.
I need to return a wrapped-set by filtering another wrapped set, however the filter is based on creating a Range object from each of the items in the first wrapped set.[code]...
I have been using jQuery for several years now, and I love it! I am 99% sure my problem can be solved using jQuery, but I am not sure how difficult it is going to be.in jQuery. As you can see, there are 7 different image boxes. At the beginning, all the images load at once, then after awhile 2 or 3 will fade to something else. Then, all 7 will fade together into something else. I would like to give each image it's own timeline. I want to do this in jQuery so it looks correct for every device (including iPhones/iPads).
I'm new to jQuery/JavaScript and I wondering if this is because it can only see classes/id that are set on page load. I'm using the code below to give elements on my page individual id's. $(".text").each(function(count){ var new_id = "txt_" + count; $(this).attr("id", new_id); }); But when I try and call this id later in the code, it doesn't work.
Many slider solutions available but they have parameter that forces same delay for display of each element in the slideshow. I'm looking for existing code that:
(1) would display the contents of a div, that is, HTML plus img, as element in slideshow
(2) automatically progresses to next element in slideshow unless paused by mouseover
(3) each part of the slideshow would have its own delay to determine viewing time
(4) FWD and BACK ability for user to interrupt sequence and move along manually
(5) wrap-around at end to resume at begin
Many snips of code out there do everything except (3) since they set one delay that applies to all elements in the slideshow instance, do not support individual delays for each part of the slideshow.
I'm trying to put <span>'s around individual characters. Here's what I have so far, but can't seem to tie it up properly. Alert testing each letter works fine; just can't seem to be able to use the wrap function at this stage..?
I am interested in using RaphaelJS for creating VML/SVG rounded corners etc, but unless i physically put the <script> right after the element to which it needs to be applied, i have to rely on the single DOM load() event. which causes a delay before any script is executed,...thus a FOUC (flash of unstyled content).
i'm guessing there is no way to track when individual elements are loaded into the DOM via a CSS filter or similar, or another way around this other than having <script> in the body or just dealing the the load delay?
I'm writing a piece of JS code that returns a result of true if the pattern appears in string as a substring (case sensitive) but would like to extend its functionality to returns true if all the individual characters of pattern appear in string (regardless of order).
I'm writing a piece of JS code that returns a result of true if the pattern appears in string as a substring (case sensitive) but would like to extend its functionality to returns true if all the individual characters of pattern appear in string (regardless of order).
For example:This is what the program currently does:
match1("adipisci","pis") returns true
Whereas I would now like it to do this:
match1("adipisci","sciip") returns true match2("adipisci","sciipx") returns false because x does not exist in variable match3["adipisci","adipisci"] returns true in array 1 and 2 if "sciip" is searched match4["adipisci","adipiscix"] returns false in array 1 and true in array 2 if "sciipx" is searched
I am having difficulty implementing this into my code... this is what I've done so far:
var pages=[ "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "Nulla imperdiet laoreet neque.",
Problem is, obviously, this animates all 6 buttons. I could write individual functions for each element but that seems wasteful. I'm assuming there is a way to do this in a more efficient manner.
I am very new to JavaScript / JQuery... Need to iterate over the following segment of code and either return an array or single value the e-mail addresses assigned to these labels (these are hardcoded as the check boxes values):
I have a DatePicker , and a dropdown on my page. When the page loads, the datePicker shows the current month and assumes that no value has been selected in the dropDown. Once the dropdown is selected, I need to reload the datePicker based upon some data returned.