Random Choice?
Feb 20, 2005
I have a form with 9 radio buttons that each have a different output. I want to create a 10th radio button called "random." So when a person would select the random radio button and submitted the form, one of the 9 radio buttons would be selected as output of the form.
View 4 Replies
ADVERTISEMENT
Aug 31, 2011
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?
<script language="JavaScript">
images = new Array(3);
images[0] = "<a href = 'photo1.html'><img src='images/photo1.jpg' alt='Photo 1'></a>";
images[1] = "<a href = 'photo2.html'><img src='images/photo2.jpg' alt='Photo 2'></a>";
images[2] = "<a href = 'photo3.html'><img src='images/photo3.jpg' alt='Photo 3'></a>";
[Code]...
View 4 Replies
View Related
Aug 6, 2009
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'),
[Code]...
View 6 Replies
View Related
Jul 21, 2011
DreamWeaver? Visual Studio? gedit? n++? eclipse?
With so many choices out there, which do you prefer?
View 5 Replies
View Related
Nov 28, 2010
I've got a form that performs a calculation upon submit.I want it to perform a different calc depending on the choice from a drop down box in the form.
View 4 Replies
View Related
Apr 18, 2011
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?
View 2 Replies
View Related
Feb 11, 2010
Is an iframe the only way to embed a web page? I would like to embed a web page within a email but some users email clients do not support iframes.
View 1 Replies
View Related
Jul 6, 2011
I've checked the boards and was unable to find something that matched the code that I have. The code basically uses radio buttons to populate results to a drop-down list depending on the radio button they choose. I'm having trouble figuring out where and how to add the redirection url for each of the value choices in the drop down. I was told something about using window.location('URL...) and then to populate the location parameter with the array value. Does this mean I have to redo my script or can another piece of code be added on to make it work. How do I alter my existing code?
View 2 Replies
View Related
Jul 6, 2011
The code below is basically a form using radio buttons to populate results to a drop-down list depending on the radio button option that is chosen. I'm having trouble figuring out where and how to add the redirection url for each of the value choices in the drop down. I was told something about using window.location('http:url.here') and then to populate the location parameter with the array value but i'm not exactly sure how to alter my code to add that in.
<!DOCTYPE html>
<html lang="en">
<head>
[code]....
View 12 Replies
View Related
Feb 18, 2005
I have a form that opens a new window when submitted.
However, many people don't like new windows opening. So, I would like to create an option that would let users control whether the form result opens in a new window or in the same window. Can this be done?
I was thinking of adding a checkbox and if it would be chacked = new window, not checked = same window. How can I accomplish this?
View 2 Replies
View Related
Feb 16, 2009
I want to make different style of alert box on my code how to make user choice alert box.
View 1 Replies
View Related
May 17, 2010
The are two drop down boxes, the first one populating the second (state/county --> town)The first box is single choice, the second is multiple choice. I'm looking for a script that would be able to deal with generating the code for all possible values that could be chosen in the second drop down box.The drop down boxes are part of a form which allow people to search for educational courses within areas of a state/county.
View 3 Replies
View Related
Sep 23, 2011
I have a web form that I'm creating and it has some expandable checkboxes that need to be restricted based on choice.
This is my criteria:
If someone chooses checkbox number 1, they cannot choose any other checkbox.
If someone chooses checkbox number 2, they may also choose number 3 but not 1 or 4, they must also answer the question that appears below.
If someone chooses checkbox number 3, they may also choose number 2 but not 1 or 4, they must also answer the question that appears below.
If someone chooses checkbox number 4, they cannot choose any other checkbox, and must answer the questions that appears below.
One more caveat: If checkbox number 2 is chosen, and they've filled in all three lines of the question below, I need for them to dynamically add more lines as needed.
I have attached my web form so you can see what I've done. I've researched these options and tried code from various examples but I can't seem to get it to work.
View 15 Replies
View Related
Nov 14, 2011
I am facing an issue where a link on my website opens in a new window if you simply click on it. However, if you right click and say open in new window or new tab, it opens the same window (URL) again from where the link is clicked.
Self Service Option is a link and the JSP calls a function getSelfServSite() when the link is clicked. This is how the code flows in my case
function getSelfServSite()
{
getToTheLink("${myConfigInfo.selfServiceURL}");
// this is because the URL is configurable
[Code].....
I want it to go to the right link no matter how the user click it.
View 1 Replies
View Related
Dec 6, 2005
I have a form where, at one point, the user is asked to pick which state they live in. I noticed that, for states consisting of more than one word, whenever it gets emailed, only the first word of that state is emailed to my company. For example, "New York" would be sent to us as "New". Code:
View 1 Replies
View Related
Feb 12, 2011
I am working on a little project here. I have two arrays (States, Cities) I am trying to allow the user to chose one from a select form (Choice) and then have the values of the chosen array displayed in a alert(). Obviously I could just write an if statement and display the required content depending on whether the value selected == States or Cities. But this project is just a placeholder project for me to figure out one aspect of a much larger project I am working on. And it is important for the result to be chosen dynamically as in the final project I won't know the values that the select field is being filled with.
What I need to do is take the value returned from the select field (Choice) and turn that into the name of the array and display that. If I use this code alert(States); then it returns the values of that array. But like I said I need to be able to dynamically select what array to display based on users input.
alert(document.getElementById("Choice").value); returns the value chosen. How can I take the value chosen and actually display the value of the array with that same name. In other words let JS know that I don't literally want it to display the value chosen but rather the value chosen is the name of the array I want it to display?
Pseudo code
x = document.getElementById("Choice").value;
x is name of array;
alert(x);
View 2 Replies
View Related
Apr 29, 2009
I have not been able to get this output change when the drop down menu choice changes. I have looked at numerous examples but I can't find one that has this simple output change. What am I missing?
<HTML>
View 3 Replies
View Related
Jun 22, 2011
I have a select box where the value must be passed via the form. If the users selects choice B or Choice C then I want a specific div to show. If they choose choice A then I want the div to hide or remain hidden. It should be hidden on page load.
Code:
View 1 Replies
View Related
Sep 14, 2011
It's a simple quiz with one multiple choice question and one fill in the blank.
When the user clicks on 'submit' I tried to show some kind of response with correct/incorrect images next to the question. It works with the multiple choice question, but not with the fill in the blank. How can I get the fill in the blank question to work.
Code:
answer_list = [
['False'],
['body','hips','knees']
[Code].....
View 2 Replies
View Related
Oct 9, 2005
Could anyone help me out with a peice of script that will reload the page once a choice is made from a list/menu, so dependant on the choice ($_POST data) another list menu will also display when the page reloads .. I tried a few javascripts from google, but none reloaed the page.
View 5 Replies
View Related
Mar 24, 2010
I'm attempting to make user's input choice dynamically create the scrambled word game. The only thing that changes between the HTML page, and the JS files is the Array used to make the game. I researched Dynamic Arrays, but was confused, as nothing seem related to what I'm doing. What I've got going is all wrong. I know there is a better way to do this, but am confused. SelAry I've tried using too, but I can't get that code to work either. I don't know where to put the eval function. I know that window onload is not preferred, but am too confused.he crap code, using my crap method:
<SCRIPT LANGUAGE="JavaScript"> <!--
function myChoice()
if(myChoice = 1a) {
[code]....
View 13 Replies
View Related
Jun 22, 2011
Ok so I have a select box where the value must be passed via the form. If the users selects choice B or Choice C then I want a specific div to show. If they choose choice A then I want the div to hide or remain hidden. It should be hidden on page load.
<select name="Event_Type_ID">
<option value="1">Choice A</option>
<option value="2">Choice B</option>
[code]....
View 2 Replies
View Related
Jul 23, 2005
I have two drop/down menus that are dependant on each other. When I have
made a choice in both of these menus and press a button I get to a page
depending on the choice made. On this page there is two buttons "Accept" and
"Back".
When I press "Back" I would like to get back to the page with the two menus
and they should be set to the choice I made. Now the just reset when I press
the "Back" button.
Is it possible to save the options that I choose from the drop/down menus
when I get back to them by pressing "Back"??
View 3 Replies
View Related
Feb 16, 2009
is it possible to make a checkbox dependent on a radio button choice? For instance in the code below, if someone were to choose the radio button with the value "admin", the checkbox value "full" (user_admin_f) would automatically be checked?
User: <input type="radio" name="user_admin" value="user" checked>
Admin: <input type="radio" name="user_admin" value="admin">
Full?: <input type="checkbox" name="user_admin_f" value="full">
View 4 Replies
View Related
Jun 7, 2009
I have spent the last 6 hours working on this, and I am about to lose my sanity. I need your help very desparately. I want to create some radio buttons for building a computer for a class project. Basically, what I have now is the radio buttons in separate groups, and a function that calculates the total price of the items selected. But what I am finding impossible to get is this: I need to set it up such as that if you select a radio button in one group, it disables part of the second. What this means in my work, is that say I choose AM3 as the CPU socket, only AM3 motherboards and processors will be enabled, and the rest in these categories will be disabled.
I am trying to set it up in a way that when you first open the page, cpu, motherboard and ram groups all disabled, then based on your socket choice you get different options for motherboards and processors, and then based on your motherboard choice you get different choices for RAM.
View 5 Replies
View Related
Aug 10, 2009
I want reset user choice of radiobutton here is my code
[Code]..
but in some reason it doesn't wotk ,what is wrong with it?
View 4 Replies
View Related