Jump to content

ameliabob

Members
  • Content count

    197
  • Joined

  • Last visited

Community Reputation

2 Neutral

About ameliabob

  • Rank
    Member
  1. ameliabob

    DELETE FROM

    I am trying to execute the following code $qry = "DELETE FROM holdings WHERE 'rowId' = '".$row."'"; echo("alertAhead of delete. ".$qry); $result= mysqli_query($cxn,$qry)or die("FinishExit Delete failed. ".mysqli_error($cxn)." *** Qry was ".$qry); the $qry variable when filled out is DELETE FROM holdings WHERE 'rowId' = '9' but the row is still in the database when I look at it with phpAdmin and the die was not executed. If I run a query "select from holdings where rowId = '9' it is still there. I have tried using a fictitious name in the delete and the die does work for that Where should I look from here?
  2. ameliabob

    Error #1114 - The table 'closed' is full

    OK I understand. But where do I find the mysql config file?
  3. ameliabob

    Error #1114 - The table 'closed' is full

    I received the error code " #1114 - The table 'closed' is full " from phpmysql after adding a structure and then I think I closed the table. When I go back and try to extend the table by adding more columns I get this error. I have tried adding the columns by either using the phpmysql structure and by using the SQL command 'ALTER TABLE closed ADD daysHeld int' they both give me the table full. I have only added one row into the table. Is the only answer to delete and start over??
  4. ameliabob

    onclick not working

    The whole function looks like this [code} $qry= "select * from holdings where 'pl' is not null order by 'symbol'ASC"; $result = mysqli_query($cxn,$qry) or die("ShowExit didn't work. ".mysqli_error($cxn)); if(mysqli_num_rows($result)==0){ $s = "alertThere are no entries in the database that meet your criteria. Try changing the search."; }else{ $s = "resp <table id='t01' border='1' >"; $s .= "<tr><th>Type</th><th>Symbol</th><th>Expire Month</th><th>Qty</th>"; $s .= "</tr>"; while($r=mysqli_fetch_array($result)){ $s .= "<td>".$r[nature]."</td>"; $s .= "<td"; $s .= " onclick=\"GetFinishedData('9')\" > "; $s .= $r[symbol]."</td>"; if($r[nature]=="O") $s .= "<td><center>".$r[expireMonth]."</td>"; else $s .= "<td><center>n/a</td>"; $s .= "<td>".$r[qty]."</td>"; $s .= "</tr>"; } $s .= "</table>"; echo($s); [/code]
  5. ameliabob

    onclick not working

    OK I tried to simplify the code but still can't get it to work. $s .= "<td"; $s .= " onclick=\"GetFinishedData('9')\" > "; $s .= $r[symbol]."</td>"; When I look at the generated code it looks like it should. Maybe I have run out of little grey cells.
  6. ameliabob

    onclick not working

    Would you mind modifying whichever string to fix this? Thanks
  7. ameliabob

    onclick not working

    I am building a table at a server and returning it to the user I have tried putting the $p where it is as shown. I have also tried it in the first <td $s =" <td ".$p.">><input type='radio' name='entry' ></td>"; It does not seem to get to GetFinishData(). Any thoughts or how can I get whatever failure to show up somewhere? $p = "onclick=\"GetFinishData('".$r[rowId]."')\""; $s =" <td>><input type='radio' name='entry' .$p.></td>"; Thanks
  8. ameliabob

    querying Radio buttons

    I am having trouble finding where the attributes for getElementById are located <input id='opt' type='radio' name='kind' value='O'>Options <input id='stk' type='radio' name='kind' value='S'>Stocks How in js do I determine which one of these was chosen? getElementById('stk').value doesn't seem to work when going after the one not chosen. I seem to think there might be "selected" attribute but I can't find it documented anywhere. Thanks
  9. ameliabob

    action_page.php

    Maybe a better way to put the question is to see what the server side looks like that interprets the input from a Submit function
  10. ameliabob

    action_page.php

    In the html examples action_page.php is often referred to but there is no example of what the code itself looks like. I would like to see what that code is/does.
  11. ameliabob

    action_page.php

    Is there a way that I can view the action_page.php so I can see what the server side looks like for a submit button? Also How do I differentiate between multiple submit buttons?
  12. ameliabob

    Missing display

    I am just getting restarted and am having problems finding syntax problems <code> <!DOCTYPE html > <html > <head> <style> body {margin:0;font-family:"Trebuchet MS", "Arial Black", "Verdana", "Helvetica", sans-serif;} #seltype {font:36px} #header {background:blue; color:white; position:absolute; top:0;left:0px;right:0;margin:0;text-align:center;font-family:"Trebuchet MS", "Arial Black", "Verdana", "Helvetica", sans-serif;font-weight:bold; white-space: nowrap;} #header h1, #header p {padding:2px 20px 2px 100px;margin:0} #hdgline {text-align:center; font-size:1.875em;} button {font:24px "Trebuchet MS", "Verdana", sans-serif;background:#F9CC7D;border:outset #F9CC7D} </style> <title>Year to Date P/L</title> </head> <body> <div id="header"> <p><br /></p> <h1 id="hdgline" style="font-size:36px">Year to Date P/L</h1> <p><br /></p> <button onclick='AddTrade()' >Enter Trade</button> <button onclick='ExitTrade()' >Exit Trade</button> <button onclick='ShowPL()' >Show P/L</button> </div> <div id="cond"> <p> <input type="text" name="first" value="me"></br> </p> </div> </body> </html> </code> The input line does not display. The buttons do. What am I missing?? Thanks
  13. ameliabob

    variables within classes

    I am trying to create a class which will concatenate variables but it appears as though each time a function within a class is called the variables are reinitiated. Is there a way that the variables can be held so as to allow them to be added to? The first code box is the calling functions and the second is the class. <?php include ("myClasses.php"); $sTable = new TABLE(); $sTable->setHeading("This is the heading"); $sTable->setHeadingItem("Symbol"); $sTable->setHeadingItem("Name"); $sTable->setDetailItem("F"); $sTable->setDetailItem("Ford"); $sTable->endTable(); echo($sTable->showTable()); ?> myClasses.php <?php class TABLE { private $border; private $hdrStarted = false; private $rowStarted = false; private $numberOfRows=0; private $s; function __construct($border=null){ $s = "<table "; if(is_null($border)) $s .= ">"; else $s .= "border='".$border."'>"; } function setHeading($t){ $s .= "<caption>".$t."</caption>"; echo $s; } function setHeadingItem($t){ if(!$hdrStarted){ $s .= "<tr>"; $hdrStarted = true; } $s .= "<th>".$t."</th>"; } function setDetailItem($t){ if($hdrStarted){ $s .= "</tr>"; $hdrStarted = false; } if(!$rowStarted){ $rowStarted = true; $s .= "<tr>"; } $s .= "<td>".$t."</td>"; } function endTable(){ if($rowStarted || $hdrStarted) $s .= "</tr>"; $s .="</table>"; } function showTable(){ return $s; } } ?>
  14. ameliabob

    Commuication between windows

    It's not AJAX as I have been using that all along.
  15. ameliabob

    Commuication between windows

    I tried to use the first method and I go the message "Permission denied to access property "SendOffRequest". The first code window is the main calling program. The user pushes [ctrl][t] and the second code window is loaded. when one of the buttons is clicked the error message occurs. The highlighted in Bold which calls the BOLD Italics and then the error. [codewindow] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <script type="text/javascript"> var CtrlPushed=false; function CheckKey(e){ var keynum; if(window.event) // IE keynum = e.keyCode; else if(e.which) // Netscape/Firefox/Opera keynum = e.which; if(keynum==17) { // Chceck for Ctrl pushed CtrlPushed = true; // 17 is ctrl } if( CtrlPushed ){ // Only look at these if user has initiated the CTRL sequence switch (keynum){ case 80: // Test for P or case 84: // test for T ptWindow= window.open("http://test.comsum.atflorida.us","ptWindow"); break; } } } function SendOffRequest( whatIsIt){ //alert(whatIsIt); if (window.XMLHttpRequest) { myRequest = new XMLHttpRequest(); } else if (window.ActiveXObject) { myRequest = new ActiveXObject("Microsoft.XMLHTTP"); } if(myRequest){ var url = "comsumProcess.php?function=" + whatIsIt + "&uDate=" +uDate+"&device="+device+ "&userID=" + userID+"&uProfile="+uProfile; lastSentRequest = url; // Save this for any error message url += "&sid=" + Math.random(); myRequest.open("GET", url, true); } // STUFF DELETED HERE AS IT DOESNT'T APPLY </script> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="computer.css" /> <title>Commodity Summary</title> </head> <body onkeydown="CheckKey(event)"> <div id="header"> <p><br /></p> <h1 id="hdgline" style="font-size:36px">Trend Tracker SQL version </h1> <p><br /></p> <div id="hdgbtns" align='center'> </div> </div> <div class="content" id="content"> </div> </body> </html> [/codewindow] SECOND CODEWINDOW [codewindow] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> var s; var userID="prdtst"; var uProfile="WhatIf"; var uDate="2009-09-07"; var uLastAction; var device="computer"; var OFFSET=5; /* function SendOffRequest( whatIsIt){ document.getElementById("function").value=whatIsIt; document.getElementById("submitForm").submit(); } */ function CaseSetup(){ window.opener.SendOffRequest("casesetup"); } function EndSetup(){ window.opener.SendOffRequest("casefinish"); } function DeleteTC(s){ var a = s.split(","); var t = "Confirm that you want to delete Test Case number "+a[1]+" "+" named "+a[2]+"<br>"+a[3]; if (confirm(t)==true) window.opener.SendOffRequest("deleteTC&tcnumber="+a[0]); } function ListCases(){ window.opener.SendOffRequest("listcases"); } function ShowHomeScreen(){ var s = "<button id= 'Button' onclick='CaseSetup()' >Define Testcase</button>"; s += "<button id= 'mainButton' onclick='RunCases()' >Run Testcase(s)</button>"; s += "<button id= 'mainButton' onclick='ListCases()' >List Testcases</button>"; document.getElementById("hdgbtns").innerHTML = s; } function ShowDetails(num){ document.getElementById("num").value = num; SendOffRequest("showdetails"); } function StartSetup(){ var tnumber = ptWindow.document.getElementById("testno").value; var tname = ptWindow.document.getElementById("testname").value; var tdesc = ptWindow.document.getElementById("testdesc").value; var x = ptWindow.document.getElementById("userPtr").selectedIndex; var y = ptWindow.document.getElementById("userPtr").options; // alert("Index: " + y[x].index + " is " + y[x].text); SendOffRequest("startsetup&number="+tnumber+"&name="+tname+"&desc="+tdesc+"&acct="+y[x].text); } </script> <head> <link rel="stylesheet" type="text/css" href="comsumtest.css" /> <title>Test Library</title> </head> <body onload="ShowHomeScreen()"> <div id="header"> <p><br /></p> <h1 id="hdgline" style="font-size:36px">Comsum Test Library </h1> <p><br /></p> <div id="hdgbtns" align='center'> </div> </div> <form id="submitForm" action="testFunctions.php" method="get"> <input id = "function" type="text" name="function" hidden>; <input id = "num" type="text" name="numb" hidden> <div class="content" id="content"> </div> </form> </body> </html> [\codewindow] Now what have I done wrong.
×