Click here to Skip to main content
15,887,350 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionjQuery not working Pin
Hans Ruck11-Feb-11 3:30
Hans Ruck11-Feb-11 3:30 
AnswerRe: jQuery not working Pin
cjoki11-Feb-11 7:34
cjoki11-Feb-11 7:34 
GeneralRe: jQuery not working Pin
Hans Ruck11-Feb-11 10:12
Hans Ruck11-Feb-11 10:12 
GeneralRe: jQuery not working Pin
cjoki11-Feb-11 11:42
cjoki11-Feb-11 11:42 
AnswerRe: jQuery not working Pin
Shahriar Iqbal Chowdhury/Galib11-Feb-11 10:00
professionalShahriar Iqbal Chowdhury/Galib11-Feb-11 10:00 
AnswerRe: jQuery not working Pin
Sunasara Imdadhusen15-Feb-11 17:55
professionalSunasara Imdadhusen15-Feb-11 17:55 
AnswerRe: jQuery not working Pin
Monjurul Habib1-Mar-11 8:14
professionalMonjurul Habib1-Mar-11 8:14 
QuestionConnect a web form to access database Pin
Babylon Lion10-Feb-11 14:11
Babylon Lion10-Feb-11 14:11 
Hello all,

I have a simple web form that use an email address to send information once it's submitted. I need to modify it to where it sends the info to an access database. How can I make that happen?

javascript file:
//collects the data
 function submitForm() {
	document.getElementById('apply').submit();
        clearForm();
}
//clears the form
 function clearForm(){

  	var i;
        for (i = 0; (i < document.forms.length); i++) {
         document.forms[i].reset();
  }
}

//create the  drop down list
function addOption(selectbox,text,value ){
	var optn = document.createElement("option");
	optn.text = text;
	optn.value = value;
	selectbox.options.add(optn);
}

function addOption_list(){
	var quan = new Array("1","2","3","4","5+");
	for (var i=0; i < quan .length;++i){
	
	addOption(document.apply.quantity, quan[i], quan[i]);
	}
}

function addOption_list2(){
	var quan = new Array("1","2","3","4","5","6","7","8","9","10+" );
	for (var i=0; i < quan.length;++i){
	
	addOption(document.apply.quantitys, quan[i], quan[i]);
	}
}

//switches between divs when one of the radio button is checked
  function toggle(obj) {
    var busDiv = document.getElementById('busi');
    var indDiv = document.getElementById('ind');

        if (obj.value == 'business'){
            busDiv.style.display = '';
            indDiv.style.display = 'none';
        }          
        else{
            busDiv.style.display = 'none';
            indDiv.style.display = '';
        }
      	                      
  }


web form:
<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
	<title>Untitled</title>
	<link href="wireless.css" rel="stylesheet" type="text/css"/>   
	<script type="text/javascript" src="form.js"></script>
</head>

<body onload="addOption_list(); addOption_list2(); divSelection()" >

   <div id="outer">
   	<img src="" alt="logo" usemap="#logomap" class="carrierLogo" />
	  <map id="logomap" name="logomap">
		<area shape="rect" coords="0,0,399,120" href="#" alt="home"/>
	  </map>
	  
   <div id="inner">	
	<form id="apply" name="apply" action="mailto:info@donate.com" method="post" enctype="text/plain">
	
	<fieldset>
	 	<legend>Donor Type</legend>
		   <label for="donerType">
		     <input type="radio" id="businessDoner" name="donerType"  value="business" checked="checked" onclick="toggle(this); " />
		   		  Business
		   </label>
		   
		   <label for="donerType">
		   	 <input type="radio" id="individualDoner" name="donerType" value="individual" onclick="toggle(this)" />
		   		  Individual
		   </label>
	 </fieldset>
	 
	 
	 <fieldset id="contact" >
	 	<legend>Donor Information</legend>
	 	<div id="busi" >
                       fields..
                      ..

                      more fields..
	    </div>
	 	
                <div id="ind" style="display: none" >
                       fields..
                      ..

                      more fields..
	  </div>
	 </fieldset>

	 
	 <div>
		<label for="submitBtn">Submit <input type="button" value="Submit" onclick="submitForm();" id="submitBtn"/></label>
		&nbsp;&nbsp;&nbsp;&nbsp;<label for="cancelBtn">Cancel <input type="reset" value="Cancel"  id="cancelBtn"/></label>
	</div>
	
	</form>
	
</div>
</div>
</body>
</html>

AnswerRe: Connect a web form to access database Pin
Ravi Sant16-Feb-11 3:51
Ravi Sant16-Feb-11 3:51 
GeneralRe: Connect a web form to access database Pin
Babylon Lion16-Feb-11 4:49
Babylon Lion16-Feb-11 4:49 
QuestionXML to Javascript array Pin
Member 333447410-Feb-11 2:55
Member 333447410-Feb-11 2:55 
AnswerRe: XML to Javascript array PinPopular
Ravi Sant16-Feb-11 4:06
Ravi Sant16-Feb-11 4:06 
QuestionCheck is Session has Expired Pin
MWRivera9-Feb-11 5:55
MWRivera9-Feb-11 5:55 
AnswerRe: Check is Session has Expired Pin
MWRivera9-Feb-11 6:21
MWRivera9-Feb-11 6:21 
QuestionAutomation server can't create object Pin
Ali Al Omairi(Abu AlHassan)8-Feb-11 1:13
professionalAli Al Omairi(Abu AlHassan)8-Feb-11 1:13 
AnswerRe: Automation server can't create object Pin
WoutL8-Feb-11 2:51
WoutL8-Feb-11 2:51 
GeneralRe: Automation server can't create object Pin
Ali Al Omairi(Abu AlHassan)8-Feb-11 4:15
professionalAli Al Omairi(Abu AlHassan)8-Feb-11 4:15 
GeneralRe: Automation server can't create object Pin
WoutL8-Feb-11 8:32
WoutL8-Feb-11 8:32 
GeneralRe: Automation server can't create object Pin
Ali Al Omairi(Abu AlHassan)8-Feb-11 21:18
professionalAli Al Omairi(Abu AlHassan)8-Feb-11 21:18 
GeneralRe: Automation server can't create object Pin
WoutL8-Feb-11 21:55
WoutL8-Feb-11 21:55 
AnswerRe: Automation server can't create object Pin
Pravin Patil, Mumbai25-Feb-11 3:14
Pravin Patil, Mumbai25-Feb-11 3:14 
GeneralRe: Automation server can't create object Pin
Ali Al Omairi(Abu AlHassan)25-Feb-11 7:43
professionalAli Al Omairi(Abu AlHassan)25-Feb-11 7:43 
GeneralRe: Automation server can't create object Pin
Xandip7-Apr-11 3:11
Xandip7-Apr-11 3:11 
GeneralRe: Automation server can't create object Pin
Ali Al Omairi(Abu AlHassan)7-Apr-11 5:20
professionalAli Al Omairi(Abu AlHassan)7-Apr-11 5:20 
Questionformular-Database save Pin
Pierre besquent7-Feb-11 3:50
Pierre besquent7-Feb-11 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.