Get coordinates of current div using javascript


<script type=”text/javascript”>
function onposition(event) {
pos_x = event.offsetX ? (event.offsetX) :event.pageX-me(‘#pointer_div’).val().offsetLeft
pos_y = event.offsetY ? (event.offsetY) :event.pageY-me(‘#pointer_div’).val().offsetTop;
}
//–>
</script>
<script type=”text/javascript” src=”jquery.js”></script>
<script type=”text/javascript”>
var me = jQuery || $.noConflict();
me(document).ready(function() {
me(‘#pointer_div’).on(‘click’, ”, function(e) {
onposition(e);
});
});

</script><div style=”width:250px;height:250px;background:green;” id=”pointer_div”></div>

Dynamic height and width on resizing in jquery


//jQuery solution
var me = jQuery || $.noConflict();
me(document).ready(function() {
me(‘#heightSpan’).html(me(window).height());
me(‘#widthSpan’).html(me(window).width());

me(window).on(‘resize’, function(){
me(‘#heightSpan’).html(me(window).height());
me(‘#widthSpan’).html(me(window).width());
});
});

width: px

height: px
[/sourcecode]

the configuration file contains a syntax error on line 0 wamp


i had this error when wamp server’s wampmanager.ini is corrupted.

So i searched google for solution and in few seconds, i got solution for that.

Just what all we need to do is copy and pasting the below code in wampmanager.ini

——————————————————————————————————————-

[Config]
ImageList=images_on.bmp
ServiceCheckInterval=1
ServiceGlyphRunning=13
ServiceGlyphPaused=14
ServiceGlyphStopped=15
TrayIconAllRunning=16
TrayIconSomeRunning=17
TrayIconNoneRunning=18

[Services]
Name: wampapache
Name: wampmysqld

[StartupAction]
Action: run; FileName: “e:/wamp/bin/php/php5.4.3/php-win.exe”;Parameters: “refresh.php”;WorkingDir: “e:/wamp/scripts”; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors

———————————————————————————————————————