|
Take a look at the site http://www.alistapart.com[^]. They have lots and lots of tutorials on this. Plus, consider buying the Eric Meyer books on CSS. They are bibles if you want to work with CSS.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
I am installing SharpForge on my computer.
I am getting error when i went through the intallation wizard.
Error exception details System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Anybody have any idea why I am getting this error?
sdfsdgvfd
|
|
|
|
|
Hi all,
i have a procedure below:
//==============MySQL=======================================
CREATE PROCEDURE `sp_select_customer`(custid int)
begin
select * from customer where customer_id=custid;
end;
//================PHP code=====================================
$con=mysql_connect("localhost","root","root") or die("Connection is fail.");
$db=mysql_select_db("mydatabase",$con);
$result=mysql_query("CALL sp_select_customer(9)");
// it's not working when i use CALL PROCEDURE
$row=mysql_fetch_array($result);
echo $row['0'];
//===============================
Please help me!
Thanks,
Hy Chan Han
|
|
|
|
|
What error are you getting?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Here is error:
=============================
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\itec\select.php on line 8
=============================
It's not working when procedure use select statement.
I use insert statement it's working ok.
Thanks,
Hy ChanHan
|
|
|
|
|
Try to use multi_query instead of mysql_query .
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Error appeared:
Fatal error: Call to undefined function multi_query() in C:\AppServ\www\itec\select.php on line 5
Hy Chanhan
|
|
|
|
|
I have tested in my machine. (Note: I'm using the latest version of PHP and MySQL. )
<?php
$conn = mysql_pconnect( "localhost", "root", "root", 65536 )
or die( "Failed to connect to MySQL server" );
mysql_select_db( "mydatabase", $conn ) or die( "Could not select test database" );
$result = mysql_query( "CALL sp_select_customer(9)" )
or die( mysql_error() );
$rows = mysql_num_rows( $result );
echo "Rows=$rows<br/><br/>";
while($thisrow=mysql_fetch_row($result))
{
$i=0;
while ($i < mysql_num_fields($result))
{
$field_name=mysql_fetch_field($result, $i);
echo $thisrow[$i] . " "; //Display all the fields on one line
$i++;
}
echo "<br>"; //put a break after each database entry
}
?>
Hope it will work in your side too.. Let me know the result..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi,
Thank you very much for your code, now it's working very well in my site.
Hy ChanHan
|
|
|
|
|
Hy Chanhan wrote: Thank you very much for your code, now it's working very well in my site.
If my code is useful for you, please vote my message. thanks.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hello again,
When i refreshed 4 or 5 times i appeared this error message:
why?????
PROCEDURE bbg.sp_select_customer can't return a result set in the given context
Hy ChanHan
|
|
|
|
|
Hy Chanhan wrote: PROCEDURE bbg.sp_select_customer can't return a result set in the given context
I will check again and will let you know..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
seem like i forget to close the connection.. try to add the code for closing connection..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
It's still not working.
Error is the same above.
Hy ChanHan
|
|
|
|
|
hi Guys
Is there any live application to search for code, we have lots n lots of sites to get the source codes, why cant we make a web application with a good search engine to search pure text source code, anything related to code.
For eg. store procedure's, HTML, ASP codes, technical text, code-behind, javascript, java codes,
only pure text should be stored, its should be a very simple application with no links, only to maintain and retrieve, there will be no data editing for the users.
uploading of files are not allowed since many technical websites are providing this feature,
The plan
Here the users can store information taken from the internet(pure text) when he/she visits for reference, later he/she need not come to this same link to take the specific code, instead he/she can search the code in this new Code Manager portal,
the user will have to provide the description of code or technical text and each source code should be allocated under different sets,
for eg. if its HTML code, the language should be set as HTML for this source code
How the search works
A search with different criteria should be given..
based on desciption
based on language
based on date stroed
based on unique words,
base on tags
we should make this application very simple to handle
winnie
winnie
|
|
|
|
|
good mornig!
i have to diasplay table in html in a mail
when we write message="..."
it won't work .
So pls guide what additional is required to have table ina mail.
hope u understood the question pls guide.
thank you.
yogita
|
|
|
|
|
You need to set HTML format to your message object.
mailMsg.BodyFormat = MailFormat.Html
More ~ http://www.codeproject.com/useritems/SendMailSMTPWebConfig.asp
Private Sub SendClick()
Dim mailMsg As New MailMessage
Try
mailMsg.To = "<tomailid>"
mailMsg.From = "<frommailid>"
'mailMsg.BodyFormat = MailFormat.Text 'optional for sending text in body
mailMsg.BodyFormat = MailFormat.Html
mailMsg.Subject = "Statistics Report"
mailMsg.Body = "<html><body><Table><tr><td>Hi,</td></tr><tr><td>Details of the Statistics :</td></tr></Table></body></html><html><body>" & "sometext" & _
"</body></html><html><body><Table><tr><td> </td></tr><tr><td>NOTE: This is an automated mail. Please, do not reply.</td></tr>" & _
"<tr><td>*Green coloured rows indicates temporary demos</td></tr>" & _
"<tr><td>**All statistics are based on the page naming conventions Eg., 22_10_2005_</td></tr>" & _
"<tr><td> </td></tr><tr><td>Regards,</td></tr><tr><td>some text,</td></tr><tr><td>some text,</td></tr>" & _
"<tr><td> Some text </td></tr></table></body></html>"
SmtpMail.SmtpServer = ConfigurationSettings.AppSettings("SmtpServer")
SmtpMail.Send(mailMsg)
'xm.InnerHtml = "Your message has been sent"
Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
People,
I have this silly problem: I want to get the client size of the browser window, to set a table to be this size. I've tried every property of both screen and window DOM objects, I can only retrieve the window position and the screen resolution, or the screen resolution minus the taskbar height.
Anyone have any ideia on how to do this, please?
|
|
|
|
|
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
|
|
|
|