Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts
1
Posted on 7:40 AM by Softminer and filed under ,

Here is a simple example of reading file using javascript, more info on links
+
+
+

<input type="file" id="fileinput" />
<script type="text/javascript">
  function readSingleFile(evt) {
    //Retrieve the first (and only!) File from the FileList object
    var f = evt.target.files[0]; 

    if (f) {
      var r = new FileReader();
      r.onload = function(e) { 
       var contents = e.target.result;
        alert( "Got the file.n" 
              +"name: " + f.name + "n"
              +"type: " + f.type + "n"
              +"size: " + f.size + " bytesn"
              + "starts with: " + contents.substr(1, contents.indexOf("n"))
        );  
      }
      r.readAsText(f);
    } else { 
      alert("Failed to load file");
    }
  }

  document.getElementById('fileinput').addEventListener('change', readSingleFile, false);
</script>
1
Posted on 6:42 AM by Softminer and filed under

Unfortunately IE doesnt have any emulator or developer tools for Print css debugging but in Firefox by pressing

Shift + F2 you have the console which allows you to enabale print emulator

media emulate print

In chrome also by F12 and then

0
Posted on 2:54 AM by Softminer and filed under

X-UA-Compatibility Meta Tag and HTTP Response Header

http://msdn.microsoft.com/en-us/library/ff955275(v=vs.85).aspx


http://msdn.microsoft.com/en-us/library/ff955410(v=vs.85).aspx

Starting with IE11, document modes are considered deprecated and should no longer be used

If a webpage is retrieved from a website in the Local intranet zone (see "About URL Security Zones" at [MSDN-SECZONES]), IE7 mode is used.

Internet Explorer displays webpages that contain the HTML5 document type in standards mode, which provides the highest support available for established and emerging industry standards, including HTML5, CSS3, SVG, and others.

How IE choose between document mode
http://msdn.microsoft.com/en-us/library/ff405803(v=vs.85).aspx


setup on the server
http://msdn.microsoft.com/en-us/library/jj676913(v=vs.85).aspx

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=10" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>
This is a nice website which tells you about html5 features http://html5test.com/
0
Posted on 1:53 AM by Softminer and filed under


<link rel="apple-touch-icon" href="touch-icon-iphone.png" />
<link rel="apple-touch-icon" sizes="72x72" href="touch-icon-ipad.png" />
<link rel="apple-touch-icon" sizes="114x114" href="touch-icon-iphone4.png" />

+
+
1
Posted on 2:06 AM by Softminer and filed under ,

Definition from wikipedia

design pattern that prevents some duplicate form submissions, creating a more intuitive interface for user agents (users). PRG implements bookmarks and the refresh button in a predictable way that does not create duplicate form submissions.

Wikipedia

ASP.NET MVC - Using Post, Redirect, Get Pattern

ASP.NET MVC Tip #6 – Call RedirectToAction after Submitting a Form

PRG Pattern in the ASP.NET MVC Framework
0
Posted on 1:17 AM by Softminer and filed under

If you want to open config extension with XML style in notepad++

Navigate to %APPDATA%\Notepad++ and open the langs.xml file

Find a node like the one below and add "config" as shown

<Language name="xml" ext="xml xsml xsl" bla bla  />

its also available via setting -> style configuration
0
Posted on 7:47 AM by Softminer and filed under

HTML5 is not just about having Audio & Video.

there are many important features like

Web SQL DataBase
Web Socket
Web Storage
Offline Web Apps
Web Workers

to read more visit html5rocks.com
and dont forget to view this slides
1
Posted on 8:01 AM by Softminer and filed under

this is the html code to embed Losvegas map:

<html>
<body>
<div id='earthMap' style="position:relative; width:400px; height:400px;">
</div>
<script charset="UTF-8" type="text/javascript" 
    src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&mkt=en-us">
</script>
<script type="text/javascript">
    var map = null;
    var mapID = '';
    // map from losvegas
    map = new VEMap('earthMap');
    map.LoadMap(new VELatLong(36.17, -115.14), 10 ,'i' ,true);
     
