date and onchange...

M

mirza i

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="<%=bcolc%>">
<input type="text" name="dat" value='10/10/2005'
onchange="ksks()">
<img src="pics/cal.gif"
onclick="show_calendar('document.invdetdet.dat',
document.invdetdet.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
 
L

Lee

mirza i said:
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="<%=bcolc%>">
<input type="text" name="dat" value='10/10/2005'
onchange="ksks()">
<img src="pics/cal.gif"
onclick="show_calendar('document.invdetdet.dat',
document.invdetdet.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()?

onclick="show_calendar('document.invdetdet.dat',
document.invdetdet.dat.value);ksks()"
 
M

mirza i

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
 
L

Lee

mirza i said:
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!

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

sancha

window.close;opener.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top