Hi. I am currently trying to make a popup flash calendar that sends a value to text field on the window that opened it.
It is working, but I’m having a few problems.
The first problem is fairly big. Once someone has used the flash calendar to send the date to the text field it closes the window with the flash in it and leaves the new value in the form. – great!
But, the people that I am doing this for would like to add some functionality. If, once the user has their date value – and the want to change it – clicking on the date will load the flash window again, but instead of starting on today’s date it starts on the date that is in the text field.
So, this will involve sending a variable (the contents of the text field to the popup flash window.
This is where the problems starts:
Initially I used the code:
FIRST VERSION
function newwin()
{
var win = window.open("cal.html","calendar","toolbar=0,,titlebar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=275,height=325"
win.document.calendar.SetVariable("sentdate", document.forms[0].mydate.value);
}
This comes up with the error:
Document.calendar is not and object.
But, if I add the following, it does send the contents of the field to the flash window:
SECOND VERSION
function newwin()
{
var win = window.open("cal.html","calendar","toolbar=0,,titlebar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=275,height=325"
alert(win.document.location);
win.document.calendar.SetVariable("sentdate", document.forms[0].mydate.value);
}
The first version can be seen at:
The second version
The small thing that I am trying to do is call the close window function if the user clicks anywhere other than the date text box. Or to make the flash popup window always on top.
Please feel free to view the source to see all the ways I’m going wrong.
Cheers if you can help in any way.
Matt
It is working, but I’m having a few problems.
The first problem is fairly big. Once someone has used the flash calendar to send the date to the text field it closes the window with the flash in it and leaves the new value in the form. – great!
But, the people that I am doing this for would like to add some functionality. If, once the user has their date value – and the want to change it – clicking on the date will load the flash window again, but instead of starting on today’s date it starts on the date that is in the text field.
So, this will involve sending a variable (the contents of the text field to the popup flash window.
This is where the problems starts:
Initially I used the code:
FIRST VERSION
function newwin()
{
var win = window.open("cal.html","calendar","toolbar=0,,titlebar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=275,height=325"
win.document.calendar.SetVariable("sentdate", document.forms[0].mydate.value);
}
This comes up with the error:
Document.calendar is not and object.
But, if I add the following, it does send the contents of the field to the flash window:
SECOND VERSION
function newwin()
{
var win = window.open("cal.html","calendar","toolbar=0,,titlebar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=275,height=325"
alert(win.document.location);
win.document.calendar.SetVariable("sentdate", document.forms[0].mydate.value);
}
The first version can be seen at:
The second version
The small thing that I am trying to do is call the close window function if the user clicks anywhere other than the date text box. Or to make the flash popup window always on top.
Please feel free to view the source to see all the ways I’m going wrong.
Cheers if you can help in any way.
Matt