</script>

</body>
</html>



1
Posted on 2:31 AM by Softminer and filed under ,

sometime facebook can not fetch your image in your page. to add image to your link you can use :

<link rel="image_src" href="http://media.clickonf5.org/image/logo.png" />

facebook will cache the facebook pages, if you want to refresh the cache you can add some parameter to your page like mypage.html?t=! or using URL Linter

URL Linter
http://developers.facebook.com/tools/lint/

read more +,+
0
Posted on 5:50 AM by Softminer and filed under ,

Elmah:
Error Logging Modules and Handlers for ASP.NET

Error Handling in MVC with ELMAH
Error Logging Modules and Handlers for ASP.NET

Pingdom
Be the first to know when your website is down

Host Tracker
website monitoring service

LinqPad
Convert Linq to SQL
0
Posted on 6:43 AM by Softminer and filed under

the words will break in TD when there is a space between the words. but when there is no space it will not break even if you specify a width to it.

example: 111111111111111111 will not break
1111111111111 2222222222 will break to
1111111111111
2222222222

solution in IE : use style="word-wrap: break-word";

this tag is working just in Internet explorer, solution for other browser is to use:

<wbr>

&shy;
 
in between.
0
2
Posted on 5:06 AM by Softminer and filed under , ,

I followed the following procedure to install Sesame on Apache 6 and the problem was with the Apache which return blank Page.

here is the solution:

you just need to add following System variables:

variable name : JAVA_HOME
variable value: C:\Program Files\Java\jre6

variable name : CATALINA_HOME
variable value: C:\Program Files\Apache Software Foundation\Tomcat 6.0




Installing the Sesame Server

Sesame requires an implementation of Java Servlet 2.4 and JavaServer Pages 2.0 technologies running on Java 5. Apache Tomcat 6.0 with Java SE 6.0 is recommended.

You can download Java SE 6 at http://java.sun.com/javase/downloads/

You can download Apache Tomcat 6 at http://tomcat.apache.org/download-60.cgi

The Sesame Server is included in the openrdf-sesame sdk archive available at http://www.openrdf.org/

Once you have downloaded and installed Java and Tomcat you can install the Sesame Server in the Tomcat webapps directory. Copy the openrdf-sesame.war and openrdf-workbench.war files in the Tomcat webapps directory and restart Tomcat.

If everything installed correctly opening your browser to http://localhost:8080/openrdf-workbench should present you with a "List of Repositories".

0
Posted on 12:54 PM by Softminer and filed under , , ,

 you can see a demo from here http://demo.zarafa.com/

Zarafa is a European open source collaborative software solution developed in Delft, the Netherlands. It provides email storage on the server side and brings its own Ajax-based mail client called WebAccess
0
Posted on 2:37 AM by Softminer and filed under , ,

with http://quickhighlighter.com/ you can make HTML code visible in your webpages

  1. <script type="text/javascript" language="javascript">
  2. document.getElementById('<%= txtUsername.ClientID %>').focus();
  3. </script>


if you want to have source code go to http://code.google.com/p/syntaxhighlighter/
0
Posted on 5:55 AM by Softminer and filed under ,

document.getElementById('<%= txtUsername.ClientID %>').focus();
0
Posted on 5:36 AM by Softminer and filed under

you can easily send Query to http://www.directnic.com/whois/?query=badragheh.com

and then get the response and show it in your blog.
0
Posted on 7:53 AM by Softminer and filed under ,

<form id="searchthis" action="http://www.softminer.net/search" style="display:inline;" method="get">

<input id="b-query" maxlength="255" name="q" size="20" type="text"/>

<input id="b-searchbtn" value="Search" type="submit"/>

form>

0
Posted on 4:23 AM by Softminer and filed under ,

to see your browser in different size just intall this small program called sizer
http://www.brianapps.net/sizer.html

0
Posted on 7:05 AM by Softminer and filed under

Add this tag inside

<head>

<link href="'http://website.com/favicon.ico'" rel="'shortcut" type="'image/ico'/">

head>