|
I've done an exhaustive search for my problem on the net and either I'm not searching for the right keywords or I'm the only one having this problem. My site has several pages that utilize XML Data Islands and binding to HTML tables. The binding works flawlessly. What I need to do is loop through the rows of the table following the binding and do some conditional formatting, housekeeping, etc. An example would be to highlight every other row for easy readability.
My problem is that when I call my formatting code the data binding has not yet completed. Therefore, when I get a count of the rows its whatever it was at that moment in time. It's not complete and what I end up with is only a top portion of the table is formatted.
In an effort to wait for the data binding to fully complete I've tried various events on the Data Island, table, XMLHTTP object, etc. but to no avail. The only way I can get this to work is to call the formatting function using the setTimeout method but even then the correct number of milliseconds to wait is hit or miss.
Below is a simplified version of my code that simulates my problem. The row count returned by the getTableRowCount function is always lower than the actual number of rows that are created when the data binding finishes.
<html>
<script>
function retrieveStatusHistory() {
var xmlHttp = new ActiveXObject("MSXML2.XmlHttp");
xmlHttp.Open("GET", myURL, false);
xmlHttp.Send(null);
document.all.xloadstatus.loadXML(xmlHttp.responsetext);
}
function getTableRowCount() {
var myRows = document.getElementsByTagName("tr");
alert(myRows.length);
}
</script>
<body onload="retrieveStatusHistory();getTableRowCount();">
<xml id="xloadstatus"></xml>
<table datasrc="#xloadstatus">
<!-- My row and cell definitions -->
</table>
</body>
</html>
|
|
|
|
|
how to write Edit and Update both method in Winform2008 on one button and at run time caption should be change.
if i click button edit after click should be update...
Vinay
|
|
|
|
|
|
i have copied the image module and enabled it.i want to attach it to my already existing webpage.how will i do it?i am able to attach it to an entirely new page though
|
|
|
|
|
I need to change tabs in JavaScript i searched a lot but no solutions worked for me.
|
|
|
|
|
I found a solution but i did not what is the difference between what i have and what i found
Here is what i have (solution)
var tabContainer = $get('<%=TabContainer1.ClientID%>');
if (tabContainer != undefined && tabContainer != null)
{
tabContainer = tabContainer.control;
tabContainer.set_activeTabIndex(0);
}
What did not work was:
$find('<%=TabContainer1.ClientID%>').set_activeTabIndex(2);
it told me that the control doesnt have that property
|
|
|
|
|
The $find method would have worked if you prefaced it with 'top.'
This worked for me:
<big>top</big>.$find('<%=TabContainer1.ClientID%>').set_activeTabIndex(3);
|
|
|
|
|
Could any body tell me what does $find do?? and why it returns unidentified object to a control that exists??:S
|
|
|
|
|
|
still i didnot understand it i read the blog.
|
|
|
|
|
|
the one you sent is by far the most explainable blog i found but still doesnt both functions get the the control by ID
|
|
|
|
|
Hi..
In my web application(asp.net/c#),I have RDLC report with few charts on it and want to display the report on reportviewer at runtime.
following is my code.
ReportViewer1.ProcessingMode = ProcessingMode.Local;
ReportViewer1.LocalReport.ReportEmbeddedResource = Server.MapPath("Graphs//GraphsAll.rdlc");
ReportDataSource ds1 = new ReportDataSource();
ds1.Name = "Graphs_SelectAll_DataTable1";
ds1.Value = ds.Tables[0];
ReportViewer1.LocalReport.DataSources.Add(ds1);
ReportViewer1.LocalReport.Refresh();
ReportViewer1.Visible = true;
I am getting following error
"An error occurred during local report processing.
The report definition for report 'D:\Hemant\UI\UI\User\Graphs\GraphsAll.rdlc' has not been specified"
could u tell me what's going on...
thanks
hemant
By:
Hemant Thaker
modified on Wednesday, July 29, 2009 5:28 AM
|
|
|
|
|
Hi!!!
I am trying to display image from C and D drive using following code. The code is very simple. Here it is:
protected void Page_Load(object sender, EventArgs e)
{
Response.Write ("<table border='1'>");
Response.Write ("<tr>");
Response.Write ("<td><img src='D:\at.jpg'></td>");
Response.Write ("<td><img src='C:\try.jpg'></td>") ;
Response.Write ("</tr>" );
Response.Write("</table>");
}
I neither get image on page nor error message. How could i resolve it?Please guide me...
|
|
|
|
|
Hi,
this won't work since the client doesn't know anything about files on the servers disk. What you have to do is to put an URL into the src-tag (e.g. http://myserver.com/images/at.jpg). I suggest to create an image folder within your ASP.NET Website (name it images), then add all images you want to display to this folder and replace the value in the img-src tag with 'images/at.jpg' or 'images/try.jpg'.
Let me know if this helps you.
Regards
Sebastian
|
|
|
|
|
yeah offcourse it worked...
Thankyou for helping me...
|
|
|
|
|
I assign image path to some string variable like this:
string path = "C:\at.jpg";
and apply this:
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(@"<table border='1'>");
Response.Write(@"<tr>");
Response.Write(@"<td><img src=path></td>");
Response.Write(@"<td><img src='D:\try.jpg'></td>");
Response.Write(@"</tr>");
Response.Write(@"</table>");
}
Then it does not display image neither it shows any error message. Why so?Please help..
|
|
|
|
|
As i mentioned in the post before do the following:
1. create a folder called images in your Application folder (where your website is)
2. copy the try.jpg to this folder
3. rewrite your code to this:
Reponse.Write(@"<td><img src='images\try.jpg'></td>");
The browser (client side) does not provide an error when it couldn't find the image file.
|
|
|
|
|
I understood your point, did the same and got the accurate results too..
but now i want to assign that image path to some variable and then want to assign that variable to src..as i said in my last message...
Guide me for this please!!!
|
|
|
|
|
Well than just do that:
<br />
string sImage = "images/try.jpg";<br />
...<br />
...<br />
Response.Write(@"<td><img src='" + sImage + "'></td>");<br />
|
|
|
|
|
|
Semartens!!
I want to vote your answer..How can i do that?
|
|
|
|
|
When you view my response, click at one of the numbers at the bottom right side of the message (labeled with "Rate this message") (1 is bad, 5 is good)
Thanks for voting This will mark your message as answered.
Regards
Sebastian
|
|
|
|
|
hello,
i'm dealing with a primitive http server that doesn't support client-side javascript.
my question is why does it have to support it? i am using internet explorer browser,
the browser does support js. why does the server have to support client-side javascript?
thank you,
|
|
|
|
|
Makes no sense. You mean your web server dont process client scripts. Javascripts are totally processed by the client.
The thing that you have to do, is just to download the js file to the client. Check the extensions associated with the web server.
Also if possible, let us know which server you are using?
|
|
|
|