Jump to content

manamino

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

manamino's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi, I have a problem, I have the below code where the table and href shold be inside javascript using document.write if I put onclick="..." inside the <a > It's not working and I have eror on page after clicking what is the problem? [!--coloro:#009900--][span style=\"color:#009900\"][!--/coloro--]<html> <head> <script language="JavaScript"> function submitting(forum) { document.write(forum) //this is only a test } function loading() { var xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async="false"; xmlDoc.load("forums.xml"); var doc=xmlDoc.documentElement; for(var i=0; i<doc.childNodes.length; i++) display(doc.childNodes(i)); } function display(cat) { document.write('<a name="top"></a><TABLE cellspacing="1" width="100%" bgcolor="#99ccff" border="2" ><TR><TH bgcolor="#ffff99" COLSPAN="3" ALIGN="LEFT">'+cat.getAttribute("NAME")+'</TH></TR>'); document.write('<TR bgcolor="#33cccc" ><TD width="80%">Forum</TD><TD width="10%">Topics</TD><TD width="10%">Replies</TD></TR>'); for(var j=0;j<cat.childNodes.length;j++) {var node=cat.childNodes(j); document.write('<TR><TD><a href="#top" onclick="submitting(\''+node.childNodes(0).firstChild.text+'\')">'+node.childNodes(0).firstChild.text+'</a><br><FONT COLOR="GRAY">'+node.childNodes(1).firstChild.text+'</FONT></TD><TD>'+node.childNodes(2).firstChild.text+'</TD><TD>'+node.childNodes(3).firstChild.text+'</TD></TR>'); } document.write('</TABLE>'); } </script> </head> <body onload="loading()"> <form name='forums' action='posts.php' method='post'> <input type='hidden' name='forum'/> </form> </body> </html>[!--colorc--][/span][!--/colorc--] but if I tried alert instead of submitting it works:
  2. hi, I have a problem to use the css style inside the javascript: I am using style inside my code as follows: [!--coloro:#339999--][span style=\"color:#339999\"][!--/coloro--]<html> <head> <title>LTU Computer Science Forum</title> <style type="text/css"> TABLE,TR,TD { background: transparent; color: #ff00cc; background-color: #000000; } TABLE { width: 100%; } </style> <script language="JavaScript"> function loading() { document.write('<img src="LTULogo.jpg" width="974" height="72"/>'); var xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async="false"; xmlDoc.load("forums.xml"); var doc=xmlDoc.documentElement; for(var i=0; i<doc.childNodes.length; i++) display(doc.childNodes(i)); } function display(cat) { document.write('<TABLE cellspacing="1" ><TR><TH COLSPAN="3">'+cat.getAttribute("NAME")+'</TH></TR>'); document.write('<TR><TD>Forum</TD><TD>Topics</TD><TD>Replies</TD></TR>'); for(var j=0;j<cat.childNodes.length;j++) {var node=cat.childNodes(j); document.write('<TR><TD>'+node.childNodes(0).firstChild.text+'<br>'+node.childNodes(1).firstChild.text+'</TD><TD>'+node.childNodes(2).firstChild.text+'</TD><TD>'+node.childNodes(3).firstChild.text+'</TD></TR>'); } document.write('</TABLE>'); } </script> </head> <body onload="loading()"> </body> </html>[!--colorc--][/span][!--/colorc--] since I'm using xml Dom so I'm obliged to put the table inside the javascript, this thing makes the style not working for the table Does any body know why and how to make it working?
  3. I faced the following error while trying to send an email using php: my php file is as follows: <?php $to=$_POST["email"]; $password=$_POST["password"]; $login=$_POST["login"]; $msg="Your login and password are as follows: login Id:".$login." Password:" .$password; $from = "From: xxx@xxx.xxx<br>"; if( mail ( $to, "login information", $msg, $from )) { echo "Your password was successfully sent to you<br>"; } else echo "Could not sent you an email with there password!"; ?> the error is as follows: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Program Files\Apache Group\Apache2\htdocs\xml forum project\password.php on line 9 As I find I should have a local mail server on my laptop to do that: I downloaded a mail server called: Argosoft mail server and it is installed on my computer what should I do to make it work what changes should I do to my php.ini file please help!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.