creare form in un popup

Mo Vivere

Nuovo Utente
24 Ott 2014
1
0
0
ciao ragazzi, sono un novellino della programmazione anzi non ci capisco ancora niente, però ho urgente bisogno di aiuto quindi vi chiedo questa informazione... vorrei creare una popup con all'interno un form di contatto. Vorrei che si apra attraverso il click su un pulsante tipo chiedi info... cosa dovrei fare? come dovrebbe essere questo codice...
 

Max 1

Super Moderatore
Membro dello Staff
SUPER MOD
MOD
29 Feb 2012
4.312
334
83
Pagina Con pulsante
Codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>


<script type="text/javascript" language="JavaScript">
<!--
function winOpen(URL, windowName, width, height, left, top, resizable, location, menubar, scrollbars, status, toolbar, directories){
	var windowFeatures;
	windowFeatures = '';
	if (width != '')
		windowFeatures = windowFeatures+'width='+width+',';
	if (height != '')
		windowFeatures = windowFeatures+'height='+height+',';
	if (left != '')
		windowFeatures = windowFeatures+'left='+left+',';
	if (top != '')
		windowFeatures = windowFeatures+'top='+top+',';
	if (resizable)
		windowFeatures = windowFeatures+'resizable,';
	if (location)
		windowFeatures = windowFeatures+'location,';
	if (menubar)
		windowFeatures = windowFeatures+'menubar,';
	if (scrollbars)
		windowFeatures = windowFeatures+'scrollbars,';
	if (status)
		windowFeatures = windowFeatures+'status,';
	if (toolbar)
		windowFeatures = windowFeatures+'toolbar,';
	if (directories)
		windowFeatures = windowFeatures+'directories,';
	window.open(URL, windowName, windowFeatures);
}

//-->
</script>
</head>

<body>
<button
onclick="winOpen('form.htm', 'Contatti', '300', '300', '700', '200', false, false, false, false, false, false, false);return false;">
Contatti
</button>
</body>
</html>
Pagina del form
Codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
</head>

<body>
<form id="contact_form" action="#" method="POST" enctype="multipart/form-data">
	<div class="row">
		<label for="name">Il tuo nome:</label><br />
		<input id="name" class="input" name="name" type="text" value="" size="30" /><br />
	</div>
	<div class="row">
		<label for="email">La tua e-mail:</label><br />
		<input id="email" class="input" name="email" type="text" value="" size="30" /><br />
	</div>
	<div class="row">
		<label for="message">Il tuo messaggio:</label><br />
		<textarea id="message" class="input" name="message" rows="7" cols="30"></textarea><br />
	</div>
	<input id="submit_button" type="submit" value="Invia e-mail" />
</form>
</body>
</html>