Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

Friday, 12 October 2012

Empty cells in a table

One day i worked on a table that fetches some record from database.But the empty cells were coming without border like that:(in internet explorer)

actually the table tag is like that

<table border="1">

To troubleshoot problem my TL suggested to include attribute/values for table tag as
rules="all" frame="box"

<table border="1" rules="all" frame="box">

my problem was solved (:)

Rules attribute of table tag--he rules attribute allows you to set borders (also called rules, surprise, surprise!) inside the table at the boundaries between cells
//Display only the borders between the rows:

<table rules="rows">
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
</table>

Table with rules="rows":
MonthSavings
January$100

//Display only the borders between the coloumns:

<table rules="cols">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>

Table with rules="cols":
MonthSavings
January$100

<table rules="all">
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
</table>
</body>
</html>

Table with rules="all":
MonthSavings
January$100

frame="box "Display only the outside borders of a table:

Note: to encounter the above problem either give

<table border="1" rules="all" frame="box">

or
<table border="1"  frame="box">


 

Monday, 24 September 2012

Setting all value in Multiselector

Usually Multiselector doesn't have "all" option value..If it happens then then it's better to set value as "All" if <select> tag is defined in one form page and we render the value to some another page or multiple pages.If we defined it in same page and get on same page then we must have to define the value at declaration time.

Now if we get the value from "Select tag" then the value we are getting like this:

"val1 val2 val3"

and this single must be tokenised to iereate over multiple option values by two approach:
1.Using blank space " "
2.similar string patern.

First approach: (Best approach)
It is safe to use first approach if option string values doesn't have multiple sapces.Therefore try to avoid spaces in option values at definition time till it is not compulsary ( by normalising/trimming/removing spaces see difference in another blog for all three terms ) so that we can easily tokenized by using this approach since after each value there is a space val1 val2 val3 etc.

Second approach:

If it is complulsary to havaing spaces in string and string have some business pattern like (exporting each pdf or xml has an extension .pdf or .xml) therefore we can tokenize over each value as:

for ex- let $All := "0001012-0000002-KOMMUNEKREDIT.xml 0001012-0000003 KOMMUNE KREDIT.xml"
for $Each at $pos in fn:tokenize($All,".xml")[1 to fn:last()-1]
let $EachBatch := fn:normalize-space(fn:concat($Each,".xml"))
return $EachBatch

and then we also need to concat the value over which each string is tokenised.Here we run the loop to the second last element otherwise result would come as: >
0001012-0000002-KOMMUNEKREDIT.xml
0001012-0000003-KOMMUNE KREDIT.xml
.xml

there fore we skip last element.

Third Approach (Only used in following situation)

But what happens if we have compulsion to have spaces in option values and string doesn't have patterns then we have to append some tag identofire with each option value at declaration time or rendered time to differntiate multiple values.

Tuesday, 26 June 2012

html5test.com


your browser scores

402

AND 13 BONUS POINTS

out of a total of 500 points
You are using Chrome 19 on Windows 7Correct?
Parsing rules+2 bonus points11
<!DOCTYPE html> triggers standards modeYes 
HTML5 tokenizerYes 
HTML5 tree buildingYes 
HTML5 defines rules for embedding SVG and MathML inside a regular HTML document. Support for SVG and MathML is not required though, so bonus points are awarded if your browser supports embedding these two technologies.
SVG in text/htmlYes 
MathML in text/htmlYes 
Canvas20
canvas elementYes 
2D contextYes 
TextYes 
Video+6 bonus points21/31
video elementYes 
Subtitle supportNo 
Poster image supportYes 
The following tests go beyond the requirements of the HTML5 specification and are not counted towards the total score. If browser support for one or more video codecs is detected, two bonus points are awarded for each codec.
MPEG-4 supportNo 
H.264 supportYes 
Ogg Theora supportYes 
WebM supportYes 
Audio+5 bonus points20
audio elementYes 
The following tests go beyond the requirements of the HTML5 specification and are not counted towards the total score. If browser support for one or more audio codecs is detected, one bonus point is awarded for each codec.
PCM audio supportYes 
AAC supportYes 
MP3 supportYes 
Ogg Vorbis supportYes 
WebM supportYes 
Elements25/30
Embedding custom non-visible dataYes 
New or modified elements
Global attributes or methods
hidden attributeYes 
Forms74/108
Field types
Fields
Forms
User interaction37
Drag and drop
HTML editing
Spellcheck
spellcheck attributeYes 
History and navigation5
Session historyYes 
Microdata0/15
MicrodataNo 
Web applications18/20
Application CacheYes 
Custom scheme handlersYes 
Custom content handlersNo 
Custom search providersYes 
Security5/15
Sandboxed iframeYes 
Seamless iframeNo 
iframe with inline contentsNo 
Various4/6
Scoped style elementNo 
Asyncronous script executionYes 
Runtime script error reportingYes 
Base64 encoding and decodingYes 

related specifications

Location and Orientation20
GeolocationYes 
Device OrientationYes 
WebGL25
3D contextYes 
Communication37
Cross-document messagingYes 
Server-Sent EventsYes 
WebSocketYes 
Files20
FileReader APIYes 
FileSystem APIYes 
Storage20
Session StorageYes 
Local StorageYes 
IndexedDBYes 
The Web SQL Database specification is no longer being updated and has been replaced by IndexedDB. Because at least 3 vendors have shipped implementations of this specification we still include it in this test.
Web SQL DatabaseYes 
Workers15
Web WorkersYes 
Shared WorkersYes 
Local multimedia0/20
Access the webcamNo 
Notifications10
Web NotificationsYes 
Other7
Page VisibilityYes 
Text selectionYes 
Scroll into viewYes 

experimental

Audio4
Web Audio APIYes 
Video and Animation4
Full screen supportYes 
window.requestAnimationFrameYes 
id: 1340703277922_c2df