Background working fine on FF and IE 7 but not on IE6
#middle { background: url(main-bg.jpg) repeat-y; overflow: hidden;
margin-left: 1px; margin-top: 38px }
I am trying to get a feel for adding content to a page with XMLHTTPRequest. I would like to add the results to existing page content say in a second column, but I am not having any luck. I would appreciate a shove in the right direction. Thanks for any help.
<!DOCTYPE html>
<html>
<head>
<style>
#button{
float: left;
}
#team{
float: left;
}
</style>
<title>XMLHTTPRequest</title>
<script src="jquery-1.10.2.js"></script>
<script>
$(document).ready(function(){
xhr = new XMLHttpRequest();
xhr.onreadystatechange = function(){
if (xhr.readyState == 4 && xhr.status == 200) {
xmlDoc = xhr.responseXML;
var team = xmlDoc.getElementsByTagName("teammember");
var html = "";
for (i = 0; i < team.length; i++){
html +=
xmlDoc.getElementsByTagName("name")[i].childNodes[0].nodeValue + "<br>" +
xmlDoc.getElementsByTagName("title")[i].childNodes[0].nodeValue + "<br>" +
xmlDoc.getElementsByTagName("bio")[i].childNodes[0].nodeValue + "<br><br>";
}
//this is the code I would like help with
var team = document.getElementById("team");
team.appendChild(document.createTextNode("html"));
}
}
xhr.open("GET", "team.xml", true);
});
</script>
</head>
<body>
<div id="button">
<button onclick="xhr.send()">Click Me!</button>
</div>
<div id="team">
</div>
</body>
</html>
I have an array like so:
array(
'a'=>array(
'a'=>3,
'f'=>5,
'sdf'=>0),
't'=>array(
'a'=>1,
'f'=>2,
'sdf'=>5),
'pps'=>array(
'a'=>1,
'f'=>2,
'sdf'=>3)
);
Notice how the sub-arrays are the same for each top-level array. If I wanted to, what's the easiest way to combine the sub-arrays so that I'm left with a one-dimensional array like:
array(
'a'=>5,
'f'=>9,
'sdf'=>8
);
Im trying to convert a SQL join to LINQ. I need some help in getting the nested join working in LINQ.
This is my SQL query, Ive cut it short just to show the nested join in SQL:
LEFT OUTER JOIN dbo.TaskCommentRecipient RIGHT OUTER JOIN dbo.TaskComment ON dbo.TaskCommentRecipient.TaskCommentID = dbo.TaskComment.TaskCommentID
ON dbo.Task.Taskid = dbo.TaskComment.TaskCommentTaskId
string queryString = "SELECT SUM(skupaj_kalorij)as Skupaj_Kalorij "
+ "FROM (obroki_save LEFT JOIN users ON obroki_save.ID_uporabnika=users.ID)"
+ "WHERE users.ID= " + a.ToString() + " AND obroki_save.datum =?";
using (OleDbCommand cmd = new OleDbCommand(queryString,database))
{
cmd.Parameters.Add("@datum", OleDbType.Char).Value = DateTime.Now.ToShortDateString();
}
Why doesn't the parameter datum get the date value? (the value of at least one complex parameter has not been determined )
i have uiview i have rotate view left and right side ...i m transform view ...but problem is view fream is not changing...
my code is like this ...
CGAffineTransform tRotate45 = CGAffineTransformMakeRotation(-1.57);
self.view.transform = tRotate45;
imageScrollView.contentSize = CGSizeMake(480, 320);
self.view.frame =[[UIView alloc] ] CGRectMake(0, 0, 480, 320);
view is showing proper how can i adjust this ...
int Size(struct node* node)
{
if(node == NULL)
{
return 0;
}
else if(node != NULL)
{
return (Size(node->left) + 1 + Size(node->right));
}
}
Hi, Can Anybody please post the stack trace for the following piece of code.
Lets say if we insert the values 2, 1, 10, 5...
Then what could be the stack representation during the recursion process.. Please, its very urgent, and its very confusing too...
Hi,
I want to get some results via query simillar to:
SELECT
* FROM
users LEFT JOIN
IF (users.type = '1', 'private','company') AS details ON
users.id = details.user_id WHERE
users.id = 1
Any ideas?
The string is stored in a parameter.
Say, @FiscalPeriod = "[Date].[Fiscal Dates].[Fiscal Quarter]"
Now,
I need to use the parameter as
SELECT Measures.[Revenue] ON 0,
CLOSINGPERIOD("Parameter Here") ON 1
FROM [Sales]
STRTOMEBER function gives error because it is looking for a member at the leaf left such as
[Date].[Fiscal Dates].[Fiscal Quarter].&[Q1 - 2009]
How can I resolve the string into the mdx expression to use it with closing period??
I am creating a gallery using jQuery which displays pictures horizontally, with a "left" and "right" button below, that scrolls the row of images. There are plenty of tutorials and plugins for this.
The problem for me though, is that 1) I don't know the width of the images. And 2) I need the item I scroll to, to be centered.
How do I go about this?
Thanks a lot, Gorm
I need a TSQL query which returns all seconds since a given begin date. I am going to use this toleft outer join against another table to see how many bytes were downloaded each second. I am using Sql Server 2008.
I dont know what it is called but you can see on this page http://carleypelletier.deviantart.com/gallery/#_browse if you click on a category you'll get a list and if there is a subcategory there will be a at the end. When clicking this the menu text moves left off the menu and the new categories are in. How do i do this type of menu? i'm open to any libs. It would be nice if i can fill it using json or a config file.
Hey all,
I am trying to centre page numbers at the bottom of this test blog...
http://jocelynwarner.com/test/
in the centre between the previous and next buttons however I cannot think how to do it, I tried a few different tutorials but they didn't really seem to help with this.
Any hints on how to make them sit centrally in the left column (the width of the blog content - sidebar) would be greatly appreciated.
when using hibernate with spring, can someone explain how the session unit of work and transactions are handled?
is the transaction started at the beginning of the page request, and committed at the end?
can I have multiple db calls per request, that each have different transaction levels? e.g. some are left as default, while others are read-uncommitted?
I follow this rule but some of my colleagues disagree with it and argue that if a class is smaller it can be left in the same file with other class(es).
Another argument I hear all the time is "Even Microsoft don't do this, so why should we?"
What's the general consensus on this? Are there cases where this should be avoided?
Hi,
i have this page.
login: [email protected] password: m
You can see two selects in the filter for which i have this rule in gente.css:
td.select label{
margin-left:12px;
}
The problem: the rule is applied but doesn't appear in the Style tab of Firebug.
Any idea?
Regards
Javi
Hi, I cannot find any complete description about LL() parser, such as ANTLR, on Internet.
I'm wondering what is the difference between an LL(k) parser and an LL() one and why they can't support left-recusrive grammars despite their flexibility.
Thanks in advance.
Fabio.
Is it possible to specify the width of a table column in percentages using css?
Also is it possible to specify the text alignment of a specific column?
For example I have a table that has 3 columns.
I would like to say
col1.width = 20%
col2.width = 40%
col3.width = 40%
col1.text-align = left;
col2.text-align = right;
col3.text-align = center;
Is there any way to change Firefox system icon (the one on the left top of the window)?
Precision : I want to change the icon of a bundled version of Firefox with apache/php and my application. So manual operation on each computer is not a solution.
I try Resource Hacker and it's the good solution. The add ons one is good too.
For floated elements should we always define display:inline along with overflow:hidden, when we clear float using overflow:hidden?
#secondary-col {
float:left;
overflow:hidden;
display:inline;
}
Duplicate: Is there any form designer available for Google Android?
I would like to move a CheckBox, so it displays in a different location than the top-left corner under Absolute Layout inside main.xml, for 'Android'. I'm using Eclipse to edit my views. How would I do this?
On an iPhone they have a tool called Interface builder that allows you to move things in a WYIWYG fashion.
Does Eclipse have similar functionality?
Regards
ShotSimon
Is there a function or constant defining the amount of available memory for an app in iPhone OS?
I'm looking for a device-independent way (iPod touch, iPhone, iPad) to know how much memory the app has left.
My form has a group box which contains two overlapping rectangles. The form's other controls are two sets of four numeric up down controls to set the rectangles' colors. (nudF1,2,3 and 4 set the rectangle that's in front, and nudB1,2,3 and 4 set the rectangle that's behind.) Everything works fine, except that the rectangles do not display the colors set in the numeric up downs when the form first loads. The numeric up down controls' ChangeValue events all call the ShowColors() method. The form's Load event calls the csColorsForm_Load() method. Any suggestions?
namespace csColors
{
public partial class csColorsForm : Form
{
public csColorsForm()
{
InitializeComponent();
}
private void csColorsForm_Load(object sender, EventArgs e)
{
this.BackColor = System.Drawing.Color.DarkBlue;
SetColors(sender, e);
}
private void SetColors(object sender, EventArgs e)
{
Control control = (Control)sender;
String ctrlName = control.Name;
Graphics objGraphics;
Rectangle rect1, rect2;
int colorBack, colorFore;
objGraphics = this.grpColor.CreateGraphics();
// If calling control is not a forecolor control, paint backcolor rectangle
if (ctrlName.Substring(0,4)!="nudF")
{
colorBack = int.Parse(SetColorsB("nudB"), NumberStyles.HexNumber);
SolidBrush BrushB = new SolidBrush(Color.FromArgb(colorBack));
rect1 = new Rectangle(this.grpColor.Left, this.grpColor.Top,
this.grpColor.Width, this.grpColor.Height);
objGraphics.FillRectangle(BrushB, rect1);
}
// Always paint forecolor rectangle
colorFore = int.Parse(SetColorsB("nudF"), NumberStyles.HexNumber);
SolidBrush BrushF = new SolidBrush(Color.FromArgb(colorFore));
rect2 = new Rectangle(this.grpColor.Left, this.grpColor.Top,
this.grpColor.Width, this.grpColor.Height);
objGraphics.FillRectangle(BrushF, rect2);
objGraphics.Dispose();
}
private string SetColorsB(string nam)
{
string txt="";
for (int n = 1; n <= 4; ++n)
{
var ud = Controls[nam + n] as NumericUpDown;
int hex = (int)ud.Value;
txt += hex.ToString("X2");
}
return txt;
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
If you have an array of integers, such as 1 2 5 4 3 2 1 5 9
What is the best way in C, to remove cycles of integers from an array.
i.e. above, 1-2-5-4-3-2-1 is a cycle and should be removed to be left with just 1 5 9.
How can I do this?
Thanks!!
hi , my project this year is to develop a text mining tool (with new features)
so we need a mini script language in this tool to add annotation to texts
this language should be simple and like lisp grammars (left and right side) .
what i need is how to design this language ,i know how to constract the compiler ,
but how to write language grammars ? , and i want to use some mini open source language or any language bnf
please advice me and if there is a language i can use and customize to meet my needs ?
thanks