Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 215259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:27:13+00:00 2026-05-11T18:27:13+00:00

<div class=poll> <h1>Poll</h1> <form name=pollvoteform1 method=post xxaction=/plugins/content_types/poll/poll.php> <p class=tekstaanmelden><b>Het regent </b></p> <input type=hidden name=poll

  • 0
<div class="poll"> 

    <h1>Poll</h1>
    <form name="pollvoteform1" method="post" xxaction="/plugins/content_types/poll/poll.php">
    <p class="tekstaanmelden"><b>Het regent </b></p>
    <input type="hidden" name="poll" value="1">
    <input type="hidden" name="cmd" value="">
            <div class="pollOption"><input type="radio"  class="stelling" name="poll_option1" value="1"></div><div class="pollOptionText">Eens</div><br clear="all"><div class="pollOption"><input type="radio"  class="stelling" name="poll_option1" value="2"></div><div class="pollOptionText">Oneens</div><br clear="all"><div class="pollOption"><input type="radio"  class="stelling" name="poll_option1" value="3"></div><div class="pollOptionText">Waar</div><br clear="all"><div class="pollOption"><input type="radio"  class="stelling" name="poll_option1" value="4"></div><div class="pollOptionText">Niet waar</div><br clear="all">
            <input type="button" name="bt_submit" class="pollButtonNormal" onmouseover="this.className='pollButtonHigh';" onmouseout="this.className='pollButtonNormal';" value="Stem" onclick="javascript:vote1();" style="padding-bottom: 3px; margin-top: 5px;">
            <input type="button" name="bt_submit2" class="pollButtonNormal" onMouseOver="this.className='pollButtonHigh';" onMouseOut="this.className='pollButtonNormal';" value="Bekijk resultaten" onclick="javascript:viewResults1();"  style="padding-bottom: 3px; margin-top: 5px; width:98px;">
    </form>
</div>
<div style="display:none;width: 175px;">

    <form><input type="button" name="bt_submit" class="pollButtonNormal" onmouseover="this.className='pollButtonHigh';" onmouseout="this.className='pollButtonNormal';" value="Resultaten" onclick="javascript:viewResults1();" style="padding-bottom: 3px; margin-top: 10px; "></form>
</div>

In my script I have:

var r=document.forms.pollvoteform1.poll_option1;

But I get the error:

document.forms.pollvoteform1 is undefined
And I don’t understand why. Since the pollvoteform1 and the poll_option_1 are both there.

//update: the full js code

    function vote() {
var r=document.forms.pollvoteform1.poll_option1;
var voted=false;
if (r.value!=null && r.checked){
voted=true;
} else {
for (i=0;i<r.length;i++){
if (r[i].checked) {
voted=true;
break;
}
}}

if (voted) {
document.forms.pollvoteform1.submit();
} else {
alert("you didn't make a choice yet");
}
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T18:27:13+00:00Added an answer on May 11, 2026 at 6:27 pm

    Its either

    var r=document.forms['pollvoteform1'].poll_option1;
    

    or if that dosnt work

    var r=document.forms[0].poll_option1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My div with class name 'header-body-right' doesn't seem to be floating to the left
I have some class like this <div class = student> <div class = name>Adam
I would add each two result one div class <?php while ($fetch = $db->fetch($query))
How can I change a div class name when clicking on it? Eg: <div
I have div tag with css class name. div class name is same in
<div id = 'eventcontainer' > <span id = 'class'> <?php //Getting posts from DB
I have displayed a row of items with same div class name but different
I want to add the post tags into its div class so I can
How to get ul class name while clicking li - jquery <div class=div-class-parent> <div
I want to scale the picture to fit the main div class http://jsfiddle.net/EyW99/ Sorry,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.