dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Please Help, Can't have the Save Button work in this frm

  1. #1
    Join Date
    Jul 2011
    Posts
    3

    Please Help, Can't have the Save Button work in this frm

    Could any one please help me in having this code work ??

    HTML Code:
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Incoming Call</title>
    <link rel="stylesheet" type="text/css" href="view.css" media="all">
    <script type="text/javascript" src="view.js"></script>
    <script type="text/javascript" src="calendar.js"></script>
    <script language="javascript" type="text/javascript">
    
    function save() 
    { 
    val = document.form_203447.saveForm.value; 
    mydoc = document.open(); 
    mydoc.write(val); 
    mydoc.execCommand("saveAs",true,".txt"); //you can change the .txt to your extention
    history.go(-1);
    } 
    
    </script>
    </head>
    <body id="main_body" >
    	
    	<img id="top" src="top.png" alt="">
    	<div id="form_container">
    	
    		<h1><a>Incoming Call</a></h1>
    		<form id="form_203447" class="appnitro"  method="post" action="">
    					<div class="form_description">
    			<h2>Incoming Call</h2>
    			<p></p>
    		</div>						
    			<ul >
    			
    					<li id="li_1" >
    		<label class="description" for="element_1">Contact Name </label>
    		<div>
    			<input id="element_1" name="element_1" class="element text medium" type="text" maxlength="255" value=""/> 
    		</div> 
    		</li>		<li id="li_2" >
    		<label class="description" for="element_2">Contact Number </label>
    		<div>
    			<input id="element_2" name="element_2" class="element text medium" type="text" maxlength="255" value=""/> 
    		</div> 
    		</li>		<li id="li_3" >
    		<label class="description" for="element_3">Customer Ticket Number </label>
    		<div>
    			<input id="element_3" name="element_3" class="element text medium" type="text" maxlength="255" value=""/> 
    		</div> 
    		</li>		<li id="li_8" >
    		<label class="description" for="element_8">Contact Reachable </label>
    		<div>
    		<select class="element select medium" id="element_8" name="element_8"> 
    			<option value="" selected="selected"></option>
    <option value="1" >Yes</option>
    <option value="2" >No</option>
    		</select>
    		</div> 
    		</li>		<li id="li_4" >
    		<label class="description" for="element_4">Call Details </label>
    		<div>
    			<input id="element_4" name="element_4" class="element text medium" type="text" maxlength="255" value=""/> 
    		</div> 
    		</li>		<li id="li_5" >
    		<label class="description" for="element_5">Next Action </label>
    		<div>
    			<input id="element_5" name="element_5" class="element text medium" type="text" maxlength="255" value=""/> 
    		</div> 
    		</li>		<li id="li_6" >
    		<label class="description" for="element_6">Date </label>
    		<span>
    			<input id="element_6_1" name="element_6_1" class="element text" size="2" maxlength="2" value="" type="text"> /
    			<label for="element_6_1">MM</label>
    		</span>
    		<span>
    			<input id="element_6_2" name="element_6_2" class="element text" size="2" maxlength="2" value="" type="text"> /
    			<label for="element_6_2">DD</label>
    		</span>
    		<span>
    	 		<input id="element_6_3" name="element_6_3" class="element text" size="4" maxlength="4" value="" type="text">
    			<label for="element_6_3">YYYY</label>
    		</span>
    	
    		<span id="calendar_6">
    			<img id="cal_img_6" class="datepicker" src="calendar.gif" alt="Pick a date.">	
    		</span>
    		<script type="text/javascript">
    			Calendar.setup({
    			inputField	 : "element_6_3",
    			baseField    : "element_6",
    			displayArea  : "calendar_6",
    			button		 : "cal_img_6",
    			ifFormat	 : "%B %e, %Y",
    			onSelect	 : selectDate
    			});
    		</script>
    		 
    		</li>		<li id="li_7" >
    		<label class="description" for="element_7">Name </label>
    		<span>
    			<input id="element_7_1" name= "element_7_1" class="element text" maxlength="255" size="8" value=""/>
    			<label>First</label>
    		</span>
    		<span>
    			<input id="element_7_2" name= "element_7_2" class="element text" maxlength="255" size="14" value=""/>
    			<label>Last</label>
    		</span> 
    		</li>
    			
    					<li class="buttons">
    			    <input type="hidden" name="form_id" value="203447" />
    			    
    				<input id="saveForm" class="button_text" type="submit" onClick="save();" name="submit" value="Save" />
    		</li>
    			</ul>
    		</form>	
    	</div>
    	<img id="bottom" src="bottom.png" alt="">
    	</body>
    </html>

  2. #2
    Join Date
    Jul 2011
    Posts
    3
    no one here can help me ??

  3. #3
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by engehab View Post
    no one here can help me ??
    maybe only after you tell us what exactly does not work. "It does not work" is not enough. So:
    - what that code supposes to do?
    - what is wrong? What does not work? Do you get an error message?
    - on which browsers?

  4. #4
    Join Date
    Jul 2011
    Posts
    3
    The code is to have the form saved when clicking the save button at the end of the page to be saved to the clipboard.

    Browser : IE

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles