Can any body point me to the links which has some table beautification code like the one mentioned and easy to implement
http://24ways.org/2005/tables-with-style
Thanks..
Hi,
I wanted to have an interface to allow the user to create animation on the browser using canvas element and then i have to save that animation and later reproduce that animation to the others users.
Can anybody How can i do this. Please reply quickly . I have my deadline.
here is my view code:
<%=Model.HtmlData %>
here is my controller code:
public ActionResult GetPage()
{
ContentPageViewModel vm = new ContentPageViewModel();
vm.HtmlData = _htmlPageRepository.Get("key");
return View(vm);
}
my repository class basically queries a database table that has the fields:
id, pageName, htmlContent
the .Get() method passes in a pageName (or key) and returns the htmlContent value.
Right now i have just started this (haven't persisted anything to the db yet) so i am not doing any explicit encoding in my code now.
What is the best practice for where i need to do encoding (in the model, the controller, the view ??)
Do you know Parser which could operate on AJAX and has option to override method of cennecting (I would like to use my own method to connect to pages).
I would like to have some functionality by which if i write
<textarea maxlength="50"></textarea>
<textarea maxlength="150"></textarea>
<textarea maxlength="250"></textarea>
it will automatically impose the maxlength on the textArea. If possible please donot provide the solution in JQuery.
Note: This can be done if i do something like this:
<textarea onkeypress="return imposeMaxLength(event, this, 110);" rows="4" cols="50">
function imposeMaxLength(Event, Object, MaxLen)
{
return (Object.value.length <= MaxLen)||(Event.keyCode == 8 ||Event.keyCode==46||(Event.keyCode>=35&&Event.keyCode<=40))
}
copied from another thread
But the point is I don't want to write onKeyPress and onKeyUp every time i declare a textArea.
I am trying to find a string in Hebrew in a website. The reading code is attached.
Afterward I try to read the file using streamReader but I can't match strings in other languages.
what am I suppose to do?
// used on each read operation
byte[] buf = new byte[8192];
// prepare the web page we will be asking for
HttpWebRequest request = (HttpWebRequest)
WebRequest.Create("http://www.webPage.co.il");
// execute the request
HttpWebResponse response = (HttpWebResponse)
request.GetResponse();
// we will read data via the response stream
Stream resStream = response.GetResponseStream();
string tempString = null;
int count = 0;
FileStream fileDump = new FileStream(@"c:\dump.txt", FileMode.Create);
do
{
count = resStream.Read(buf, 0, buf.Length);
fileDump.Write(buf, 0, buf.Length);
}
while (count > 0); // any more data to read?
fileDump.Close();
Hi, I want to downlaod a MS Word document from a server. Creating the document in the server takes some time, and I need to measure the time it takes from clicking the link to the end of the download process. (or to the beginning of the download?)
Any way for this?
Thanks
I finally was able to align the columns in the tables of a page of my website. Though I found the solution I don't understand it.
This is a fiddle I prepared. If you delete
display: block
from the CSS the columns are centered perfectly.
The fact is that I don't understand what that instruction is causing problems, doesn't it means that elements are displayed as block elements? Shouldn't it cause the elements (the raw in particular) to fill an entire line?
Thanks for your explanation
Is there a way of completely removing the styling of a button in Internet Explorer? I use a css sprite for my button, and everything looks ok.
But when I click the button, it moves to the top a little, it makes it look out of shape. Is there a css click state, or mousedown? I don't know what triggers that state.
I know it's not a really big deal, but sometimes it's the small things that matter.
I'm using Text.ParserCombinators.Parsec and Text.XHtml to parse an input like this:
hello 123 --this is an emphasized text-- bye\n
And my output should be:
<p>hello 123 <em>this is an emphasized text</em> bye\n</p>
Any ideas? Thanks!!
Hi,
I'm using ui.datepicker.js
and I want to validate the date field to make sure the user select a date.
I have tried
function allow_submit()
{
var f = document.all.frm;
if (f.date.value == "") {
jAlert("Please select a date");
return false;
} //if
return true;
}
and also have try
if (f.date.value == "0000-00-00") {
without succes
Any clue?
Internet Explorer has an option to save a web page as a text file, with all the tags removed. I need a way to batch process that stuff for a project at work. Or there any command line utilities or libraries that can do the same thing for me? COM-interop with IE(not my first choice!)? It doesn't have to format exactly like IE, just give me plain text.
So, here is my problem. I'm kinda stuck at the moment.
I have a huge background image and content in the middle with those attributes:
content is centered with margin auto and has a fixed width
the content is related to the image (like the image is continued within the content)
this relation is only horizontally (vertically scrolling moves everything around)
This works actually fine (I'm only talking desktop, not mobile here :) ) with a position fixed on the huge background image.
The problem that occurs is the following: When I resize the window to "smaller than the content" the background image gets it width from the body instead of the viewport. So the relation between content and image gets lost.
Now I have this little JavaScript which does the trick, but this is of course some overhead I want to avoid:
$(window).resize(function(){
img.css('left', (body.width() - img.width()) / 2 );
});
This works with a fixed positioned image, but can get a litty jumpy while calculating.
I also tried things like that:
<div id="test" style="
position: absolute;
z-index: 0;
top: 0;
left: 0;
width: 100%:
height: 100%;
background: transparent url(content/dummy/brand_backgroud_1600_1.jpg) no-repeat fixed center top;
"></div>
But this gets me back to my problem described.
Is there any "script-less", elegant solution for this problem?
UPDATE: now with Fiddle
The one I'm trying to solve:
http://jsfiddle.net/insertusernamehere/wPmrm/
The one with Javascript that works:
http://jsfiddle.net/insertusernamehere/j5E8z/
NOTE
The image size is always fixed. The image never gets scaled by the browser. In the JavaScript example it get's blown. So don't care about the size.
Hi, few questions, just wondering if anyone can help?
I have a table with 1 long row (1000 pixels) and one single column, how do i go about creating a method whereby when the mouse cursor is on the leftmost side of the cell, a variable, lets say X is set to 0, the further right the mouse cursor moves in the cell, the value of X increases.
I know that sounds like a strange question but im working on a project where this type of functionality is desired.
Is there a javascript method to create this feature?
Thanks for any help.
I am trying to create a news ticker for a website that reads in the contents of a folder, where each file in the folder would hold a news update, and I am trying to do this without having to manually create 10 different Iframes for each individual file, and having to keep files names etc. the same.
Is this possible, and if so how is it done?
Thanks for the help
The software I am working with is Dreamweaver CS4
I have some table cells containing dates formatted like this: 2009-01-01. I.E 7 seems to be breaking these into two lines at the hyphen. Is there any way to turn this off?
Hi, is there a way with css or js to show the scrollbar of an element on the left instead of on the right? i don't need a crossbrowser way i need it only on Firefox.
Hello there, this is a problem I'm currently facing :
I've made a
<select id="nationalityArea.id" tabindex="6" name="nationalityArea.id">
<option value="null"></option>
<option value="619">Îles Cook</option>
<option value="646">Îles Féroé</option>
<option value="625">Îles Salomon</option>
<option value="598">Îles Vierges Américaines</option>
<option value="572">Îles Vierges Britanniques</option>
</select>
Looks fine right ?
The problem is that the tabindex method works perfectly on firefox and internet explorer but not on chrome...
I think the problem came from the
< g:select name="nationalityAreaId" from="${myValue}" tabindex="6" optionKey="id" value="${user?.profile?.nationalityAreaId}" noSelection="['null': '']"/
But not being a Browser specialist is hurting me on this problem. Has anyone already faced this ? And more importantly, found a solution ?
Thanks
Note below is my CSS. This is a three column website. my main content is in the center. The problems that I am having is that my main content does not adjust correctly to IE. It is fine in FF but not in IE.
.columns3headers2 #mainContent1 {
margin: 0 22% 0 24%;
width: 570px;
background-color: #DDDDDD;
height: 370px;
padding: 0, 10, 0, 0;
border: groove
}
.columns3headers2 #mainContent2 {
margin: 0 22% 0 24%;
width: 570px;
background-color: #DDDDDD;
height: 190px;
border: groove
}
I do not have much in my main content.
<div id="mainContent1">
<h1> Main Content </h1>
<div id="cround">
<h3>Absolute Value</h3>
<ul>
<li>Test 1</li>
<li>Test 2</li>
<li>Test 3</li>
<li>test 4</li>
</ul>
</p>
</div>
How can i add a link to my td tag from a table?
onclick doesnt work for me :S, or maybe a good example :P
my td tag:
$world .= ('<td background="images/world/Heli.jpg" border="1"></td>');
link:
<a href="?site=world&action=showvillage&id=' . getVillageID(($xm2), ($ym2)) . '"></a>
thnx :D
I have a text field who's value is populated from a SQL recordset (below).
<input name="txtAmount" id="txtAmount" type="text" size="10" maxlength="10" value="<%=RS("Amount")%>">
In the SQL table, the Amount field (which is a money data type) is inserted correctly, as 5.00 However, in the web page, it displays only as 5 (i.e. the decimal places are missing). Anyone know why this might be and how I can get the decimal places to display in the field? Thanks!
Expiration Month
var month = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec");
for (var m=0; m" +month[m]+ "");
}
Expiration Year
var year = new Date();
var year2 = year.getFullYear();
for (y=0; y" +(year2+y)+ "");
document.write("");
}
I have a table that I cannot get to size correctly. The table populates with information from a database via a loop. Sometimes if the data is too long the table extends past where it should. When the data is that long I want the data to wrap in the cells so the table stays where it should. I have tried the normal table data but it isn't working. Any ideas?
<?php
echo "<table>
<tr>
<th>id</th>
<th>700-number</th>
<th>First name</th>
<th>Last name</th>
<th>Email</th>
<th>Response</th>
<th>Created On</th>
</tr>";
$num = mysql_num_rows($result);
for ($i = 0; $i < $num; $i++)
{
$row = mysql_fetch_array($result);
$id = $row['id'];
$school_id = $row['school_id'];
$fname = $row['first_name'];
$lname = $row['last_name'];
$email = $row['email'];
$attending = ($row['attending'] == 0) ? 'No' : 'Yes';
$date = $row['created_on'];
$class = (($i % 2) == 0) ? "td2" : "td1";
echo "<tr>";
echo "<td class=" . $class . ">$id</td>";
echo "<td class=" . $class . ">$school_id</td>";
echo "<td class=" . $class . ">$fname</td>";
echo "<td class=" . $class . ">$lname</td>";
echo "<td class=" . $class . ">$email</td>";
echo "<td class=" . $class . ">$attending</td>";
echo "<td class=" . $class . ">$date</td>";
echo "</tr>";
}
?>
</table>