[DIV] The sign that caught ma eye

Being a designer,i could not help but click one. 😀 \m/

DIV
DIV

Advertisements

Dojo InlineEditBox

Tried a hand at dojo InlineEditBox tday. Worked fine 🙂


 <form dojoType="dijit.form.Form" >  
                   
	   <div>
		<span>Name :</span>
		<span id="editname" dojoType="dijit.InlineEditBox" editor="dijit.form.ValidationTextBox"
		   autoSave="false" title="change your name" editorParams="{trim:'true',name:'first_name',required:'true',invalidMessage:'Invalid name (max:25 chars)',maxLength:'25',regExp:'&#91;a-zA-Z&#93;{1,25}'}">
		       <?php echo $this->user_profile['name'] ?>
		</span>
	   </div>
	   <div>
		<span>City :</span>
		<span id="editcity" dojoType="dijit.InlineEditBox" editor="dijit.form.ValidationTextBox"
		   autoSave="false" title="change your city" editorParams="{trim:'true',name:'city',required:'true',invalidMessage:'Invalid city',regExp:'&#91;a-zA-Z\\s&#93;{1,20}',maxLength:'20'}">
		       <?php echo $this->user_profile['city'] ?>
		</span>
	   </div>
	   <div>
		<span>State :</span>
		<span id="editstate" dojoType="dijit.InlineEditBox" editor="dijit.form.ValidationTextBox"
		    autoSave="false" title="change your state" editorParams="{trim:'true',name:'state',required:'true',invalidMessage:'Invalid state',maxLength:'20',regExp:'&#91;sa-zA-Z\\s&#93;{1,20}'}">
		       <?php echo $this->user_profile['state'] ?>
		</span>
	   </div>
	   <span style="display:none" dojoType="dojo.data.ItemFileReadStore" jsId="countryStore" url="<?php echo $this->baseUrl(); ?>/js/countries.json"></span>
	   <div>
		<span>Country:</span>
		<span id="editcountry" dojoType="dijit.InlineEditBox" editor="dijit.form.FilteringSelect"
		   editorParams="{searchAttr: 'name', keyAttr: 'abbr', store: countryStore, autocomplete: true, hasDownArrow: false,name:'country',invalidMessage:'Invalid Country',regExp:'&#91;a-zA-Z&#93;{1,25}'}"
		    width="200px" autoSave="false"> <?php echo $this->user_profile['country'] ?>
		</span>
	   </div>
	    <div>
		<span>Zip :</span>
		<span id="editzip" dojoType="dijit.InlineEditBox" editor="dijit.form.ValidationTextBox"
		   autoSave="false" title="change your zip code" editorParams="{trim:'true',name:'zip',required:'true',invalidMessage:'Invalid Zip',maxLength:'10',regExp:'&#91;0-9&#93;{1,10}'}">
		       <?php echo $this->user_profile['zip'] ?>
		   </span>
	   </div>
	   <div>
		<span>About Me :</span>
		<span id="editaboutme" dojoType="dijit.InlineEditBox" autoSave="true" editor="dijit.form.Textarea" editorParams="{trim:'true',name:'about_me'}">
		  <?php echo $this->user_profile['about_me'] ?>
	       </span>
	   </div>
	   <div>
	       <span>Confirm changes :</span>
	       <span><button dojoType="dijit.form.Button" type="button" onclick="saveProfile()">Ok</button></span>
	   </div>
  </form>

I hav hid the save and cancel button that comes on every edit box, through css.


.classname fieldset span div button{display:none }

As i wanted all values submitted through one button than individually submitting it.