Create vote poll javascript?

Hey guys I'm trying to code a poll vote for my Web site. I already have the shape and it did submit to a javascript function. From there on, I try to store the variables in an array. But now I want to know how can I keep the permanence of poles so that when the page is refreshed the polls still exists.

Here is my code:


< script type = "text/javascript" >
Yes var = 0;
var maybe = 0;
var no = 0;
notsure var = 0;
output var = new Array();
writeText (form) {} function
If the answer is YES
{if ((document.getElementById('yes').) Checked)}
Yes = Yes + 1;
output [0] [0] output = + Yes;
document.getElementById('yes1').innerHTML = yes;
} else {}
document.getElementById('yes1').innerHTML = output [0];
}
If that answer is maybe
{if ((document.getElementById('maybe').) Checked)}
= Maybe maybe + 1;
document.getElementById('maybe1').innerHTML = maybe;
} else {}
document.getElementById('maybe1').innerHTML = maybe;
}
If answer is NO
{if ((document.getElementById('no').) Checked)}
No = No + 1;
document.getElementById('no1').innerHTML = no;
} else {}
document.getElementById('maybe1').innerHTML = maybe;
}
If response is NOT SURE
{if ((document.getElementById('notsure').) Checked)}
notsure = notsure + 1;
document.getElementById('notsure1').innerHTML = notsure;
} else {}
document.getElementById('maybe1').innerHTML = maybe;
}
}
< /script >

< form id = "form1" name = "form1" method =: "get" action = "" >
< table width = "173" border = "0" align = "center" cellpadding = "0" cellspacing = "0" >
< b >
< td colspan = "2" align = "center" > < table >
< /tr >
< b >
< td colspan = "2" align = "center" > < img src = "site-items/headings & amp; logos/graph.png" width = "165" height = "84" / > < table >
< /tr >
< b >
< td colspan = "2" style = "color: #FFF;" background-color: #000; do-family: "Times New Roman", Times, serif; text-align: left; "padding: 8px" > MAKE YOU FEEL YOUR < br / >
The COMMUNITY LEADERS < br / >
In FONT ENOUGH < br / >
FOR people with DISABILITIES? < table >
< /tr >
< b >
< td width = "93" align = "left" bgcolor = "#FFFFFF" >
< input type = "radio" name = "radio" id = "Yes" value = "yes" / >
< label for = "Yes" > < strong > YES < facilities > < / label > < table >
< td width = '80' bgcolor = "#FFFFFF" > < div class = "output" id = "yes1" > < / div > < table >

< /tr >
< b >
< td align = "left" bgcolor = "#FFFFFF" > < input type = "radio" name = "radio" id = "maybe" value = "maybe" / >
< strong >
< label for 'maybe' = > maybe < / label >
< facilities > < table >
< td width = '80' bgcolor = "#FFFFFF" > < div class = "output" id = "maybe1" > < / div > < table >
< /tr >
< b >
< td align = "left" bgcolor = "#FFFFFF" > < input type = "radio" name = "radio" id not = "none" value = "no" / >
< strong >
< label for 'no' = > n < / label >
< facilities > < table >
< td width = '80' bgcolor = "#FFFFFF" > < div class = "output" id = "1" > < / div > < table >
< /tr >
< b >
< td align = "left" bgcolor = "#FFFFFF" > < input type = "radio" name = "radio" id = "notsure' value ="notsure"/ >
< strong >
< label for 'notsure' = > NOT SURE < / label >
< facilities > < table >
< td width = '80' bgcolor = "#FFFFFF" > < div class = "output" id = "notsure1" > < / div > < table >
< /tr >
< b >
< td align = "left" > < table >
< td > < input type = "button" id = 'vote' alt = 'Vote now' onClick = "writeText (this.form)" / > < table >
< /tr >
< /table >
< / make >

You will need the form submitted using server-side PHP, Colfusion, ASP or similar code. According to the number of entries, you can choose to go for a (text) file containing the data, or as a better solution, store the information to you in a data base.

The problem with JS, it's what the script client which is inerpreted by the browser-side. I saw JS that interacts with the server; I have not tried, or I will try it because it is not the function of JS.

If you would like more information on the HTML treatment just Google the subject and you should get all the information you need.

GRAMPS

PS It is best to use POST instead of GET to your form method.

Tags: Dreamweaver

Similar Questions

  • How to create a poll? (how to select a valid 'place' to tie it?)

    I wanted to create a poll. Everything went well until that "choosing a place." I would choose PL/SQL or PL/SQL (MOSC), but I can see all the choices are grey except "B2B Marketing."

    How can I create the survey? If I can't create it, perhaps someone of MOSC might create for me, I think that it is stored in the system (AUTHID: DEFINE or CURRENT_USER?)

    Thank you and best regards,

    Bruno Vroman.

    As far as I know, you can only create polls "private" under your username, and invite other users to vote.

    This isn't what you're looking for, but it is this only available at this time.

    It might not work to all currently because of spam hit the community.

    Timo

  • Options grayed out database when you create the ASP (Javascript) page

    I recently installed CS5 Master Suite on a Windows XP-32 and was able to create pages ASP Javascript that can connect to and update a Microsoft Access 2003 database.  But given that some applications of the necessary suite of 64-bit operating system, I wiped the machine and installed Windows 7 64-bit.

    I managed to get it set up so that I can connect to the database if I create a new page ASP with VBScript, but if I create a new page with Javascript, the ability to add a new connection in the data pane is dimmed, despite all the items listed under being checked.

    I guess that the DSN is configured correctly, because VBScript pages work.  I installed IIS7 on the machine with the 32-bit application pool enabled so that the server can connect with the 32-bit ODBC driver.

    Tips on how to get the database connection works in Javascript pages would be greatly appreciated!

    I was under the impression of support Adobe dropped for ASP/Javascript in CS5.  You say it worked in 32 bit?

  • Create a poll

    Hi, I'm trying to understand if it is possible to make a poll with Muse. It would be where someone clicks on a button to participate in an inquiry. Then they meet a series of questions (or both), instead of multiple choice and I would be customizable where it can lead to different questions and then end up with a link.

    Basically, it's has take this investigation and he will recommend a product based on the answer. Is this possible in Muse? Or by a combination of other services to Adobe Integrated Muse?

    As I said, you need a dynamic backend for logic and store data. If you do not want to use BC or the services I mentioned and you want some things on your own host, then you still need Wordpress, Joomla, Typo 3 or whatever and all the trimmings as a web server with a PHP engine. Kind of a circular thing and dance around the question, if I may say. Of course, you can be able to work around this problem, with a few basic shapes and the widget, but ultimately, you can end up having 1024 of them to cover all the options, even for only 10 questions. It can be easier to simply design classic pages and create a complete FAQ, then people have to contact you via a generic form. Automated responses can be configured on the BC account backend.

    Mylenium

  • Create Acrobat with JavaScript form field and restrict numeric values only

    Hello

    I use a JavaScript loop to create a number of similar form fields. I'm trying to restrict the data entered in these fields of numbers only. I am able to validate the figures who are registered, but the fields still accept text, I don't want to. How can I make sure that text is not accepted?

    Script:

    var x 1 = 53;
    var y1 = 358;
    var x 2 = 123;
    var y2 = 340;

    for (var i = 1; i < 18; i ++) {}
    var name = "MyField" + i;
    var type = "text";
    var page = 1;
    rental var = [x 1, y1, x 2, y2];
    myField var = this.addField (name, type, page, location);
    myField.textSize = 10;
    myField.setAction ("Post", "AFRange_Validate (true, 0, true, 100) '");
    myField;
    Y1-= 18;
    Y2-= 18;
    };

    For example, if you want to display 2 digits to the right of the decimal separator with a comma of any currency symbol, thousands separator, you need to add:

    myField.setAction ('Format', ' AFNumber_Format (2, 0, 0, 0,-"\", false); ");

    myField.setAction ('Touch', ' AFNumber_Keystroke (2, 0, 0, 0,-"\", false); ");

  • How to create bookmarks with javascript?

    Hello!

    I have a question about the creation of boomarks with javascript.

    I use the following line to create bookmarks:

    this.bookmarkRoot.createChild (words [i], ' pageNum = one "" ");


    The problem is that the bookmarks are created but all lead to the same page.

    Get the complete code:

    / Put the title of the script here.

    var string2 = [];

    string2 = "Word, example; test. "

    Var words = words.split(";");

    var N = words.length;

    for (i = 0; i < N; i ++) {}

    pageArray var = [];

    var string = words [i];

    for (variety p = 0; p < this.numPages; p ++) {}

    for (var n = 0; n < this.getPageNumWords (p); n ++) {}

    If (this.getPageNthWord (p, n) is {words [i]})

    pageArray.push (p);

    a = pageArray [0];

    this.bookmarkRoot.createChild (words [i], ' pageNum = one "" ");

    break;

    }

    }

    }

    }

    Any help is very appreciated!

    It seems that the variable a is useless and only one line:

    this.bookmarkRoot.createChild (words [i], 'pageNum = "+ p);

  • Use the photos on my portfolio page, to create a header - javascript, jquery slideshow?

    Hello - full of the question:

    How do I use the photos on my portfolio page, to create a slideshow of the header which allows users to see (without scrolling down) which is below - "search for" a picture of a part and display in another (then get these photos to rotate)? JQuery, widgets, javascript?

    Obviously, I'm a total newbie!  Things have changed for 10 years when I made several sites!

    I realized a site that has a lot of pictures on it (like CSS) and I was wondering if someone could point my research in the right direction. Basically I want a slideshow in the header that uses photos of your thumbs on the page to display in the header. I presume this is a fetch command?  If I can get to 'recover' a photo I will then try and understand the part of transitions where to rotate images.  But I don't know the best place to start looking or what language would be preferable. I saw before I thnk.  He would smoke less bandwidth considerably because the images are re - used.

    Thanks for any help

    http://www.slidesjs.com/ is very good.  Here is also a 20 best jquery slideshow links http://vandelaydesign.com/blog/web-development/jquery-slideshow/

  • Create FacesMessage in Javascript

    I am creating an adf faces message form javascript just to test this feature, but I'm having the problem... I don't get error on the code, but the message is not display...


    AdfPage.PAGE.addMessage (null, new AdfFacesMessage (AdfFacesMessage.TYPE_ERROR, "Invalid", "enter a Unique ID"), null)
    AdfPage.PAGE.showMessages ();

    component to display the message:

    < af:messages id = "mensajes2" clientComponent = "true" / >

    also I don't know if he saw clientComponent here...




    Thx for the help!

    Published by: daguirre1983 on 25/07/2011 16:04

    Published by: daguirre1983 on 25/07/2011 16:04

    Hello

    Event.Cancel (); in fact, removes the event from the client to the server. Your af:commandButton is not partialSubmit = "true" defined. Accordingly, it refreshes the page when you press on, that's why you don't see the message from JavaScript on the client side

    Frank

    Published by: Frank Nimphius, July 27, 2011 10:59

  • Creating events in Javascript that can be caught in the trap by a plugin

    Is it possible to create an "event" pulled by a Javascript file to the level of records that can be caught in the trap by an Acrobat plug-in or application?

    In particular, I need an event that indicates that the download of annotation is implemented through collaboration SOAP (i.e. a level based sdkSOAPCollabSample.jsscript file).

    Looking through the Javascript documentation, I find no reference to the creation of custom events.  For example, event and EventListener objects appear to be limited to multimedia events.  The setAction() method is used only for WillClose, WillSave, DidSave, WillPrintand DidPrint of events.  What I need is the ability to create and raise an event at some point in my file to the folder level js, in particular, at the end of the this.enumerate () function, after all annotations have been downloaded so that my plugin can intercept the event "download in competition" and then, for example, display the toolbar comments and annotations.

    According to GKaiseril in the Scripting forum, where I already posted this question, "Yes, one can do [this], but the syntax will be dependent on what language your plugin is hardcoded.» You might want to ask this question in the Acrobat SDK forum".

    Bill

    Certainly be closer...

    As mentioned, you can not call tricks of Menuitem in a browser.

    There is a JavaScript API to implement this toolbar in the browser - I don't remember her, but a search on the web of this forum should turn up...

  • What creative program Cloud would allow me to create a poll, send it to students and allow them to complete online and send it back?

    That creative cloud program would allow me to quickly create a survey, send it to students and allow them to complete online and send it back?

    Acrobat Pro or Std:

    Create PDF, PDF form creator forms | Adobe Acrobat DC

  • Vote - poll Widget for adobe Muse

    I want to give users the opportunity to vote - choose between different options on a certain subject. the 'voice' could seen on my admin or the next destination as a graphical percentage page. Is there a widget or some steps I must follow to achieve this functionality?

    Thank you all for your help!

    Hello

    I tried to explain, how you can achieve this in this thread:

    http://forums.Adobe.com/message/6035794#6035794

    Although not an exact solution, but may be a workaround.

    Thank you

    Sanjit

  • Trying to create a poll

    I am creating a survey we AS3.  It consists of 3 screens of 12 questions each for a total of 36.  I need to randomize the order of the questions.  The questions are simple, yes/no answers that I use buttons for radio.

    I'm trying to be issues, as well as the associated radio buttons, video clips.

    I am creating a random table of these clips and I try to tell flash to load one of the film clips in a container clip, according to its order in the table.  I can draw the picture and see that it's being beaten.  I need to know how to take the array index number and have the .swf load this movie clip in the containing element.

    I'm not good with actionscrip, but I try to learn 3, so any help would be appreciated.

    If you named your container in the form of "Container1", 'container2' case, etc... Then use...

    var question: * = new shuffledQuestions [i] ();
    This ["Container" + String (i + 1)]. AddChild (question);

    this ['container' + String(i+1)-] what do use the notation of support to dynamically target an object which is represented as a string.  So that you loop through, changes in the value of i, so target a different container each time, but in the order.

  • Create bookmarks using javaScript

    Inside the initialize for several key field event

    I added the following code:

    this.bookmarkRoot.createChild ("basic information"

    , "this.pageNum = 1" , 1);

    this.bookmarkRoot.children [0];

    this.bookmarkRoot.color

    = color.red;

    this.bookmarkRoot.Style

    = 2;

    .....

    for each text field I change the tis.bookmarkRoot.children index [x]; I have a total of 8 Favorites, that I am creating.

    I was hoping to create a separate bookmark for each of the main sections in the PDF in this way form-

    but it simply does not work.

    Can anyone advise me on this?  -Bookmarks created in this way is also visible in the drive?

    Hello

    I have reworked one of our example that uses the app.popUpMenu method to create an index of type menu.

    The example is here: http://assure.ly/ihtw4u

    This might give you some ideas.

    Niall

    Ensure the dynamics

  • creating objects in javascript to 8.2 LCD

    Hello

    A year ago, there was a 'creation of javascript in LCD 7.0.1 objects ' ad http://forums.adobe.com/message/1360679#1360679

    I tried this in Designer 8.2 and failed! Anyone know why?

    I've set up a "mydate" scriptObject that contains:


    function createDate (Syear, sMonth, sYear) {}
    xfa.host.messageBox (Syear + '. ' + sMonth + "." + sYear);
    var oDateObject = new Object();
    oDateObject .day = Syear;
    oDateObject .month = sMonth;
    oDateObject year = Sday;
    Return oDateObject;
    } / / createDate() function

    function setToCurrentDate () {}
    var dateToday = new Date();
    This.Day = (dateToday.getDate () < 10)? '0' + dateToday.getDate (): dateToday.getDate ();
    This.month = (dateToday.getMonth () < 10)? '0' + dateToday.getMonth (): dateToday.getMonth ();
    This.Year = 1900 + dateToday.getYear ();
    } / / setToCurrentDate)

    function display () {}
    xfa.host.messageBox ("display:" + this.day + "." + this.month + "." + this.year);
    return "" + this.day + "." + this.month + '. ' + this.year;
    }

    function display2() {}
    with (THIS) xfa.host.messageBox ("display:" + day + "." + month + "." + year);
    }

    Enter event of my field, I wrote:

    var dateToday is mydate.createDate("01","01","2000");.
    dateToday.display2 ();
    xfa.host.messageBox (dateToday.display ());
    dateToday.setToCurrentDate ();

    The problem is, I get the message: "dateToday.display2 is not a function".

    I can't call one of the methods of dateToday.

    In fact I was expecting this message because there is no scriptObject with the name "dateToday". But apparently, it worked in version 7.0.1.

    How can we use some oriented object programming with JavaScript from Adobe?

    How can we use objects in the scriptObjects?

    Does anyone know that already? I'd appreciate any hint and help!

    Ulrich

    Hi, Ulrich

    I do not think that designer Script objects are implemented as JavaScript objects, but I think you can get what you want with something like;

    Form1. #variables [0] .myDateScript - (JavaScript, client)

    function myDate (Syear, sMonth, sYear)

    {

    This.Day = Syear;

    This.month = sMonth;

    This.Year = Sday;

    this.setToCurrentDate = function (oDateObject)

    {

    This.Day = (dateToday.getDate)< 10)="" "0"="" +="" datetoday.getdate()="" :="">

    This.month = (dateToday.getMonth)< 10)="" "0"="" +="" datetoday.getmonth()="" :="">

    This.Year = 1900 + dateToday.getYear ();

    }

    This.Display = function()

    {

    return "" + this.day + "." + this.month + '. ' + this.year;

    }

    }

    function newMyDate (Syear, sMonth, sYear)

    {

    return again myDate (Syear, sMonth, sYear);

    }

    So, you can then reference the myDate object with;

    xfa.host.messageBox (myDateScript.newMyDate)

    "01", "01", "2000") .display ());

    John Brinkman has a post on this http://blogs.adobe.com/formfeed/2009/09/script_objects_deep_dive.html and before that validate my previous method has been described in this forum at http://forums.adobe.com/message/1964601

    My sample to test the code above is also attached.

    Bruce

  • How to create a mobile poll?

    Muse is an appropriate program?

    Investigations require methods to store data and make sense the. Muse is only basic HTML. Just sign up for a service like SurveyMonkey or Polldaddy and create your poll there.

    Mylenium

Maybe you are looking for

  • Safari gives message could not connect to the server

    I own 2 ipads on a mini, another one I air cushion, my I pad air works fine, it's my mini pad that I can't connect to my server

  • Restart to complete update to 10.11.6 does not?

    I downloaded the update via the app store, and when I say do a restart of the computer there is no nothing. I tried to close the applications open and him giving another go and still nothing at all. Now, I download the updated drop-down list to see i

  • iCloud Stopped download my Photos!

    I have an iPhone with the latest iOS 5. When I go into settings > iCloud > Photos it says "Download 500 items. However, this number is not changing. About 8 hours ago, he said "low disk space" so I have some released, but the number has not decreased

  • Satellite C670-11 q - keyboard problem ' e give. "

    Hello everyone, I have a problem on a Toshiba Satellite C670-11 q with windows Seven When I pocket on: e gives ".t gives)u give eI give!o give c And if I use SHIFT:e gives 3t gives 5u give 7I give 8o give 9 I already uncheck the filter keys and the p

  • Why can't I access my projects?

    Why can't can't access my projects? It says 'Photos close unexpectedly.'