css - javascript code for resizing the div -


this jsp code hidden div want move div form 1 tab tab according onclick event on tabs

<div id="addprojectname" style="-moz-border-bottom-colors: none;     -moz-border-left-colors: none;     -moz-border-right-colors: none;     -moz-border-top-colors: none;     background-color: #ffffff;     border-color: -moz-use-text-color #aaaaaa #aaaaaa;     border-image: none;     border-radius: 4px 4px 4px 4px;     border-style: none solid solid;     border-width: medium 2px 2px;     box-shadow: 0 0 5px #aaaaaa;     display:none;     width: 328px;"> <form name="frm" action="linkbean.jsp" method="post"> <input type="hidden"  id="sl_category" name="sl_no_cat" > <table style="padding: 5px 0px 0px 8px;"> <tr> <th colspan="2">  <a onclick= "hidewindows('addprojectname');" href="#"><img alt="aalpine services" src="images/close.png" style="width:20px; float: right; "></a> </th> </tr> <tr> <th colspan="2"> <div style="width: width:271px; color:red;" id="projectnamevalidate"></div> </th> </tr> <tr> <th>project name<span>:</span></th><td><input type="text"  name="projectname"></td> </tr> <tr> <th>category name<span>:</span></th><td><input type="text" id="cost_category" name="category"></td> </tr> <tr> <td colspan="2" style="float:right; padding-top:15px"> <input type="submit" value="submit" style="width: 60px;"> </td> </tr> </table> </form> </div> 

this css code

#addprojectname{  float: right;  margin-left: 214px;  margin-top: 70px;  position: absolute; 

} javascript code how change margin value , using javascript code dynamically can plz thank u

 function projectname(id1,id2)     {         var userid = document.getelementbyid(id1).value;         var e = document.getelementbyid(id2);         var url="nameproject.do?id="+userid;          xmlhttp.open("post", url,true);          xmlhttp.send(null);          xmlhttp.onreadystatechange=function()          {           if(xmlhttp.readystate==4)           {                         if(xmlhttp.status==200)                   {                       var temp = xmlhttp.responsetext;                     obj = json.parse(temp);                        if(temp!="")                       {                           document.getelementbyid("cost_category").value=document.getelementbyid("cost_category").innerhtml=obj.catgoryname;                           document.getelementbyid("sl_category").value=document.getelementbyid("sl_category").innerhtml=obj.sl_no_cat;                       }             if(temp!="")             {                      if(e.style.display == 'block')                           e.style.display = 'none';                      else                           e.style.display = 'block';              }              if(temp=="")               {                 alert("!data not existing");               }               }     }     }  } 

try:

e.style.marginleft=mymarginvalue; 

that should allow change margin setting requested. i'm not sure achieve result desire, achieve result asked for...


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -