Border around div
It's a quite popular technique. Many developers use the technique involved table structure. I think, this tip can be very useful too.
HTML-code
<div class ="newsDiv">
<h2> NEWS</h2>
<div class ="newstext">
<p>A <a href="test.asp">HTML version</a> of the SAMPLE is now available.
For smartphone users, you can use a mobile website, <a href="http://www.test.org">http://www.test.org.org</a>, to view SAMPLE.</p>
</div>
</div>
CSS-code to achieve the
.newsDiv
{
border: 1px #C0C0C0 solid;
margin-bottom: 15px;
}
.newstext
{
padding-left: 10px;
}
Wednesday, January 11, 2012
Thursday, January 5, 2012
jQuery Mobile and IE
Today I learned that my mobile site does not work in IE because IE does not support AJAX calls through jQuery Mobile. I went on Internet searching for answer. This time I was not lucky. Internet community did not bring any good news. It looks like many developers have the same problem. I found a code snippet which did not work at all. It should be added after jquery is loaded and before jQuery Mobile is added. Here it is :
<script type="text/javascript">
//run this script after jQuery loads, but before jQuery Mobile loads
//customize jQuery Mobile to let IE7+ in (Mobile IE)
$(document).bind("mobileinit", function(){
$.extend( $.mobile , {
//extend gradeA qualifier to include IE7+
gradeA: function(){
//IE version check by James Padolsey, modified by jdalton - from http://gist.github.com/527683
var ie = (function() {
var v = 3, div = document.createElement('div'), a = div.all || [];
while (div.innerHTML = '', a[0]);
return v > 4 ? v : !v;
}());
//must either support media queries or be IE7+
return $.support.mediaquery || (ie && ie >= 7);
}
});
});
</script>
My coworkers and I agree to leave mobile version as it is. It looks like it works for most mobile devices, bit it does not work only for desktop IE. I think, jQuery Mobile really meant to be for MOBILE!
<script type="text/javascript">
//run this script after jQuery loads, but before jQuery Mobile loads
//customize jQuery Mobile to let IE7+ in (Mobile IE)
$(document).bind("mobileinit", function(){
$.extend( $.mobile , {
//extend gradeA qualifier to include IE7+
gradeA: function(){
//IE version check by James Padolsey, modified by jdalton - from http://gist.github.com/527683
var ie = (function() {
var v = 3, div = document.createElement('div'), a = div.all || [];
while (div.innerHTML = '', a[0]);
return v > 4 ? v : !v;
}());
//must either support media queries or be IE7+
return $.support.mediaquery || (ie && ie >= 7);
}
});
});
</script>
My coworkers and I agree to leave mobile version as it is. It looks like it works for most mobile devices, bit it does not work only for desktop IE. I think, jQuery Mobile really meant to be for MOBILE!
Thursday, December 8, 2011
Redirect to a mobile site
It's quite useful piece of code-behind, which redirects to a mobile version of the site.
Please use and modify for your needs. This routine is being written in VB.NET
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim strUserAgent As String
Dim flag As String
flag = "0"
strUserAgent = Request.UserAgent.ToString().ToLower()
If (strUserAgent.Contains("iphone")) Then flag = "1"
If (strUserAgent.Contains("blackberry")) Then flag = "1"
If (strUserAgent.Contains("mobile")) Then flag = "1"
If (strUserAgent.Contains("windows ce")) Then flag = "1"
If (strUserAgent.Contains("opera mini")) Then flag = "1"
If (strUserAgent.Contains("palm")) Then flag = "1"
If (strUserAgent.Contains("android")) Then flag = "1"
If (strUserAgent.Length <> 0) Then
If (Request.Browser.IsMobileDevice = "True" And flag = "1") Then
Response.Redirect("http://www.test1.org")
End If
End If
End Sub
Please use and modify for your needs. This routine is being written in VB.NET
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim strUserAgent As String
Dim flag As String
flag = "0"
strUserAgent = Request.UserAgent.ToString().ToLower()
If (strUserAgent.Contains("iphone")) Then flag = "1"
If (strUserAgent.Contains("blackberry")) Then flag = "1"
If (strUserAgent.Contains("mobile")) Then flag = "1"
If (strUserAgent.Contains("windows ce")) Then flag = "1"
If (strUserAgent.Contains("opera mini")) Then flag = "1"
If (strUserAgent.Contains("palm")) Then flag = "1"
If (strUserAgent.Contains("android")) Then flag = "1"
If (strUserAgent.Length <> 0) Then
If (Request.Browser.IsMobileDevice = "True" And flag = "1") Then
Response.Redirect("http://www.test1.org")
End If
End If
End Sub
Wednesday, December 7, 2011
First Mobile Web site
It took 2 weeks to finish my first mobile website. It was quite interesting journey. First of all, jQuery Mobile is a new Javascript library and I was interested to implement it for new mobile site.
I discovered that current version of jQueryMobile does fully support with AJAX extensions all mobile platforms except Blackberry 5.
I had a problem with iPhone view. There is a quite good fix, which must be place in a head of the page to bring a picture to the stable condition on all mobile platforms:
<meta name="viewport" content="width=device-width, initial-scale=1">
I discovered that current version of jQueryMobile does fully support with AJAX extensions all mobile platforms except Blackberry 5.
I had a problem with iPhone view. There is a quite good fix, which must be place in a head of the page to bring a picture to the stable condition on all mobile platforms:
<meta name="viewport" content="width=device-width, initial-scale=1">
Wednesday, November 16, 2011
jQueryMobile
Yesterday my coworker dowloaded the latest version of jQuery Mobile, and I received my new project. I have to update mobile site for www.usrds.org. Therefore I started to play around new Javascript library. By the end of the second day I created one page-application which will serve as a menu for the full site.
For resources I used:
For resources I used:
Tuesday, November 8, 2011
Excel 2010 and SharePoint
Today I had to solve a problem existing in SharePoint 2010. Many of my users cannot download Excel files from SharePoint by double-clicking. It's a quite unusual because they are able to do the same thing with Word and Powerpoint files. Researching the problem, I found that we're not alone. Some users complain about the same thing, especially if file was saved in Excel 2010 format. I found out that in my case it only applies to Excel 2010 files. Querying the Web I found several solutions which I presented to my SharePoint administrator. He changed configuration in a minute, and my users became happy. Now everything work as should work.About resources I presented:
http://neelb.wordpress.com/2011/09/20/unable-to-process-the-request-when-opening-an-excel-document-in-sharepoint-2010/
http://horsik.wordpress.com/2011/04/05/excel-services-is-unable-to-process-the-request-wait-a-few-minutes-and-try-performing-this-operation-again-%E2%80%9D/
http://blog.armgasys.com/?p=133
Monday, October 31, 2011
More Math

First of all, I found the excellent resource for doing more math. Please visit the page Authors did the best possible job to represent math in HTML. So, I use their experience to construct more formulas in HTML.
Here's a HTML code for first example (see pic):
<table border="0" cellpadding="0" cellspacing="0">
<tr align="center" style="line-height: 1em">
<td>Ι<sub>k</sub>(t)= </td>
<td><small> <i>t</i></small><br>
⌠<br>⌡<br>
<small><i>0</i> </small></td>
<td><i>λ<sub>k</sub>(s)S(s)</i><small> </small>d<i>s</i></td>
</tr>
</table>
Here's a HTML code for second example (see pic):
<table cellpadding="0" cellsapcing="0" border="0">
<tr align="center">
<td><br />Î<sub>k</sub>(t)= </td>
<td><br />
<big><big>&&8721;</big></big><br>
<small><i>j:t,≤t</i></small></td>
<td valign="top">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span style="vertical-align:-150%;">^ ^</span></td>
</tr>
<tr>
<td><i>λ<sub>k</sub>(t<sub>j</sub>)S(t<sub>j-1</sub>)</i></td>
</tr>
</table>
</td>
</tr>
</table>
Subscribe to:
Posts (Atom)