|
Could you use:
<table width="100%" height="100%" bgcolor="red">
It works under IE6. Otherwise try this article[^]
Regards
Andy
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message".
|
|
|
|
|
Thanks, the article was extremely useful.
|
|
|
|
|
|
hi,
i have an asp page which display numbers from database,in the database its display properly for example ,
123,234,111,222
but when i call it from asp page it display like that
123234111222
this is a very confusing display.
i try the following solution.
<br />
Response.Write formatnumber("" & rs2.Fields(i) &"",""3"") "<Th align=""center""><FONT FACE=""ARIAL"" SIZE=""1"" color=""#800000""></FONT></Th>"
its giving me the following error:
Error Type:
Microsoft VBScript compilation (0x800A03EE)
Expected ')'
/allpage.asp, line 126, column 53
Response.Write formatnumber("" & rs2.Fields(i) &"",""3"") ""
----------------------------------------------------^
2> i also try formatcurrency
3> and with format its giving another error,not recognising
any help would be greatly appreciate
thanks
|
|
|
|
|
I'm not surprised you're getting an error - what's with all the ""'s....?
Try just
Response.Write formatnumber( rs2.Fields(i) ,3)
(and drop the <th...etc to the next line....)
|
|
|
|
|
Hi all, I'm gonna come to my question quickly as it has quite a lengthy code.
I'm using JavaScript in an XSL file that is used to transform any XML file into a form that is generally shown in IE. The only difference I'm trying to make is to make all nodes collapsed when the documents gets loaded.
<code><!--
|
| XSLT REC Compliant Version of IE5 Default Stylesheet
|
| Original version by Jonathan Marsh (jmarsh@microsoft.com)
| http://msdn.microsoft.com/xml/samples/defaultss/defaultss.xsl
|
| Conversion to XSLT 1.0 REC Syntax by Steve Muench (smuench@oracle.com)
|
+-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="no" method="html"/>
<xsl:template match="/">
<HTML>
<HEAD>
<SCRIPT>
var xmlDoc;
<xsl:comment><![CDATA[
function f(e){
alert('hi F(e)');
if (e.className=="ci") {
if (e.children(0).innerText.indexOf("\n")>0) fix(e,"cb");
}
if (e.className=="di") {
if (e.children(0).innerText.indexOf("\n")>0) fix(e,"db");
} e.id="";
}
function fix(e,cl){
alert('hi Fix');
e.className=cl;
e.style.display="block";
j=e.parentElement.children(0);
j.className="c";
k=j.children(0);
k.style.visibility="visible";
k.href="#";
}
function ch(e) {
alert('hi Ch');
mark=e.children(0).children(0);
if (mark.innerText=="+") {
mark.innerText="-";
for (var i=1;i<e.children.length;i++) {
e.children(i).style.display="block";
}
}
else if (mark.innerText=="-") {
mark.innerText="+";
for (var i=1;i<e.children.length;i++) {
e.children(i).style.display="none";
}
}
}
function ch2(e) {
alert('hi Ch2');
mark=e.children(0).children(0);
contents=e.children(1);
if (mark.innerText=="+") {
mark.innerText="-";
if (contents.className=="db"||contents.className=="cb") {
contents.style.display="block";
}
else {
contents.style.display="inline";
}
}
else if (mark.innerText=="-") {
mark.innerText="+";
contents.style.display="none";
}
}
function cl() {
alert('hi CL');
e=window.event.srcElement;
if (e.className!="c") {
e=e.parentElement;
if (e.className!="c") {
return;
}
}
e=e.parentElement;
if (e.className=="e") {
ch(e);
}
if (e.className=="k") {
ch2(e);
}
}
function ex(){alert('hi ex');}
function h(){alert('hi H'); window.status=" ";}
function collapseAll()
{
alert('collapse all function called');
var mark;
mark = document.getElementById('node_anchor');
//m=mark.children(0).children(0);
//mark.innerHtml="+";
//for (var i=1;i<e.children.length;i++) {
// e.children(i).style.display="none";
//}
}
document.onclick=cl;
document.onLoad = collapseAll();
]]>
</xsl:comment>
</SCRIPT>
<STYLE>
BODY {font:x-small 'Verdana'; margin-right:1.5em}
.c {cursor:hand}
.b {color:red; font-family:'Courier New'; font-weight:bold;
text-decoration:none}
.e {margin-left:1em; text-indent:-1em; margin-right:1em}
.k {margin-left:1em; text-indent:-1em; margin-right:1em}
.t {color:#990000}
.xt {color:#990099}
.ns {color:red}
.dt {color:green}
.m {color:blue}
.tx {font-weight:bold}
.db {text-indent:0px; margin-left:1em; margin-top:0px;
margin-bottom:0px;padding-left:.3em;
border-left:1px solid #CCCCCC; font:small Courier}
.di {font:small Courier}
.d {color:blue}
.pi {color:blue}
.cb {text-indent:0px; margin-left:1em; margin-top:0px;
margin-bottom:0px;padding-left:.3em; font:small Courier;
color:#888888}
.ci {font:small Courier; color:#888888}
PRE {margin:0px; display:inline}
</STYLE>
</HEAD>
<BODY class="st">
<xsl:apply-templates/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="processing-instruction()">
<DIV class="e">
<SPAN class="b">
<xsl:call-template name="entity-ref">
<xsl:with-param name="name">nbsp</xsl:with-param>
</xsl:call-template>
</SPAN>
<SPAN class="m">
<xsl:text><?</xsl:text>
</SPAN>
<SPAN class="pi">
<xsl:value-of select="name(.)"/>
<xsl:value-of select="."/>
</SPAN>
<SPAN class="m">
<xsl:text>?></xsl:text>
</SPAN>
</DIV>
</xsl:template>
<xsl:template match="processing-instruction('xml')">
<DIV class="e">
<SPAN class="b">
<xsl:call-template name="entity-ref">
<xsl:with-param name="name">nbsp</xsl:with-param>
</xsl:call-template>
</SPAN>
<SPAN class="m">
<xsl:text><?</xsl:text>
</SPAN>
<SPAN class="pi">
<xsl:text>xml </xsl:text>
<xsl:for-each select="@*">
<xsl:value-of select="name(.)"/>
<xsl:text>="</xsl:text>
<xsl:value-of select="."/>
<xsl:text>" </xsl:text>
</xsl:for-each>
</SPAN>
<SPAN class="m">
<xsl:text>?></xsl:text>
</SPAN>
</DIV>
</xsl:template>
<xsl:template match="@*">
<SPAN>
<xsl:attribute name="class">
<xsl:if test="xsl:*/@*">
<xsl:text>x</xsl:text>
</xsl:if>
<xsl:text>t</xsl:text>
</xsl:attribute>
<xsl:value-of select="name(.)"/>
</SPAN>
<SPAN class="m">="</SPAN>
<B>
<xsl:value-of select="."/>
</B>
<SPAN class="m">"</SPAN>
</xsl:template>
<xsl:template match="text()">
<DIV class="e">
<SPAN class="b"> </SPAN>
<SPAN class="tx">
<xsl:value-of select="."/>
</SPAN>
</DIV>
</xsl:template>
<xsl:template match="comment()">
<DIV class="k">
<SPAN>
<A STYLE="visibility:hidden" class="b" onclick="return false" onfocus="h()">-</A>
<SPAN class="m">
<xsl:text><!--</xsl:text>
</SPAN>
</SPAN>
<SPAN class="ci" id="clean">
<PRE>
<xsl:value-of select="."/>
</PRE>
</SPAN>
<SPAN class="b">
<xsl:call-template name="entity-ref">
<xsl:with-param name="name">nbsp</xsl:with-param>
</xsl:call-template>
</SPAN>
<SPAN class="m">
<xsl:text>--></xsl:text>
</SPAN>
<SCRIPT>f(clean);</SCRIPT>
</DIV>
</xsl:template>
<xsl:template match="*">
<DIV class="e">
<DIV STYLE="margin-left:1em;text-indent:-2em">
<SPAN class="b">
<xsl:call-template name="entity-ref">
<xsl:with-param name="name">nbsp</xsl:with-param>
</xsl:call-template>
</SPAN>
<SPAN class="m"><</SPAN>
<SPAN>
<xsl:attribute name="class">
<xsl:if test="xsl:*">
<xsl:text>x</xsl:text>
</xsl:if>
<xsl:text>t</xsl:text>
</xsl:attribute>
<xsl:value-of select="name(.)"/>
<xsl:if test="@*">
<xsl:text> </xsl:text>
</xsl:if>
</SPAN>
<xsl:apply-templates select="@*"/>
<SPAN class="m">
<xsl:text>/></xsl:text>
</SPAN>
</DIV>
</DIV>
</xsl:template>
<xsl:template match="*[node()]">
<DIV class="e" id="div_super">
<DIV class="c" id="node_shape">
<A class="b" href="#" id="node_anchor" onclick="return false" onfocus="h()">-</A>
<SPAN class="m"><</SPAN>
<SPAN>
<xsl:attribute name="class">
<xsl:if test="xsl:*">
<xsl:text>x</xsl:text>
</xsl:if>
<xsl:text>t</xsl:text>
</xsl:attribute>
<xsl:value-of select="name(.)"/>
<xsl:if test="@*">
<xsl:text> </xsl:text>
</xsl:if>
</SPAN>
<xsl:apply-templates select="@*"/>
<SPAN class="m">
<xsl:text>></xsl:text>
</SPAN>
</DIV>
<DIV>
<xsl:apply-templates/>
<DIV>
<SPAN class="b">
<xsl:call-template name="entity-ref">
<xsl:with-param name="name">nbsp</xsl:with-param>
</xsl:call-template>
</SPAN>
<SPAN class="m">
<xsl:text></</xsl:text>
</SPAN>
<SPAN>
<xsl:attribute name="class">
<xsl:if test="xsl:*">
<xsl:text>x</xsl:text>
</xsl:if>
<xsl:text>t</xsl:text>
</xsl:attribute>
<xsl:value-of select="name(.)"/>
</SPAN>
<SPAN class="m">
<xsl:text>></xsl:text>
</SPAN>
</DIV>
</DIV>
</DIV>
</xsl:template>
<xsl:template match="*[text() and not (comment() or processing-instruction())]">
<DIV class="e">
<DIV STYLE="margin-left:1em;text-indent:-2em">
<SPAN class="b">
<xsl:call-template name="entity-ref">
<xsl:with-param name="name">nbsp</xsl:with-param>
</xsl:call-template>
</SPAN>
<SPAN class="m">
<xsl:text><</xsl:text>
</SPAN>
<SPAN>
<xsl:attribute name="class">
<xsl:if test="xsl:*">
<xsl:text>x</xsl:text>
</xsl:if>
<xsl:text>t</xsl:text>
</xsl:attribute>
<xsl:value-of select="name(.)"/>
<xsl:if test="@*">
<xsl:text> </xsl:text>
</xsl:if>
</SPAN>
<xsl:apply-templates select="@*"/>
<SPAN class="m">
<xsl:text>></xsl:text>
</SPAN>
<SPAN class="tx">
<xsl:value-of select="."/>
</SPAN>
<SPAN class="m"></</SPAN>
<SPAN>
<xsl:attribute name="class">
<xsl:if test="xsl:*">
<xsl:text>x</xsl:text>
</xsl:if>
<xsl:text>t</xsl:text>
</xsl:attribute>
<xsl:value-of select="name(.)"/>
</SPAN>
<SPAN class="m">
<xsl:text>></xsl:text>
</SPAN>
</DIV>
</DIV>
</xsl:template>
<xsl:template match="*[*]" priority="20">
<DIV class="e">
<DIV STYLE="margin-left:1em;text-indent:-2em" class="c">
<A class="b" href="#" onclick="return false" onfocus="h()">-</A>
<SPAN class="m"><</SPAN>
<SPAN>
<xsl:attribute name="class">
<xsl:if test="xsl:*">
<xsl:text>x</xsl:text>
</xsl:if>
<xsl:text>t</xsl:text>
</xsl:attribute>
<xsl:value-of select="name(.)"/>
<xsl:if test="@*">
<xsl:text> </xsl:text>
</xsl:if>
</SPAN>
<xsl:apply-templates select="@*"/>
<SPAN class="m">
<xsl:text>></xsl:text>
</SPAN>
</DIV>
<DIV>
<xsl:apply-templates/>
<DIV>
<SPAN class="b">
<xsl:call-template name="entity-ref">
<xsl:with-param name="name">nbsp</xsl:with-param>
</xsl:call-template>
</SPAN>
<SPAN class="m">
<xsl:text></</xsl:text>
</SPAN>
<SPAN>
<xsl:attribute name="class">
<xsl:if test="xsl:*">
<xsl:text>x</xsl:text>
</xsl:if>
<xsl:text>t</xsl:text>
</xsl:attribute>
<xsl:value-of select="name(.)"/>
</SPAN>
<SPAN class="m">
<xsl:text>></xsl:text>
</SPAN>
</DIV>
</DIV>
</DIV>
</xsl:template>
<xsl:template name="entity-ref">
<xsl:param name="name"/>
<xsl:text disable-output-escaping="yes">&</xsl:text>
<xsl:value-of select="$name"/>
<xsl:text>;</xsl:text>
</xsl:template>
</xsl:stylesheet></code>
Now I'm gonna give to you the main code segments so that you dont have too much trouble in it
The place where it creates the divs for making the XML nodes appear like tree nodes is this
<code><xsl:template match="*[node()]">
<DIV class="e" id="div_super">
<DIV class="c" id="node_shape">
<A class="b" href="#" id="node_anchor" onclick="return false" onfocus="h()">-</A>
</code>
I've tried to give it ID's so that I can refer to it in my code as
<code>function collapseAll()
{
alert('collapse all function called');
var mark;
mark = document.getElementById('node_anchor');
//mark=mark.children(0).children(0);
//mark.innerText="+";
//for (var i=1;i<e.children.length;i++) {
// e.children(i).style.display="none";
//}
}
</code>
I've noticed that the ch function gets called when you click on a node with className = "e" and it gets the object as
<code>function ch(e) {
alert('hi Ch');
mark=e.children(0).children(0);
if (mark.innerText=="+") {
mark.innerText="-";
for (var i=1;i<e.children.length;i++) {
e.children(i).style.display="block";
}
}
else if (mark.innerText=="-") {
mark.innerText="+";
for (var i=1;i<e.children.length;i++) {
e.children(i).style.display="none";
}
}
}
function cl() {
alert('hi CL');
e=window.event.srcElement;
if (e.className!="c") {
e=e.parentElement;
if (e.className!="c") {
return;
}
}
e=e.parentElement;
if (e.className=="e") {
ch(e);
}
if (e.className=="k") {
ch2(e);
}
}
document.onclick=cl;
document.onLoad = collapseAll();
</code>
The problem is that when i try to get the object from getelementbyID function it doesnt allow me to change its properties in the same way as it does in the case of onClick Event.
Can u plz tell how I can accomplish this task.
Thank you
Rocky
|
|
|
|
|
An id is unique for a single element in the page. You can't have the same id on all the node elements.
You have to get an element that is outside all the nodes, and loop over the children.
---
single minded; short sighted; long gone;
|
|
|
|
|
i'm done with that now and my XSL has done its job now thankfully. In case if ur interested I can post the XSL code tommorow. OR Should I write a little article on that and its gonna be my first one
|
|
|
|
|
Rocky71 wrote: when i try to get the object from getelementbyID
did you try using getElementByClass ?
|
|
|
|
|
Well I didnt but thank God I made it anyway. if you're interested then I can post the xsl file I made tommmorow here. I just changed the style to
style="display:none" in the child elements that were being made in the XSL and changed the - sign to + which actually creates the effect of a collapsed node.
|
|
|
|
|
Has anybody worked with .NET and connecting to Oracle?
I am attempting to connect to Oracle using .NET 2.0. I used the Data Source=Oracle db, name and password connection string. What are the other connection strings? I seen Integrated used as part of the connection string. There isn't much out there on Oracle and .NET.
Thanks
|
|
|
|
|
|
|
EDIT:
Sorry ! I just found that IE can't handle embedded images.
I'm having problems with HTML printing (from a Visual Basic application using webbrowser automation), in some cases the images on top doesn't print ! It occurs is some pages, but all of them have the same image. I've tried out-process activeX-exe and some other madness, but without success.
If you know a better way to print html documents please help.
Thanks.
-- modified at 14:02 Tuesday 14th August, 2007
|
|
|
|
|
I would like to prevent the user's browser from ever storing and filling in the password automatically on the site that I'm developing, regardless of their browser settings.
Is there a straightforward way of doing this?
-----G
|
|
|
|
|
autocomplete=off
for either the form control or the textbox.
|
|
|
|
|
|
hi,
Can somebody please guide me for Implementing FLVPlayer compatible with c#.net 2.0
actually i've to allow users to upload their video files in any valid video file format and then play that file using FLVPlayer.
I need to implement this thing in c#.net 2.0
Its quite urgent.
Thanks,
Harry
|
|
|
|
|
hi,
can somebody pls. guide me how to implement yahoo map in my website using c#.net.
actually i've to implement thailand map. i've searched google maps also but the problem with google map is that it shows location in thai language whereas i need in english lang.
can anybody tell me how to convert locations mentioned on thailand google map in english language or the process to implement the yaho maps in my c#.net website.
Its really urgent .
Thanks,
Harry
|
|
|
|
|
i'm new in flash so i have a very small question
inside my flash page, i have a menu button "home" which i want to refer it to a html page, i tried the linkage option but it doesn't work
thanks and best regards
bachir
|
|
|
|
|
This is the code for the first gridview,when the page open it should display the names of all the project members,
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack = False Then
'txtProjectManager.Text = Session("ProjectManager")
Dim obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet
Dim ds As New Data.DataSet
ds = obj.GetProjectMembers1
GridView2.DataSource = ds
GridView2.DataBind()
End If
End Sub
This is the code foe the btn
when I click the button inside the gridview it must show,the second gridview for each row
Private Sub Button1_Click(ByVal o As Object, ByVal e As EventArgs)
Dim Button1 As Button = DirectCast(o, Button)
Dim grdRow As GridViewRow = DirectCast(Button1.Parent.Parent, GridViewRow)
Dim strField1 As String = grdRow.Cells(0).Text
Dim strField2 As String = grdRow.Cells(0).Text
End Sub
This is the code for the second grid view
Protected Sub GridView2_SelectedIndexChanging(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView2.SelectedIndexChanged
Dim gv As GridView = CType(sender, GridView)
Dim ds As New Data.DataSet
Dim obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet
ds = obj.GetTimeSheet(gv.SelectedValue.ToString())
obj = Nothing
GridView1.DataSource = ds
GridView1.DataBind()
End Sub
When I click the btn,it only postback,doesn’t display the second gridview,what might be the problem?
|
|
|
|
|
Hi all,
I want to make a framework for developing ASP.NET and i see Spring.Net. But i think Spring.Net is not good. Because it has too much configs.
If you know a framework that can be used for developing ASP.NET, please let me know.
Thanks
|
|
|
|
|
ctlqt12 wrote: But i think Spring.Net is not good. Because it has too much configs.
you think a framework is no good because it's too configurable ?
ASP.NET is itself a framework for writing web apps, why do you need something that sits on top of that ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi all,
Spring.Net is not only too configurable but also it doesn't really have the structure of files for validation, database, ....
Why i need something that sits on top of that?
Because when i use ASP.Net framework, I don't have good structure of files and interacting between files
Example :
+ Validation
+ Transaction
+ Database
......
So i need a framework that already has structure of files and when i write a file, i know where i put it.
|
|
|
|
|
Maybe instead of asp.net you should be using sharepoint if you are doing lots of stuff with files.
Ben
|
|
|
|