Results 1 to 16 of 16
Like Tree4Likes
  • 1 Post By Tolls
  • 1 Post By dswastik
  • 1 Post By dswastik
  • 1 Post By quad64bit

Thread: String to Integer Conversion in JSP

  1. #1
    Join Date
    Nov 2012
    Posts
    9
    Rep Power
    0

    Default String to Integer Conversion in JSP

    I also having the same prob...can any1 help me??
    I want to calculate amount...taken from two fields i.e. optthree and optthree1..
    Somewhat like amount=(optthree+optthree1)
    m unable to convert (optthree n optthree1)textfield into integer......
    please help me out..

    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page import="java.net.URL, java.util.*" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>JSP Response addHeader</title>
    </head>
    <body>
    <form name="myform" method="post" action="">
    <select name="optone"
    onchange="setOptions(document.myform.optone.option s
    [document.myform.optone.selectedIndex].value);">
    <option value=" " selected="selected"> </option>
    <option value="Combos">Combos</option>
    <option value="BonitaChiquita">BonitaChiquita</option>
    <option value="Wellness">Wellness</option>
    <option value="Individual">Individual</option>
    <option value="Upgrades">Upgrades</option>


    </select> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;




    <select name="opttwo" onchange="setOptions1(document.myform.opttwo.optio ns
    [document.myform.opttwo.selectedIndex].value);">
    <option value=" " selected="selected">select</option>
    </select>

    <select name="optthree" >
    <option value=" " selected="selected" >select</option>
    </select>


    <script language="JavaScript">

    function setOptions(chosen) {
    var selbox = document.myform.opttwo;

    selbox.options.length = 0;
    if (chosen == " ") {
    selbox.options[selbox.options.length] = new Option('select',' ');

    }
    if (chosen == "Combos") {
    selbox.options[selbox.options.length] = new
    Option('Combo Belita Beautiful','Combo Belita Beautiful');
    selbox.options[selbox.options.length] = new
    Option('Combo Belita Midas Touch','Combo Belita Midas Touch');
    selbox.options[selbox.options.length] = new
    Option('Combo Mumbai Special','Combo Mumbai Special');
    selbox.options[selbox.options.length] = new
    Option('Combo Tress Talk','Combo Tress Talk');
    selbox.options[selbox.options.length] = new
    Option('Combo Royal Wellness','Combo Royal Wellness');
    selbox.options[selbox.options.length] = new
    Option('Combo Quick Fix','Combo Quick Fix');
    }
    if (chosen == "BonitaChiquita") {
    selbox.options[selbox.options.length] = new
    Option('Hair Do ','Hair Do');
    selbox.options[selbox.options.length] = new
    Option('Saree Drapping ','Saree Drapping');
    selbox.options[selbox.options.length] = new
    Option('Face Make Up','Face Make Up');
    selbox.options[selbox.options.length] = new
    Option('Eye Make up ','Eye Make up');
    selbox.options[selbox.options.length] = new
    Option('Full Package - Rs 1000/- ','Full Package - Rs 1000/-');

    }
    if (chosen == "Wellness") {
    selbox.options[selbox.options.length] = new
    Option('Massage - Champi Head','Massage - Champi Head');
    selbox.options[selbox.options.length] = new
    Option('Massage - Foot Reflexology','Massage - Foot Reflexology');
    selbox.options[selbox.options.length] = new
    Option('Massage - Full Hands And Full Legs','Massage - Full Hands And Full Legs');
    selbox.options[selbox.options.length] = new
    Option('Massage - Swedish','Massage - Swedish');
    selbox.options[selbox.options.length] = new
    Option('Royal Medley Back Massage','Royal Medley Back Massage');
    }

    if (chosen == "Individual") {
    selbox.options[selbox.options.length] = new
    Option('Bleach - Body Back','Bleach - Body Back');
    selbox.options[selbox.options.length] = new
    Option('Bleach - Body Back Half','Bleach - Body Back Half');
    selbox.options[selbox.options.length] = new
    Option('Bleach - Face','Bleach - Face');
    selbox.options[selbox.options.length] = new
    Option('Bleach - Feet','Bleach - Feet');
    selbox.options[selbox.options.length] = new
    Option('Bleach - Full Body','Bleach - Full Body');
    }

    if (chosen == "Upgrades") {
    selbox.options[selbox.options.length] = new
    Option('Signature Upgrades - Choclate Hand Waxing','Signature Upgrades - Choclate Hand Waxing');
    selbox.options[selbox.options.length] = new
    Option('Signature Upgrades - Loreal Hair Spa','Signature Upgrades - Loreal Hair Spa');
    selbox.options[selbox.options.length] = new
    Option('Signature Upgrades - O3 Mask','Signature Upgrades - O3 Mask');
    selbox.options[selbox.options.length] = new
    Option('Signature Upgrades Facial - VLCC Gold','Signature Upgrades Facial - VLCC Gold');
    selbox.options[selbox.options.length] = new
    Option('Signature Upgrades Hair Spa - Loreal','Signature Upgrades Hair Spa - Loreal');
    }

    }

    function setOptions1(chosen) {
    var selbox = document.myform.optthree;
    selbox.options.length = 0;

    if (chosen == " ") {
    selbox.options[selbox.options.length] = new Option('select',' ');

    }

    if (chosen == "Combo Belita Beautiful") {
    selbox.options[selbox.options.length] = new
    Option('600','600');
    }

    if (chosen == "Combo Belita Midas Touch") {
    selbox.options[selbox.options.length] = new
    Option('950','950');
    }

    if (chosen == "Combo Mumbai Special") {
    selbox.options[selbox.options.length] = new
    Option('800','800');
    }

    if (chosen == "Combo Tress Talk") {
    selbox.options[selbox.options.length] = new
    Option('1250','1250');
    }


    if (chosen == "Combo Royal Wellness") {
    selbox.options[selbox.options.length] = new
    Option('1200','1200');
    }

    }
    </script>
    Therapist
    <select name="select2" id="select">
    <option value="Hema">Hema</option>
    <option value="Ritu">Ritu</option>
    <option value="Nikita">Nikita</option>
    <option value="Ashwini">Ashwini</option>
    </select>
    <%! int a,b,c;%>
    <%!String opttwo,optthree,opttwo1,optthree1;%>
    <%
    opttwo = request.getParameter("opttwo");
    optthree = request.getParameter("optthree");

    if(opttwo != null)
    {
    //boolean bol = response.containsHeader(opttwo);
    %>
    <b><%=opttwo %></b>&nbsp;:
    <b><%=optthree%></b>
    <%
    }
    %>


    <!----------------------------------------------------------------------------->

    <!--second form-->

    <br>
    <select name="optone1"
    onchange="setOptions2(document.myform.optone1.opti ons
    [document.myform.optone1.selectedIndex].value);">
    <option value=" " selected="selected"> </option>
    <option value="Combos">Combos</option>
    <option value="BonitaChiquita">BonitaChiquita</option>
    <option value="Wellness">Wellness</option>
    <option value="Individual">Individual</option>
    <option value="Upgrades">Upgrades</option>


    </select> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;




    <select name="opttwo1" onchange="setOptions3(document.myform.opttwo1.opti ons
    [document.myform.opttwo1.selectedIndex].value);">
    <option value=" " selected="selected">select</option>
    </select>

    <select name="optthree1">
    <option value=" " selected="selected">select</option>
    </select>
    <!--input type="button" name="go" value="Add" onclick="alert(document.myform.opttwo.options
    [document.myform.opttwo.selectedIndex].value);"-->




    <script language="JavaScript">

    function setOptions2(chosen) {
    var selbox = document.myform.opttwo1;

    selbox.options.length = 0;
    if (chosen == " ") {
    selbox.options[selbox.options.length] = new Option('select',' ');

    }
    if (chosen == "Combos") {
    selbox.options[selbox.options.length] = new
    Option('Combo Belita Beautiful','Combo Belita Beautiful');
    selbox.options[selbox.options.length] = new
    Option('Combo Belita Midas Touch','Combo Belita Midas Touch');
    selbox.options[selbox.options.length] = new
    Option('Combo Mumbai Special','Combo Mumbai Special');
    selbox.options[selbox.options.length] = new
    Option('Combo Tress Talk','Combo Tress Talk');
    selbox.options[selbox.options.length] = new
    Option('Combo Royal Wellness','Combo Royal Wellness');
    selbox.options[selbox.options.length] = new
    Option('Combo Quick Fix','Combo Quick Fix');
    }
    if (chosen == "BonitaChiquita") {
    selbox.options[selbox.options.length] = new
    Option('Hair Do ','Hair Do');
    selbox.options[selbox.options.length] = new
    Option('Saree Drapping ','Saree Drapping');
    selbox.options[selbox.options.length] = new
    Option('Face Make Up','Face Make Up');
    selbox.options[selbox.options.length] = new
    Option('Eye Make up ','Eye Make up');
    selbox.options[selbox.options.length] = new
    Option('Full Package - Rs 1000/- ','Full Package - Rs 1000/-');

    }
    if (chosen == "Wellness") {
    selbox.options[selbox.options.length] = new
    Option('Massage - Champi Head','Massage - Champi Head');
    selbox.options[selbox.options.length] = new
    Option('Massage - Foot Reflexology','Massage - Foot Reflexology');
    selbox.options[selbox.options.length] = new
    Option('Massage - Full Hands And Full Legs','Massage - Full Hands And Full Legs');
    selbox.options[selbox.options.length] = new
    Option('Massage - Swedish','Massage - Swedish');
    selbox.options[selbox.options.length] = new
    Option('Royal Medley Back Massage','Royal Medley Back Massage');
    }

    if (chosen == "Individual") {
    selbox.options[selbox.options.length] = new
    Option('Bleach - Body Back','Bleach - Body Back');
    selbox.options[selbox.options.length] = new

    Option('Bleach - Body Back Half','Bleach - Body Back Half');
    selbox.options[selbox.options.length] = new
    Option('Bleach - Face','Bleach - Face');
    selbox.options[selbox.options.length] = new
    Option('Bleach - Feet','Bleach - Feet');
    selbox.options[selbox.options.length] = new
    Option('Bleach - Full Body','Bleach - Full Body');
    }

    if (chosen == "Upgrades") {
    selbox.options[selbox.options.length] = new
    Option('Signature Upgrades - Choclate Hand Waxing','Signature Upgrades - Choclate Hand Waxing');
    selbox.options[selbox.options.length] = new
    Option('Signature Upgrades - Loreal Hair Spa','Signature Upgrades - Loreal Hair Spa');
    selbox.options[selbox.options.length] = new
    Option('Signature Upgrades - O3 Mask','Signature Upgrades - O3 Mask');
    selbox.options[selbox.options.length] = new
    Option('Signature Upgrades Facial - VLCC Gold','Signature Upgrades Facial - VLCC Gold');
    selbox.options[selbox.options.length] = new
    Option('Signature Upgrades Hair Spa - Loreal','Signature Upgrades Hair Spa - Loreal');
    }

    }

    function setOptions3(chosen) {
    var selbox = document.myform.optthree1;
    selbox.options.length = 0;

    if (chosen == " ") {
    selbox.options[selbox.options.length] = new Option('select',' ');

    }

    if (chosen == "Combo Belita Beautiful") {
    selbox.options[selbox.options.length] = new
    Option('600','600');
    }

    if (chosen == "Combo Belita Midas Touch") {
    selbox.options[selbox.options.length] = new
    Option('950','950');
    }

    if (chosen == "Combo Mumbai Special") {
    selbox.options[selbox.options.length] = new
    Option('800','800');
    }

    if (chosen == "Combo Tress Talk") {
    selbox.options[selbox.options.length] = new
    Option('1250','1250');
    }


    if (chosen == "Combo Royal Wellness") {
    selbox.options[selbox.options.length] = new
    Option('1200','1200');
    }

    }
    </script>

    Therapist
    <select name="select2" id="select">
    <option value="Hema">Hema</option>
    <option value="Ritu">Ritu</option>
    <option value="Nikita">Nikita</option>
    <option value="Ashwini">Ashwini</option>
    </select>
    <%
    String opttwo1 = request.getParameter("opttwo1");
    String optthree1 = request.getParameter("optthree1");

    if(opttwo1 != null)
    {
    //boolean bol1 = response.containsHeader(opttwo1);
    %>

    <b><%=opttwo1 %></b>&nbsp;:
    <b><%=optthree1%></b>

    <%
    }
    %>
    Amount <input type="text" name="Amount">
    <%
    out.println("ok");
    try
    {
    if(optthree!=null)
    {

    a=Integer.parseInt("optthree");out.println("ok1");
    }
    if(optthree1!=null)
    {
    b=Integer.parseInt("optthree1");
    c=a+b;
    out.println(""+c);
    }


    %>


    <%
    }
    catch(Exception e)
    {
    e.printStackTrace();
    }

    %>


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


    </form>
    </body>
    </html>

  2. #2
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,183
    Rep Power
    20

    Default Re: String to Integer Conversion in JSP

    Please do not resurrect ancient threads.
    I've split yours out into its own thread.

    Please use [code] tags [/code] when posting code.
    Many people won't bother reading unformatted code.

    I would recommend not doing this in a JSP.
    JSPs are for displaying data that has been processed by a servlet.

    Anyway, once you've formatted the code, and highlighted where your problem is (complete with any exceptions or errors) then I'm sure someone can sort it out.
    Last edited by quad64bit; 11-15-2012 at 08:32 PM.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    Join Date
    Nov 2012
    Posts
    9
    Rep Power
    0

    Default Re: String to Integer Conversion in JSP

    Thanx 4 ur reply....i sort out my this prob..nw its working

    But now I have one more prob..
    I made one application.Now what I want is to connect to calender that means by clicking on every date the same application shud open and saves the past history too...
    I am using JSP and MS Access database.
    Is that possible??

  4. #4
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default Re: String to Integer Conversion in JSP

    Could you please elaborate more? What exactly do you mean by connect to calendar?
    Swastik

  5. #5
    Join Date
    Nov 2012
    Posts
    9
    Rep Power
    0

    Default Re: String to Integer Conversion in JSP

    Thank you 4 ur reply..

    Connect to calender in the sense, I have small datepicker calender code..suppose i click on one of the date on calender then after clicking it wil displays the another page i.e. my applications first page.How can I do this??

  6. #6
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default Re: String to Integer Conversion in JSP

    Do you mean you have a calendar control in one of your pages, on click, it opens another page?
    Swastik

  7. #7
    Join Date
    Nov 2012
    Posts
    9
    Rep Power
    0

    Default Re: String to Integer Conversion in JSP

    Right exactly...
    Is der any way to do this???

  8. #8
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default Re: String to Integer Conversion in JSP

    Just a side note, please use proper english when posting here. It's one thing if english is a foreign language to you, it's quite another when you say:

    m unable to convert
    Is der any way
    Thanx 4 ur reply
    Many users will not tolerate this kind of thing, nor will most moderators. You will most likely get more (and better help) if you speak as though talking to software engineering professionals (you are).

  9. #9
    Join Date
    Nov 2012
    Posts
    9
    Rep Power
    0

    Default Re: String to Integer Conversion in JSP

    Thank you sir for your suggestion, I will definately improve that as I am new to this website.

  10. #10
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,183
    Rep Power
    20

    Default Re: String to Integer Conversion in JSP

    This looks more like a Javascript question, since it seems you are looking for a component to go on the page.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  11. #11
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default Re: String to Integer Conversion in JSP

    You have a good attitude. Let me look at your problem here - I agree with tolls, this does appear to be more of a javascript question. Javascript and java are not the same thing, just FYI.

    If I understand your question, you're having trouble adding numbers from a text field because they are actually read as strings. You need to parse them as ints before you can add, look here:

  12. #12
    Join Date
    Nov 2012
    Posts
    9
    Rep Power
    0

    Default Calender Component

    Thank you..

    I have solved my problem very well and now it works properly..
    But I have another problem related to calender (DatePicker) code.
    I have calender code in one of my page.
    How can I connect my application to every date in calender???

  13. #13
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,183
    Rep Power
    20

    Default Re: String to Integer Conversion in JSP

    Which DatePicker is it?
    Essentially you react to an event on the date picker, not on each individual date.
    And this is even more of a Javascript question...
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  14. #14
    Join Date
    Nov 2012
    Posts
    9
    Rep Power
    0

    Default Re: String to Integer Conversion in JSP

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>htmlDatePicker Test Page (CFML)</title>
    <script language="JavaScript" type="text/javascript">

    var HighlightToday = true; // use true or false to have the current day highlighted
    var DisablePast = false; // use true or false to allow past dates to be selectable
    // The month names in your native language can be substituted below
    var MonthNames = new Array("January","February","March","April","May"," June","July","August","September","October","Novem ber","December");

    // Global Vars
    var now = new Date();
    var dest = null;
    var ny = now.getFullYear(); // Today's Date
    var nm = now.getMonth();
    var nd = now.getDate();
    var sy = 0; // currently Selected date
    var sm = 0;
    var sd = 0;
    var y = now.getFullYear(); // Working Date
    var m = now.getMonth();
    var d = now.getDate();
    var l = 0;
    var t = 0;
    var MonthLengths = new Array(31,28,31,30,31,30,31,31,30,31,30,31);

    /*
    Function: GetDate(control)

    Arguments:
    control = ID of destination control
    */
    function GetDate() {
    EnsureCalendarExists();
    DestroyCalendar();
    // One arguments is required, the rest are optional
    // First arguments must be the ID of the destination control
    if(arguments[0] == null || arguments[0] == "") {
    // arguments not defined, so display error and quit
    alert("ERROR: Destination control required in funciton call GetDate()");
    return;
    } else {
    // copy argument
    dest = arguments[0];
    }
    y = now.getFullYear();
    m = now.getMonth();
    d = now.getDate();
    sm = 0;
    sd = 0;
    sy = 0;
    var cdval = dest.value;
    if(/\d{1,2}.\d{1,2}.\d{4}/.test(dest.value)) {
    // element contains a date, so set the shown date
    var vParts = cdval.split("/"); // assume mm/dd/yyyy
    sm = vParts[0] - 1;
    sd = vParts[1];
    sy = vParts[2];
    m=sm;
    d=sd;
    y=sy;
    }

    // l = dest.offsetLeft; // + dest.offsetWidth;
    // t = dest.offsetTop - 125; // Calendar is displayed 125 pixels above the destination element
    // if(t<0) { t=0; } // or (somewhat) over top of it. ;)

    /* Calendar is displayed 125 pixels above the destination element
    or (somewhat) over top of it. ;)*/
    l = dest.offsetLeft + dest.offsetParent.offsetLeft;
    t = dest.offsetTop - 125;
    if(t < 0) t = 0; // >
    DrawCalendar();
    }

    /*
    function DestoryCalendar()

    Purpose: Destory any already drawn calendar so a new one can be drawn
    */
    function DestroyCalendar() {
    var cal = document.getElementById("dpCalendar");
    if(cal != null) {
    cal.innerHTML = null;
    cal.style.display = "none";
    }
    return
    }

    function DrawCalendar() {
    DestroyCalendar();
    cal = document.getElementById("dpCalendar");
    cal.style.left = l + "px";
    cal.style.top = t + "px";

    var sCal = "<table><tr><td class=\"cellButton\"><a href=\"javascript: PrevMonth();\" title=\"Previous Month\">&lt;&lt;</a></td>"+
    "<td class=\"cellMonth\" width=\"80%\" colspan=\"5\">"+MonthNames[m]+" "+y+"</td>"+
    "<td class=\"cellButton\"><a href=\"javascript: NextMonth();\" title=\"Next Month\">&gt;&gt;</a></td></tr>"+
    "<tr><td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td></tr>";
    var wDay = 1;
    var wDate = new Date(y,m,wDay);
    if(isLeapYear(wDate)) {
    MonthLengths[1] = 29;
    } else {
    MonthLengths[1] = 28;
    }
    var dayclass = "";
    var isToday = false;
    for(var r=1; r<7; r++) {
    sCal = sCal + "<tr>";
    for(var c=0; c<7; c++) {
    var wDate = new Date(y,m,wDay);
    if(wDate.getDay() == c && wDay<=MonthLengths[m]) {
    if(wDate.getDate()==sd && wDate.getMonth()==sm && wDate.getFullYear()==sy) {
    dayclass = "cellSelected";
    isToday = true; // only matters if the selected day IS today, otherwise ignored.
    } else if(wDate.getDate()==nd && wDate.getMonth()==nm && wDate.getFullYear()==ny && HighlightToday) {
    dayclass = "cellToday";
    isToday = true;
    } else {
    dayclass = "cellDay";
    isToday = false;
    }
    if(((now > wDate) && !DisablePast) || (now <= wDate) || isToday) { // >
    // user wants past dates selectable
    sCal = sCal + "<td class=\""+dayclass+"\"><a href=\"javascript: ReturnDay("+wDay+");\">"+wDay+"</a></td>";
    } else {
    // user wants past dates to be read only
    sCal = sCal + "<td class=\""+dayclass+"\">"+wDay+"</td>";
    }
    wDay++;
    } else {
    sCal = sCal + "<td class=\"unused\"></td>";
    }
    }
    sCal = sCal + "</tr>";
    }
    sCal = sCal + "<tr><td colspan=\"4\" class=\"unused\"></td><td colspan=\"3\" class=\"cellCancel\"><a href=\"javascript: DestroyCalendar();\">Cancel</a></td></tr></table>"
    cal.innerHTML = sCal; // works in FireFox, opera
    cal.style.display = "inline";
    }

    function PrevMonth() {
    m--;
    if(m==-1) {
    m = 11;
    y--;
    }
    DrawCalendar();
    }

    function NextMonth() {
    m++;
    if(m==12) {
    m = 0;
    y++;
    }
    DrawCalendar();
    }

    function ReturnDay(day) {
    cDest = document.getElementById(dest);
    dest.value = (m+1)+"/"+day+"/"+y;
    DestroyCalendar();
    }

    function EnsureCalendarExists() {
    if(document.getElementById("dpCalendar") == null) {
    var eCalendar = document.createElement("div");
    eCalendar.setAttribute("id", "dpCalendar");
    document.body.appendChild(eCalendar);
    }
    }

    function isLeapYear(dTest) {
    var y = dTest.getYear();
    var bReturn = false;

    if(y % 4 == 0) {
    if(y % 100 != 0) {
    bReturn = true;
    } else {
    if (y % 400 == 0) {
    bReturn = true;
    }
    }
    }

    return bReturn;
    }

    </script>
    <style type="text/css">
    /************************************************** ************************************
    htmlDatePicker CSS file

    Feel Free to change the fonts, sizes, borders, and colours of any of these elements
    ************************************************** *************************************/
    /* The containing DIV element for the Calendar */
    #dpCalendar {
    display: none; /* Important, do not change */
    position: absolute; /* Important, do not change */
    background-color: #eeeeee;
    color: black;
    font-size: xx-small;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    width: 150px;
    }
    /* The table of the Calendar */
    #dpCalendar table {
    border: 1px solid black;
    background-color: #eeeeee;
    color: black;
    font-size: xx-small;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    width: 100%;
    }
    /* The Next/Previous buttons */
    #dpCalendar .cellButton {
    background-color: #ddddff;
    color: black;
    }
    /* The Month/Year title cell */
    #dpCalendar .cellMonth {
    background-color: #ddddff;
    color: black;
    text-align: center;
    }
    /* Any regular day of the month cell */
    #dpCalendar .cellDay {
    background-color: #ddddff;
    color: black;
    text-align: center;
    }
    /* The day of the month cell that is selected */
    #dpCalendar .cellSelected {
    border: 1px solid red;
    background-color: #ffdddd;
    color: black;
    text-align: center;
    }
    /* The day of the month cell that is Today */
    #dpCalendar .cellToday {
    background-color: #ddffdd;
    color: black;
    text-align: center;
    }
    /* Any cell in a month that is unused (ie: Not a Day in that month) */
    #dpCalendar .unused {
    background-color: transparent;
    color: black;
    }
    /* The cancel button */
    #dpCalendar .cellCancel {
    background-color: #cccccc;
    color: black;
    border: 1px solid black;
    text-align: center;
    }
    /* The clickable text inside the calendar */
    #dpCalendar a {
    text-decoration: none;
    background-color: transparent;
    color: blue;
    }
    </style>
    </head>

    <body>
    <cfif IsDefined("form.SelectedDate")>

    </cfif>
    Please select a date:
    <input type="text" name="SelectedDate" id="SelectedDate" readonly onClick="GetDate(this);">

    </body>
    </html>



    Which event I have to use in this???

  15. #15
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,455
    Rep Power
    20

    Default Re: String to Integer Conversion in JSP

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  16. #16
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,183
    Rep Power
    20

    Default Re: String to Integer Conversion in JSP

    I asked you earlier to use [code] tags [/code].
    As for what event, I have no idea as that seems to be your own date picker.
    And you need to find a Javascript forum.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 6
    Last Post: 09-14-2012, 01:33 PM
  2. string to integer conversion
    By boys21 in forum New To Java
    Replies: 3
    Last Post: 10-17-2011, 04:58 PM
  3. String to Integer Conversion in JSP
    By vinikz in forum New To Java
    Replies: 8
    Last Post: 11-10-2010, 03:45 PM
  4. String to Hex Conversion
    By mocha in forum New To Java
    Replies: 0
    Last Post: 03-17-2010, 09:45 AM
  5. String to Integer conversion
    By eva in forum New To Java
    Replies: 2
    Last Post: 12-17-2007, 04:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •