1 <patTemplate:tmpl name="_widget">
\r
2 <script type="text/javascript">
\r
4 function sendmessage_confirm(){
\r
5 document.contactus_main.act.value = 'confirm';
\r
6 document.contactus_main.submit();
\r
9 function sendmessage_cancel(){
\r
10 document.contactus_main.act.value = 'cancel';
\r
11 document.contactus_main.submit();
\r
14 function sendmessage(){
\r
15 // if (!window.confirm('お問い合わせを送信します')) return false;
\r
16 document.contactus_main.act.value = 'send';
\r
17 document.contactus_main.submit();
\r
20 function sendmessage_reset(){
\r
21 if (!window.confirm('入力内容を消去しますか?')) return false;
\r
22 $('#{SEND_FORM_ID} :input').each(function(){
\r
23 var type = this.type;
\r
24 var tag = this.tagName.toLowerCase();
\r
25 if (type == 'text' || type == 'password' || tag == 'textarea'){
\r
27 } else if (type == 'checkbox' || type == 'radio'){
\r
28 this.checked = false;
\r
29 } else if (tag == 'select'){
\r
30 this.selectedIndex = -1;
\r
34 function sendmessage_init(){
\r
42 $('#{CONFIRM_BUTTON_ID}').click(function(){
\r
43 sendmessage_confirm();
\r
45 $('#{SEND_BUTTON_ID}').click(function(){
\r
48 $('#{CANCEL_BUTTON_ID}').click(function(){
\r
49 sendmessage_cancel();
\r
51 $('#{RESET_BUTTON_ID}').click(function(){
\r
52 sendmessage_reset();
\r
55 if (document.contactus_main.sendstatus.value == '0'){
\r
56 $('#{SEND_BUTTON_ID}').hide();
\r
57 $('#{CANCEL_BUTTON_ID}').hide();
\r
58 } else if (document.contactus_main.sendstatus.value == '1'){
\r
59 $('#{CONFIRM_BUTTON_ID}').hide();
\r
60 $('#{RESET_BUTTON_ID}').hide();
\r
62 $('#{CONFIRM_BUTTON_ID}').hide();
\r
63 $('#{SEND_BUTTON_ID}').hide();
\r
64 $('#{CANCEL_BUTTON_ID}').hide();
\r
65 $('#{RESET_BUTTON_ID}').hide();
\r
70 <!-- m3:ErrorMessage -->
\r
71 <form id="{SEND_FORM_ID}" name="contactus_main" method="post" class="form">
\r
72 <input type="hidden" name="act" />
\r
73 <input type="hidden" name="ticket" value="{TICKET}" />
\r
74 <input type="hidden" name="sendstatus" value="{STATUS}" />
\r
75 <input type="hidden" name="fieldcount" value="{FIELD_COUNT}" />
\r