Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

For the cause: I need some simple script help for my county Dem site...

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » The DU Lounge Donate to DU
 
expatriot Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Mar-24-04 03:01 PM
Original message
For the cause: I need some simple script help for my county Dem site...
Okay, here is the deal...
I am bleeding over this site... www.yumademocrats.com trying to gvet it to look real spiffy like. And I want to accept online donations. Now the only thing preventing me from being in FEC compliance is that i need a simple verification form where people check boxes statin that they are a US citizen or permanent resident, that its their own money, etc. It would be simple I think to just get a simple check box form like the big boys do but if they didn't check all the forms then they could not proceed to Paypal. Like give all the checkboxes values and do a simple if then thing.

Help me. And then put the script on a page for other county and state sites to download.

I will be back in ten. Any advice whatsoever will be of great assistance in winning Arizona for the Dems :)
Printer Friendly | Permalink |  | Top
TlalocW Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Mar-24-04 03:30 PM
Response to Original message
1. Off the top of my head...
Edited on Wed Mar-24-04 03:33 PM by TlalocW
I'm assuming you have a form so let's say it looks like this:

<Form name="myForm" action="nextPage.htm" on_sub_mit="checkTheBoxes()">

<INPUT TYPE="check" name="USCitizen">I'm a US Citizen
<BR>
<INPUT TYPE="check" name="OwnMoney">I'm using my own money
<BR>
Etc.

</FORM>

Then you would need Javascript inside the <Head></HEAD> tags ala something like this...

<SCRIPT LANGUAGE="Javascript">
function checkTheBoxes()
{
returnFlag = true;

if( document.all.USCitizen.checked == false ||
document.all.OwnMoney.checked == false ||
whatever other check boxes you have == false
)
{
returnFlag = false;
alert( "All checkboxes need to be checked, cupcake" );
}

return returnFlag;
}

</SCRIPT>


When you try to submit the form, it goes to this function which will look to see if the checkboxes are checked or not. Based on that, it will either return a true or false value to let the form know to go ahead and submit.

Spacing is a little off, but I think this should work with some minor changes.

On Edit: The filters on DU were taking a piece of code I had written and replacing it with "illegal code." Guess the mods don't want that to be in our messages. Look in the <FORM> tag at the top, and get rid of the underscores in on_sub_mit.

TlalocW
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Sun May 05th 2024, 11:38 PM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » The DU Lounge Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC