Jump to content

stockton

Members
  • Posts

    319
  • Joined

  • Last visited

    Never

Everything posted by stockton

  1. I, in desperation, altered it to <a href="/help.php"><button>Back</a> which works fine.
  2. The help.php looks like <!-- Put IE into quirks mode --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Sharing: HelpPage</title> <link rel="stylesheet" type="text/css" href="CSS/Help.css" /> <link rel="stylesheet" href="/CSS/custom-theme/jquery-ui-1.7.1.custom.css"/> <link rel="stylesheet" href="/CSS/SiteWide.css"/> <link rel="stylesheet" href="/CSS/jquery.treeview.css" type="text/css" media="screen" /> <script type="text/javascript" src="/JavaScripts/DWjQuery.js"></script> <script type="text/javascript" src="/JavaScripts/CL/ComponentLoader.js"></script> <script type="text/javascript" src="/JavaScripts/jquery.treeview.js"></script> <script type="text/javascript"> $(document).ready( function() { //load the standard headers. $("#header").LoadComponent("/dwexec/Styles/Headers/StandardHeaderInit.php"); $("#message-paragraph").load('/DefaultFile.html'); $("#browser").treeview(); $("#browser").treeview({ add: branches }); }); function ItemSelected(File) { $.ajax({ url: "HelpBody.php", data: "WhichOne="+File, cache: false, success: function(htmldata){ $("#message-paragraph").html(htmldata); } }); } </script> <!-- <style> .HelpOption{ cursor:pointer; } </style> --> </head> <body bgcolor="#eeeeee"> <div id="container"> <table width=100% border=0> <tr> <td><div class="ui-widget-header ui-corner-top"> Help Pages</div></td> </tr> <tr valign="top" align="left"> <td width=15% valign=top align=left class="rightborder"> <ul id="browser" class="filetree"><li class="closed"><span class="folder">FAQ</span><ul><li><span class="file" onClick=ItemSelected("2")>Grid</span></li><li><span class="file" onClick=ItemSelected("3")>NodeListEditor</span></li></ul></li><ul id="browser" class="filetree"><li class="closed"><span class="folder">AnotherTest</span><ul></ul></li> <button id="add" onclick="window.location.href='HelpAdd.php';">Administration</button> </td> <td width=85% rowspan=2 valign=top> <p id="message-paragraph"> Welcome to the help page. Please select a topic & a subject on the left to get additional help. </p> </td> </tr> </table> <br /> </div> <div id="header"> loading... </div> </body> </html> and as you can see it uses <button id="add" onclick="window.location.href='HelpAdd.php';">Administration</button> to call the 1st program above, the one I am having a problem with. This one works fine.
  3. In one of my programs I have a button which when clicked calls another php correctly but not in the following code. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Add help parent</title> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="Mon, 22 Jul 2000 11:12:01 GMT" <!-- Put IE into quirks mode --> <title>Sharing: HelpPage</title> <link rel="stylesheet" type="text/css" href="CSS/Help.css" /> <link rel="stylesheet" href="/CSS/custom-theme/jquery-ui-1.7.1.custom.css"/> <link rel="stylesheet" href="/CSS/SiteWide.css"/> <script type="text/javascript" src="/JavaScripts/DWjQuery.js"></script> <script type="text/javascript" src="/JavaScripts/CL/ComponentLoader.js"></script> </head> <center> <h2>Help Administration</h2><br> <form name='HelpAdd' action='HelpAdd.php' method=post enctype="multipart/form-data"> <table align="center" border="3" cellspacing="0" cellpadding="3"> <tr><td>Record Type:</td>'; <td><select name="RecordType"> <option value='0'>Parent</option> <option value='1'>Dependant</option><br/> <tr><td>Topic Title:</td> <td><input type="text" name="TopicName" ID="TopicName" maxlength="25"></td></tr> <tr><td>Parent:</td> <td><select name="Parent"> <option value=1>FAQ</option><option value=9>AnotherTest</option></td></tr> <tr><td>Topic Body:</td> <td><input name="helpfile" type="file" /></td></tr> <tr><td colspan="2" align="center"> <input type="submit" name="submit" value="Submit"> <button onClick="parent.location='help.php';">Back</button> <!-- <button onclick="window.location.href='help.php';">Back</button> --> </td></tr> </table> </form> </center> </body> </html> Clicking on the button in the above just reloads the current page. This no matter if I use I use <button onClick="parent.location='help.php';">Back</button> or <button onclick="window.location.href='help.php';">Back</button> Why? Either should call help.php
  4. The repair I effected was to place <!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .body { zoom: 1; padding-top: 15px; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> immediately before the </head>
  5. The following code works fine in Windows Firefox but only the image displays if in IE. None of the top of the screen appears. <?php $DBUsername = "???"; $DBPassword = "?????"; $DBName = "???"; $conn=OCILogon($DBUsername,$DBPassword,$DBName); $MemberNumber = (isset($_REQUEST['mnumber'])) ? $_REQUEST['mnumber'] : ''; if ($MemberNumber == "") { $FullName="Invalid member number!"; copy ("noface.jpg", "image.jpg"); } else { $SQL2="SELECT MEM_SNAME, MEM_FNAME, MEM_TITLE, i.IMAGEDATA FROM MEMBERS, IMAGESTORE i WHERE MEM_FACE = i.id and MEM_NUMBER=$MemberNumber"; $stmt=OCIParse($conn,$SQL2); OCIExecute($stmt); $Count = 0; while ($row=oci_fetch_array($stmt, OCI_ASSOC)) { $Surname = $row['MEM_SNAME']; $FirstName = $row['MEM_FNAME']; $Title = $row['MEM_TITLE']; $Face = $row['IMAGEDATA']; ++$Count; } if ($Count == 0) $FullName="Invalid member number!"; else $FullName=$Title." ".$FirstName." ".$Surname; $fr = fopen("image.jpg", 'w'); fputs($fr, $Face); fclose($fr); OCICommit($conn); OCIFreeStatement($stmt); OCILogoff($conn); } ?> <html> <head> <title>Display Member</title> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="Mon, 22 Jul 2000 11:12:01 GMT"> <link rel="stylesheet" type="text/css" href="style/style.css"> </head> <body> <center> <H1>Display Member Images.</H1> <br/><br/> </center> <form name="dm" id="dm" method="post" action="OracleBlob.php"> <center> <font color="white"> Member Number: <input type="text" name="mnumber" /><br/><br/> Member Name: <?php echo $FullName ?></font> <center> <INPUT TYPE="submit" name="submit" value="submit"> </center> <br/><br/> <img src="image.jpg" border=0/> </form> </center> </body> </html> Please tell me why Microsoft is discriminating against me.
  6. My application currently displays a table in the center of the screen. My client now wants me to display an image on one side of that table and a comment on the other and as the mentioned table only takes up +/- 1/3 of the width there is space. How do I do this? Would a table within a table be the preferred method?
  7. Not sure if I should post this here or in HTML, so if I have done wrong please forgive. The following program gives the following error when run. Undefined index: mnumber in D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\DisplayMember\DisplayImage\OracleBlob.php on line 7 the program:- <?php $SGMDBUsername = "sgm"; $SGMDBPassword = "s7000"; $SGMDBName = "s7s"; $conn=OCILogon($SGMDBUsername,$SGMDBPassword,$SGMDBName); $MemberNumber = $_REQUEST['mnumber']; $SQL2="SELECT MEM_SNAME, MEM_FNAME, MEM_TITLE, i.IMAGEDATA FROM MEMBERS, IMAGESTORE i WHERE MEM_FACE = i.id and MEM_NUMBER=$MemberNumber"; $stmt=OCIParse($conn,$SQL2); OCIExecute($stmt); $Count = 0; while ($row=oci_fetch_array($stmt, OCI_ASSOC)) { $Surname = $row['MEM_SNAME']; $FirstName = $row['MEM_FNAME']; $Title = $row['MEM_TITLE']; $Face = $row['IMAGEDATE']; ++$Count; } if ($Count == 0) $FullName="Invalid member number!"; else $FullName=$Title." ".$FirstName." ".$Surname; $fr = fopen("image.jpg", 'w'); fputs($fr, $Face); fclose($fr); OCICommit($conn); OCIFreeStatement($stmt); OCILogoff($conn); ?> <html> <head> <title>Display Member</title> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="Mon, 22 Jul 2000 11:12:01 GMT"> <link rel="stylesheet" type="text/css" href="style/style.css"> </head> <body> <center> <H1>Display Member Images.</H1> <br/><br/> </center> <form name="dm" id="dm" method="post" action="<?php $_SESSION['PHP_SELF']?>"> <center> <font color="white"> Member Number: <input type="text" name="mnumber" /><br/><br/> Member Name: <?php echo $FullName ?></font> <input type="submit" value="submit" /> <br/><br/> <img src="image.jpg" border=0/> </form> </center> </body> </html> and as I said before, I am not sure if my error is in the html or the php. Please help.
  8. Thank you. I did your suggested style="border:0;background:none;" and it now does what I want.
  9. Thank you guys. I have now got it working like I want.
  10. Thank you for your suggestions and I have implemented them, however it still does not do what I want.
  11. I am attempting to use jquery/ajax to populate a web page with the following code. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title> Skeleton </title> <link rel="stylesheet" type="text/css" href="style/lines.css" /> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript"> // JavaScript code here function ItemSelected(File) { alert (File); $(document).ready(function() { $('#mybutton').click(function() { $('#message-paragraph').load(File); }); }); } </script> </head> <body bgcolor="#eeeeee"> <table width=100% border=0> <tr align=center> <td colspan=3> <h1> Help Pages <p></h1> </td> </tr> <tr valign="top" align="left"> <td width=15% valign=top align=left class="rightborder"> <input type="submit" id=Grid value="Grid" onClick=ItemSelected("help-files/Grid.htm")><input type="submit" id=NodeListEditor value="NodeListEditor" onClick=ItemSelected("help-files/NodeListEditor.htm")></td> <td width=85% valign=top> <p id="message-paragraph"> Here is the body of the help file</p> </td> </tr> </table> <br /> <center> <p>The page tail contents goes here if it is required</p> </center> </body> </html> Everything seems to work, including the alert in the script showing the correct file name, however I am failing to get message-paragraph populated with the contents of that file. Before someone asks, yes the required files do exist in the correct folder. Please tell me what I missed.
  12. Please tell me how to remove the box/border from a field defined as:- <input type="submit" id=Grid value="Grid" onClick=ItemSelected("help-files/Grid.htm")> You can if you wish see the page at http://www.stockton.co.za/khulisa-help/help.php
  13. Thank you for your reply and I did not really understand the original solution, getting old I suppose.
  14. Thank you for your reply but that does not explain why the image is displaying in the manner that it is.
  15. In the following code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <head> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script language="javascript" type="text/javascript"> (document.getElementById) ? dom = true : dom = false; //select ie mozilla function hideIt() { if (dom) {document.getElementById("layer1").style.visibility='hidden';} //ie if (document.layers) {document.layers["layer1"].visibility='hide';} //mozilla } function showIt(image) { $(document).ready(function() { $('#bigimage').load(image); }); if (dom) {document.getElementById("layer1").style.visibility='visible'; document.getElementByID('bigimage').src=image;} if (document.layers) {document.layers["layer1"].visibility='show'; document.getElementByID('bigimage').src=image;} } onResize="window.location.href = window.location.href"; </script> </head> <body> <img src='images/dogs/PB030060A_thumb.JPG' onClick="showIt('images/dogs/PB030060A.JPG');"> <img src='images/dogs/P4220081B_thumb.JPG' onClick="showIt('images/dogs/P4220081B.JPG');"> <img src='images/dogs/P4220084B_thumb.JPG' onClick="showIt('images/dogs/P4220084B.JPG');"> <img src='images/dogs/P6050086A_thumb.JPG' onClick="showIt('images/dogs/P6050086A.JPG');"> <div id="layer1" style="position:fixed; left:20px; width:65%; top:20px; visibility:hidden;"> <img id='bigimage' src='blank.jpg' onClick="hideIt();" alt='Click to close this image'> </div> </body> </html> I get the bigimage image contents(?hex?) to dispay rather than the image itself. This can be seen at http://www.stockton.co.za/prince1.shtml and click on a thumbnail. Please tell me how I got this wrong.
  16. That was done some time back and php_mssql is active as it can be accessed from other machines on my intranet. Just not from the same machine.
  17. I have tried localhost & 127.0.0.1 & 192.168.1.10 and all of them give the same answer, failing to connect.
  18. I have a connection script <?php function DBConnect() { global $dbservertype, $servername, $dbusername, $dbpassword, $dbname, $link; $link = mssql_connect($servername, $dbusername, $dbpassword) or die("Unable to connect to T4T database at $servername, UID=$dbusername, UPASS=$dbpassword"); if (!(mssql_select_db($dbname, $link))) { echo "Error in DBConnect() = " . mssql_get_last_message(); sprintf($Message, "At %d in %s Could not select %s at %s as %s",__LINE__, __FILE__, $dbname, $servername, $dbusername); trigger_error(E_USER_ERROR, $Message); exit; } return $link; } ?> that fails connecting with the following message Unable to connect to T4T database at localhost, UID=sa, UPASS=sa Please suggest where I may look to resolve this issue.
  19. SELECT ColumnData FROM MyTable WHERE STARTDATE >= TRUNC(current_date) AND NVL(ENDATE, current_date+1) >= TRUNC(current_date); seems to work for me.
  20. I need to build an Oracle sql string where I need to check that if a datetime column is not blank its value must be greater than current_date and I am failing. SELECT ColumnData FROM MyTable WHERE STARTDATE > current_date AND (ENDDATE !="" and ENDATE > current_date) Please tell me how I should do this.
  21. It is not a matter of clicking Update & then clicking Back. User either clicks Back or Update.
  22. Yes it does. On on the other hand clicking the Back button should take them straight back to where they came from, the menu.
  23. Yesterday I watched a user click the Back button only to end up getting the database updated. Just as if they had clicked the Update button. I checked the database before the click of the Back button & after and the record had been altered.
×
×
  • 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.