Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Lv 31,744 points

tadds

Favorite Answers47%
Answers220
  • Included html not showing latest version. How can I get the including page to show the updated include.?

    I can get the code to work initially however if I change the text in alert.htm the changes are not reflected in a refreshed version of the outer page. 

    Sample Code:

    Included File (alert.htm):

    <body>

    <div id="alert">

    <p id="text">

    <!-- Start message here -->

    test #3

    <!-- End message here -->

    </p>

    </div>

    </body>

    Including outer html:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona...

    <html xmlns="http://www.w3.org/1999/xhtml%22%3E

    <head>

    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

    <meta http-equiv="CACHE-CONTROL" content="NO-CACHE"/>

    <meta http-equiv="Pragma" content="no-cache"/>

    <meta http-equiv="Expires" content="-1"/>

    <title>Untitled 1</title>

    </head>

    <body>

    <h1>Test Alert</h1>

    <!--webbot bot="Include" TAG="BODY" U-Include="alert.htm" startspan -->

    <script type="text/javascript">

     var tag = document.getElementById("text");

     var length = tag.innerText.length;

     if(length==0) {

      var text = document.getElementById("alert").style.display = "none";

      alert('hidden');

     }

     else {

      alert(length);

     }

    </script>

    </body>

    </html>

    1 AnswerProgramming & Design1 year ago
  • Help with PHP upload file code move_uploaded_file() fails.?

    I have spent much of the day trying to get a simple PHP Upload program to work on my local PC. I cannot seems to figure what is wrong with the code as it keeps falling out with "here was an error uploading the file, please try again!" I am trying to create a simple file upload routine that allows the user to choose the target location. Save this code to a folder that has the following structure below it:

    [localhost]

    Conservation

    Agendas

    Minutes

    ================= CODE ===================

    <?php

    ini_set('display_errors', 1);

    ini_set('log_errors', 1);

    ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

    error_reporting(E_ALL);

    // Save this file to a folder that has two Subfolders of Conservation/Minutes and Conservstion/Agendas

    // Trying to allow saving uploaded files to either of these folders.

    if (!isset($_POST['submit'])) {

    ?>

    <!DOCTYPE html>

    <html>

    <head>

    </head>

    <body>

    <form action="formexample.php" method="post">

    <table>

    <tr>

    <th>First Name:</th>

    <td><input maxlength="36" name="Fname" size="36" type="text"/</td>

    </tr>

    <tr>

    <th>Last Name:</th>

    <td><input maxlength="36" name="Lname" size="36" type="text"/></td>

    </tr>

    <tr>

    <th style="vertical-align:top;">Document Type:</th>

    <td> 

    Agenda:<input name="type" type="radio" value="Agendas" checked="checked"/> 

    Minutes:<input name="type" type="radio" value="Minutes"/>

    </td>

    </tr>

    <tr>

    <th>Board/Committee:</th>

    <td>

    <select name="boardcommittee">

    <option value="Conservation">Conservation Committee</option>

    </select>

    </td>

    </tr>

    <tr>

    <th>File to Upload:</th>

    <td>

    <input type="file" name="uploadedfile"/>

    </td>

    </tr>

    <tr>

    <td style="text-align:center;" colspan="2">

    <input name="submit" type="submit" value="Submit"/>

    </td>

    </tr>

    </table>

    </form>

    <?

    } else {

    // Get form data

    $Fname = $_POST["Fname"];

    $Lname = $_POST["Lname"];

    $type = $_POST["type"];

    $boardcommittee = $_POST["boardcommittee"];

    $file = $_POST["uploadedfile"];

    // Where the file is going to be placed

    $target_path = "/CM_DOCS/".$boardcommittee."/".$type."/";

    /* Add the original filename to our target path.

    Result is "uploads/filename.extension" */

    $target_path = $target_path . $file;

    // Show results

    /**

    * echo "Upload: " . $_FILES["uploadedfile"]["name"] . "<br />";

    * echo "Type: " . $_FILES["uploadedfile"]["type"] . "<br />";

    * echo "Size: " . ($_FILES["uploadedfile"]["size"] / 1024) . " Kb<br />";

    * echo "Temp file: " . $_FILES["uploadedfile"]["tmp_name"] . "<br />";

    * echo "Hello, ".$Fname." ".$Lname.".<br />";

    * echo "You selected ".$type.", for ".$boardcommittee."<br/>";

    * echo "File to upload is ".$file."<br/>";

    * echo "In folder: ".$target_path."<br/>";

    */

    // Save the file

    /**

    * if ((($_FILES["uploadedfile"]["type"] == "text/pdf")

    * || ($_FILES["uploadedfile"]["type"] == "text/doc")

    * || ($_FILES["uploadedfile"]["type"] == "text/docx"))

    * && ($_FILES["uploadedfile"]["size"] < 100000))

    * {

    */

    print $target_path . "<br/>";

    print $_FILES['uploadedfile']['tmp_name']."<br/>";

    if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path))

    {

    echo "The file ". basename( $_FILES['uploadedfile']['name'])." has been uploaded.";

    }

    else

    {

    echo "There was an error uploading the file, please try again!";

    die;

    }

    /**

    * }

    * else

    * {

    * echo "<br/><div style='color:red;'>Invalid File Type</div>";

    * }

    */

    }

    ?>

    </body>

    </html>

    1 AnswerProgramming & Design9 years ago
  • Formula Needed for a Programming Issue?

    I have two sets of variable combinations and I need a formula to find a result.

    Knowns:

    Number of items in A=2

    Number if items in B=3

    Total combinations: A*B = 6

    If Item A values are 1 and 2

    and Item B values are 1, 2 and 3

    What formula would give me a range of 1-6 (total combinations)

    Example Set

    A B Result

    1 1 =1

    1 2 =2

    1 3 =3

    2 1 =4

    2 2 =5

    2 3 =6

    The proof of the formula would be to have A=3 and B=4 where you end up with a new total combination of 3*4=12

    The formula will be used in a programming application to resolve passed in values of A and B and use them to lookup a values in the result array (1-6).

    Thanks in advance for all your help with this puzzle.

    1 AnswerEngineering1 decade ago
  • Maximum request length exceeded?

    I am using the Web Service Toolkit in Access to generate the code needed to call a Web Service which in turn sends an email using SMTP. My problem is when sending a large attachment with the email request, I get the error "Maximum request length exceeded". In ASP.NET is would set the maxRequestLength in httpRequest to change the upper limit in the caller. How do I do the same thing from VBA using the generated SOAP call?

    Private Sub Class_Initialize()

    '*****************************************************************

    'This subroutine will be called each time the class is instantiated.

    'Creates sc_ComplexTypes as new SoapClient30, and then

    'initializes sc_ComplexTypes.mssoapinit2 with WSDL file found in

    'http://localhost:3038/EnterpriseDataService.Host/U...

    '*****************************************************************

    Dim str_WSML As String

    Dim c_WSDL_URL As String

    '--Read in the WebService URL so that this can be migrated effectivly

    c_WSDL_URL = GetAppSetting("Administrative System", "EnterpriseDataService", "UtilityServiceWebService")

    If GetCurrentEnvironment() = PROD_ENV Then

    c_WSDL_URL = Replace(c_WSDL_URL, "ENVIRONMENT", "")

    Else

    c_WSDL_URL = Replace(c_WSDL_URL, "ENVIRONMENT", "-" & GetEnvironmentName)

    End If

    str_WSML = "<servicemapping>"

    str_WSML = str_WSML & "<service name='UtilityService'>"

    str_WSML = str_WSML & "<using PROGID='MSOSOAP.GenericCustomTypeMapper30' cachable='0' ID='GCTM'/>"

    str_WSML = str_WSML & "<types>"

    str_WSML = str_WSML & "<type name='EmailInfo' targetNamespace='http://enterprisedataservice.datatypes/2007/09' uses='GCTM' targetClassName='struct_EmailInfo'/>"

    str_WSML = str_WSML & "</types>"

    str_WSML = str_WSML & "</service>"

    str_WSML = str_WSML & "</servicemapping>"

    Set sc_UtilityService = New SoapClient30

    sc_UtilityService.MSSoapInit2 c_WSDL_URL, str_WSML, c_SERVICE, c_PORT, c_SERVICE_NAMESPACE

    'Use the proxy server defined in Internet Explorer's LAN settings by

    'setting ProxyServer to <CURRENT_USER>

    sc_UtilityService.ConnectorProperty("ProxyServer") = "<CURRENT_USER>"

    'Autodetect proxy settings if Internet Explorer is set to autodetect

    'by setting EnableAutoProxy to True

    sc_UtilityService.ConnectorProperty("EnableAutoProxy") = True

    Set sc_UtilityService.ClientProperty("GCTMObjectFactory") = New clsof_Factory_UtilityServic

    End Sub

    2 AnswersProgramming & Design1 decade ago
  • Looking for a set prop design idea?

    I need to create a bed (prop) for a stage play but the bed must look like you are seeing it from the prespective of a bug. Given that, the bed would need to look very tall and have a skirt so other bugs (child actors) can come out from under the bed during one scene. I was initially think of something with extreme perspective showing something like this (top view)...

    (A) \                 / (C)

         \               /

           \             /

            \           /

             \         /

                 V  (B)

    B would be front stage and twice as tall as A and C

    A and C would be back stage with B-C twice as long as B-A

    The head of the bed would be B-A

    Not really sure if this would work or not and would welcome any ideas to accomplish this 'unreal' world prop.

    2 AnswersDrawing & Illustration1 decade ago
  • SQL User Defined Function Needed?

    I am looking for a SQL Server User Defined Function code snippet that will take two parameters and return the lesser of the two.

    2 AnswersProgramming & Design1 decade ago
  • Visual Source Safe 2005 and ASP.NET?

    What would one suggest if we have a single ASP.NET application which needs 2 sets of changes with different delivery schedules and 2 developers. Is that 2 branches on VSS or what?

    1 AnswerProgramming & Design1 decade ago
  • JavaScript AutoCalc recommendation?

    I am looking for recommendations for displaying the results of a calculation for a set of input fields that reflect a set of Age Bands. The user enters a From Age and the calculation should show to the To Age. The bands are contiguous ages up to age 99. The user does not have to enter values in all of the input fields.

    There should be a column of textboxes for user entry. Lets say 5 for this exercise.

    Next to each textbox there should be a display only field to display the calculated result.

    The calculation and result should happen on an OnBlur event of the textbox.

    Example:

    User enters 0 in the first textbox and the To Age should show 99

    User enters 25 in the next textbox and the 99 changes to 24 and 99 shows next to the 25

    User enters 30 in the next textbox and the 99 changes to 29 and 99 shows next to the 30.

    2 AnswersProgramming & Design1 decade ago