This is for a new HTML Outlook signature I'm trying to create. I have a single row HTML table that has several s. The table is set to display at the full width of its container. And the single row currently contains two s (this may change later).
These two columns don't contain text just background images. These background images must fill the entire space of the .
So this is what I've already tried
The image is set to display at the full width of the td but It renders only in a small space. The Image is 460 px wide.
<!DOCTYPE html>
<html>
<body>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td background="Testing_files/receptionist.png" bgcolor="#7bceeb" valign="top" width="50%">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;">
<v:fill type="frame" src="Testing_files/receptionist.png" color="#7bceeb" />
<![endif]-->
<div>
</div>
<!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</td>
<td>
``` The second column
</td>
These two columns don't contain text just background images. These background images must fill the entire space of the . What am I doing wrong? any help would be greatly appreciated since I'm new to VML.
Related
In Selenium IDE I'm trying to invoke some key shortcuts in browser. For example let's say I want to reload http://www.google.com page with:
Command: sendKeys
Target: //body
Value: ${KEY_F5}
Script passes, but is not working. Switching to any frame first also not working.
In webdriver I'm successfully using:
driver.findElement(By.xpath("//body")).sendKeys(Keys.F12);
I'm aware of refresh command in IDE, but it won't solve my problem because what I really need to do is send different F1-12 keys...
Am I missing something?
I've also tried click first at body element but I'm not able to make it work and send any F1-12 keys to window/page and not to an element.
Run the following code and you will see how your sendKey KEY_F5 is working. when script reaches sendKeys, the searchbar is being triggered It is my guess that body is being refreshed not the whole document. Not sure..though
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://www.google.com/" />
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/?gws_rd=ssl</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=lst-ib</td>
<td>dsad</td>
</tr>
<tr>
<td>click</td>
<td>name=btnG</td>
<td></td>
</tr>
<tr>
<td>sendKeys</td>
<td>//*</td>
<td>${KEYS_F5}</td>
</tr>
</tbody></table>
</body>
</html>
I am using Telerik RadHtml chart i need to chart should be auto size based on the screen resolution how to do it.
I have tried to set width and height as Auto but this not working. my chart containing in the datalist my code block below
<asp:UpdatePanel ID="pnlContainer" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="wrapper">
<asp:DataList ID="dtlstDashboards" runat="server" RepeatColumns="2" RepeatDirection="Horizontal"
OnItemDataBound="dtlstDashboards_ItemDataBound" Width="100%" DataKeyField="DashboardID">
<ItemTemplate>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left">
<telerik:RadHtmlChart runat="server" ID="chrtCntrl" Width="500px" Height="300px" >
<Legend>
<Appearance Position="Bottom">
</Appearance>
</Legend>
<PlotArea>
</PlotArea>
</telerik:RadHtmlChart>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
</div>
</ContentTemplate>
</asp:UpdatePanel>
You need to call the repaint() method of the chart if its dimensions change (usually, in the window.resize event, or any other suitable place in your code): http://www.telerik.com/support/code-library/radhtmlchart-in-a-responsive-web-page.
Here is an example:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
html, body, form
{
height: 100%;
margin: 0;
padding: 0;
}
.chartContainer
{
width: 50%;
height: 50%;
border: 2px solid red;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="Scriptmanager1" runat="server" />
<div class="chartContainer">
<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Width="100%" Height="100%">
<PlotArea>
<Series>
<telerik:AreaSeries>
<SeriesItems>
<telerik:CategorySeriesItem Y="1" />
<telerik:CategorySeriesItem Y="2" />
<telerik:CategorySeriesItem Y="4" />
<telerik:CategorySeriesItem Y="3" />
</SeriesItems>
</telerik:AreaSeries>
</Series>
</PlotArea>
</telerik:RadHtmlChart>
<script>
function resizeChart() {
//repaint the chart - will play animations
//$find("<%=RadHtmlChart1.ClientID%>").repaint();
//only resizes the chart - will not play animations
$find("<%=RadHtmlChart1.ClientID%>").get_kendoWidget().resize();
}
var TO = false;
$telerik.$(window).resize(function () {
if (TO !== false)
clearTimeout(TO);
TO = setTimeout(resizeChart, 200); //200 is time in miliseconds
});
</script>
</div>
</form>
</body>
</html>
resize timeout idea courtesy of this post javascript resize event firing multiple times while dragging the resize handle
Telerik Controls RadGrid and RadHTMLChart need to have the Height and Width on every container that is sized by percentage in order to be sized by percentage. You will have to add Height=100% Width=100% to all the containers that hold these items, all the way to the root.
I'm have made a upload page in classic asp and it works fine, as long as the filenames are not in utf-8 characters. I have added charset til the page and the form accepts utf-8 characters but my files are saved as Доклад Региона.pdf bug should be Доклад Региона.pdf
I don't know if there is anything more I can do or it is the "Pure-ASP file upload" that does not support utf-8 characters.
Does anyone how to fix it?
My asp page looks like this
<%
Response.CodePage = 65001
Response.CharSet = "utf-8"
'Create upload form
'Using Huge-ASP file upload
'Dim Form: Set Form = Server.CreateObject("ScriptUtils.ASPForm")
'Using Pure-ASP file upload
Dim Form: Set Form = New ASPForm %><!--#INCLUDE FILE="upload2.asp"--><%
dim File
DestinationPath = Server.mapPath("Files")
If Form.State = 0 Then 'Completted
For Each File In Form.Files.Items
If Len(File.FileName) > 0 Then
Form.Files.Save DestinationPath
End If
Next
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Language" content="en"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Project Site</title>
<link id="ss__cs" rel="stylesheet" href="CSS/stylesheet.css" type="text/css"/>
</head>
<body style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; padding: 0;" >
<form method="POST" id="myform" ENCTYPE="multipart/form-data" acceptcharset="UTF-8">
<table>
<tr>
<td>File</td>
<td><input type="file" id="File1" name="File1" class="defaultfont"></td>
</tr>
<tr height="10">
</tr>
<tr>
<td></td>
<td><input Value="Cancel" Type="button" class="defaultfont" onclick="window.close()"> <input Value="Upload file" Type="submit" class="defaultfont" ></td>
</tr>
</table>
</Form>
</body>
</html>
Try adding
If Form.State = 0 Then 'Completted
'Add this line to set the character set based on the response.
Form.CharSet = Response.CharSet
For more information see Upload - use unicode (utf-8) character set for request/response data .
this is my code:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<!--<script type="text/javascript" src="js/jquery-ui.js"></script>
<script src="js/jquery-ui-1.8.20.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.20.min.js" type="text/javascript"></script>-->
<head>
<body>
<canvas id="myCanvas" width="940" height="600" style="border:1px solid #c3c3c3;">
Your browser does not support the canvas element.
</canvas>
<script type="text/javascript">
function ImageLoad()
{
var ctx = document.getElementById('myCanvas').getContext('2d');
var img = new Image(); // Create new img element
img.onload = function(){
// execute drawImage statements here This is essential as it waits till image is loaded before drawing it.
ctx.drawImage(img , 0, 0);
};
img.src = $('img[alt="example"]').attr('src'); // Set source path
}
</script>
<!--<img src="basicCycle.jpg"/>-->
<table border="1px">
<tr>
<td><img src="cycle6.jpg" alt="example" height="120" width="120"></td>
<td><img src="cycle1.jpg" alt="example" height="120" width="120"></td>
<td><img src="cycle2.jpg" alt="example" height="120" width="120"></td>
<td><img src="cycle3.jpg" alt="example" height="120" width="120"></td>
<td><img src="cycle4.jpg" alt="example" height="120" width="120"></td>
<td><img src="cycle5.jpg" alt="example" height="120" width="120"></td>
<td><img src="cycle6.jpg" alt="example" height="120" width="120"></td>
<td><img src="cycle1.jpg" alt="example" height="120" width="120"></td>
</tr>
</table>
</body>
</html>
now i want to load cycle1 in canvas when i click to cycle1 image.and load cycle2 when i click to cycle2 image.
the problem is my code always load first td image.whatever i clicked.
The problem is that you are always setting the src to that of the image whose alt is "example" and all the images have that alt, so you are always getting the first one.
Instead of:
img.src = $('img[alt="example"]').attr('src'); // Set source path
Do this:
img.src = $(this).find('img').attr('src');
"this" refers to the link that was clicked, but you need to replace the href values with "#":
<td><img src="cycle1.jpg" alt="example" height="120" width="120"></td>
And put this right before the closing <script> tag:
$(document).ready(function () {
$('a').click(ImageLoad);
});
You should also put:
return false;
as the last line inside ImageLoad(). This will keep the page from jumping to the top, if it has been scrolled.
I' try to drawing canvas using example2 taken from http://dev.opera.com/articles/view/html5-canvas-painting/. It works on Firefox 8.0.1 and Opera 11.52.
Then I modified the code put the canvas into a table cell and stop working.
I tried to put canvas outside the table and absolute positioned the canvas on a cell table still doesn't work.
The above problem happened only on Firefox, running well on Opera.
Here's the code
<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Sign-In</title>
<style type="text/css"><!--
#imageView { border: 1px solid #000; }
--></style>
</head>
<body>
<p>Please fill in name and id card no. Then sign-in on provided box</p>
<table>
<tr><td>Full Name</td><td><input name="name"><td> </tr>
<tr><td>ID Card No</td><td><input name="idcard"><td> </tr>
<tr><td>Signature</td><td>
<div id="container">
<canvas id="imageView" width="200" height="100"> </canvas>
</div>
</td> </tr>
</table>
<script type="text/javascript" src="http://dev.opera.com/articles/view/html5-canvas-painting/example2.js"></script>
</body></html>
Any idea?
Well, here is your code in jsfiddle: http://jsfiddle.net/7PRDq/
The problem is almost certainly the mouse handling code giving a bad X,Y in Firefox. If you try to draw a signature in the upper-left corner of the box you'll see that it is drawing with an incorrect offset.
If you make the canvas 2000x1000 instead of 200x100 you'll see the problem much more clearly!
You'll need to find more modern mouse code for FireFox.