User Profile

Collapse

Profile Sidebar

Collapse
Hotice
Hotice
Last Activity: Nov 10 '10, 08:21 AM
Joined: Apr 23 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Hotice
    started a topic Convert Java to Servlet
    in Java

    Convert Java to Servlet

    Hello all,

    I want to create a web application for sending booking requests to DHL. I already found a toolkit (http://xmlshippingtest .dhl-usa.com/toolkit/index.html) that uses XML files to send the bookings.

    But how can I convert the Java code in this toolkit in to a servlet, so I can use it on the web. The Java code in that toolkit looks like this:

    Code:
    //IO Classes
    import java.io.FileInputStream;
    ...
    See more | Go to post

  • Problem solved.
    For selecting one character of a string, Internet Explorer does not recognize this format: string[2].
    So, I replaced
    Code:
    var day = data[0]+data[1];
    with
    Code:
    var day = data.charAt(0)+data.charAt(1);
    Many thanks to all for reading my post.
    See more | Go to post

    Leave a comment:


  • This does not solve the problem (I have more than 40 elements in that form with the same name and ID. And the only validation that does not work is for booking hours).

    But I did the following thing: I added one more line:
    alert(date_hour _ready);

    Now, when I submit the form, on Firefox an alert message is displayed, with the following text: "Sun Apr 25 2010 14:07:00 GMT+0300 (GTB Daylight Time)". On Internet...
    See more | Go to post

    Leave a comment:


  • I don't know if the problem could be here, but here is the HTML code too:

    Code:
    <script type="text/javascript" src="js/new_shipment_fields_validation.js"></script>
    
    <form action='submit.php' method='post' onsubmit='return validate_fields()'>
    ........
    <input type='text' name='ready_h' id='ready_h' size='1'>
    <input type='text' name='ready_m' id='ready_m'
    ...
    See more | Go to post

    Leave a comment:


  • Validation script working on Firefox and Chrome, not working on IE

    I have a form for registering some bookings. The problem is that I want to validate the data users enter in this form. All works fine, excepting the booking hours (ready by and closing time).

    This is the part of the script that does not work:

    [CODE=javascript]
    function validate_fields ()
    {

    if (document.getEl ementById("comp ania").value.le ngth == "0")
    {
    document.getEle mentById("compa nia").style.bac kground...
    See more | Go to post
No activity results to display
Show More
Working...