date and onchange...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mirza i

    #1

    date and onchange...

    hi,

    i got an interesting problem,

    i got this javascript that calls a calendar, date is selected and result
    date is insert into a txt field...

    <td valign="middle" align="center" bgcolor="<%=bco lc%>">
    <input type="text" name="dat" value='10/10/2005'
    onchange="ksks( )">
    <img src="pics/cal.gif"
    onclick="show_c alendar('docume nt.invdetdet.da t',
    document.invdet det.dat.value); " width="17" height="16" border="0"
    alt="Date">
    </td>
    ....
    function ksks()
    {
    alert("alert")
    }

    the calendar part works. it calls a page, i select a date and it is insert
    into dat, but ksks() is never executed as the value property of dat is set
    by javascript...

    is there a way i can execute ksks()?

    regards

    mi


  • Lee

    #2
    Re: date and onchange...

    mirza i said:[color=blue]
    >
    >hi,
    >
    >i got an interesting problem,
    >
    >i got this javascript that calls a calendar, date is selected and result
    >date is insert into a txt field...
    >
    > <td valign="middle" align="center" bgcolor="<%=bco lc%>">
    > <input type="text" name="dat" value='10/10/2005'
    >onchange="ksks ()">
    > <img src="pics/cal.gif"
    >onclick="show_ calendar('docum ent.invdetdet.d at',
    >document.invde tdet.dat.value) ;" width="17" height="16" border="0"
    >alt="Date">
    > </td>
    >...
    >function ksks()
    >{
    >alert("alert ")
    >}
    >
    >the calendar part works. it calls a page, i select a date and it is insert
    >into dat, but ksks() is never executed as the value property of dat is set
    >by javascript...
    >
    >is there a way i can execute ksks()?[/color]

    onclick="show_c alendar('docume nt.invdetdet.da t',
    document.invdet det.dat.value); ksks()"

    Comment

    • mirza i

      #3
      Re: date and onchange...

      hi lee,

      sure, that is what i thought at first...

      but, what happens is the following:
      1. small calendar opens ok.
      2. i get the alert, i click ok, and the box dissapears. (the calendar
      dissapears behind the web app.)
      3. i select a date, calendar closes automatically.. .

      so that is not good

      what is required is 1 - 3 - 2 sequence.

      thanks for your effort nevertheless!

      mi



      "Lee" <REM0VElbspamtr ap@cox.net> wrote in message
      news:cshila01u2 0@drn.newsguy.c om...[color=blue]
      > mirza i said:[color=green]
      >>
      >>hi,
      >>
      >>i got an interesting problem,
      >>
      >>i got this javascript that calls a calendar, date is selected and result
      >>date is insert into a txt field...
      >>
      >> <td valign="middle" align="center" bgcolor="<%=bco lc%>">
      >> <input type="text" name="dat" value='10/10/2005'
      >>onchange="ksk s()">
      >> <img src="pics/cal.gif"
      >>onclick="show _calendar('docu ment.invdetdet. dat',
      >>document.invd etdet.dat.value );" width="17" height="16" border="0"
      >>alt="Date">
      >> </td>
      >>...
      >>function ksks()
      >>{
      >>alert("alert" )
      >>}
      >>
      >>the calendar part works. it calls a page, i select a date and it is insert
      >>into dat, but ksks() is never executed as the value property of dat is set
      >>by javascript...
      >>
      >>is there a way i can execute ksks()?[/color]
      >
      > onclick="show_c alendar('docume nt.invdetdet.da t',
      > document.invdet det.dat.value); ksks()"
      >[/color]


      Comment

      • Lee

        #4
        Re: date and onchange...

        mirza i said:[color=blue]
        >
        >hi lee,
        >
        >sure, that is what i thought at first...
        >
        >but, what happens is the following:
        >1. small calendar opens ok.
        >2. i get the alert, i click ok, and the box dissapears. (the calendar
        >dissapears behind the web app.)
        >3. i select a date, calendar closes automatically.. .
        >
        >so that is not good
        >
        >what is required is 1 - 3 - 2 sequence.
        >
        >thanks for your effort nevertheless![/color]

        Then have the page in the popup execute opener.ksks() when you make the
        selection.

        Comment

        • sancha

          #5
          Re: date and onchange...

          window.close;op ener.ksks();

          this works on both IE as well as FireFox

          if we change the order then FireFox is unable to reach the second
          statement and the window remains open

          Comment

          • mirza i

            #6
            Re: date and onchange...

            many thanks lee & sancha


            "sancha" <chaudhuri.sand ip@gmail.com> wrote in message
            news:1106015865 .414230.100950@ z14g2000cwz.goo glegroups.com.. .[color=blue]
            > window.close;op ener.ksks();
            >
            > this works on both IE as well as FireFox
            >
            > if we change the order then FireFox is unable to reach the second
            > statement and the window remains open
            >[/color]


            Comment

            Working...