- see footer for list info -<
No problem. :)

On 12/20/06, Damien Gallagher <[EMAIL PROTECTED]> wrote:

>- see footer for list info -<
Oops. Stupid mistake - I missed the ? out of the link so it was just
calendar.html'+elem_id

Got it working now. Thanks for your help Peter :)

Damien


Peter Boughton wrote:
>> - see footer for list info -<
> Hmmm, not sure. Make sure you've definitely got the question mark
> there, and
> the +elem_id is outside the quoted string.
>
> Alternatively, you could try using a # instead of the ?, and then
> changing
> the location.href.split('?') to location.href.split('#') but the ? is
the
> ideal one to use.
>
>
> On 12/20/06, Damien Gallagher <[EMAIL PROTECTED]> wrote:
>>
>> >- see footer for list info -<
>> It definitely exists. I just get the page not found when I add the
>> +elem_id . If I take that away, the page is found...
>>
>> Peter Boughton wrote:
>> >> - see footer for list info -<
>> > Does that page definitely exist?
>> >
>> > Maybe try fullying qualifying it. eg:
>> >
>> '//#CGI.HTTP_HOST#/myapp/includes/popupCalendar/calendar.html?'+elem_id
>> >
>> >
>> > On 12/20/06, Damien Gallagher <[EMAIL PROTECTED]> wrote:
>> >>
>> >> >- see footer for list info -<
>> >> Hi Peter,
>> >>
>> >> I think I'm almost there. Only problem is that when I add the
>> +elem_id
>> >> in the query string, I get a page not found in my calendar window.
>> >>
>> >>
>> >> function showCalendar(elem_id)
>> >> {
>> >> myCal = window.open
>> >>
>> >>
>>
('includes/popupCalendar/calendar.html?'+elem_id,'myCal','width=300,height=300');
>>
>> >>
>> >>
>> >> }
>> >>
>> >>
>> >> Any ideas?
>> >> Damien
>> >>
>> >>
>> >>
>> >>
>> >> Peter Boughton wrote:
>> >> >> - see footer for list info -<
>> >> > Firstly, stop using FormName.FieldName, and use the element id
>> >> instead.
>> >> > (ie: <input id="course_from" name="CourseDateFrom_1" .../> )
>> >> >
>> >> > This way, your javascript is not dependant on these two values,
and
>> if
>> >> > you
>> >> > need to change either of them for whatever reason, the Id can
>> probably
>> >> > stay
>> >> > the same.
>> >> >
>> >> > Then pass through the id in the query string when you open the
>> window,
>> >> > like
>> >> > this:
>> >> > function showCalendar(elem_id)
>> >> > {
>> >> > myCal = window.open
>> >> >
>> >>
>>
('includes/popupCalendar/calendar.html?'+elem_id,'myCal','width=300,height=300');
>>
>> >>
>> >> >
>> >> > }
>> >> >
>> >> > Then in your calendar script, use this function to return the
>> value:
>> >> > function ret(val)
>> >> > {
>> >> > var id = location.href.split('?')[1];
>> >> > window.opener.document.getElementById(id).value = val;
>> >> > window.close();
>> >> > }
>> >> >
>> >> > Which you would call with something along the lines of this:
>> >> > <a
>> >> >
>> >>
>>
href="javascript:ret('<cfoutput>#JsStringFormat(retcal)#</cfoutput>');">#x#</a>
>>
>> >>
>> >> >
>> >> >
>> >> >
>> >> > This all allows you to use the showCalendar to call the calendar
>> >> for any
>> >> > specified form element, and it will then return the value to that
>> >> > specified
>> >> > element when finished.
>> >> >
>> >> >
>> >> > Hope that all makes sense?
>> >> >
>> >> >
>> >> >
>> >> > On 12/19/06, Damien Gallagher <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >> >- see footer for list info -<
>> >> >> I have a javascript popup calendar.
>> >> >>
>> >> >> It is opened using:
>> >> >>
>> >> >> <a
>> >> >>
>> href="javascript:show_calendar('SailHelpBookingForm.CourseDateFrom_1
>> '
>> >> );"
>> >> >> onmouseover="window.status='Date Picker';return true;"
>> >> >> onmouseout="window.status='';return true;">
>> >> >>   <img src="includes/popupCalendar/cal.gif" width=16 height=16
>> >> >> border=0 />
>> >> >> </a>
>> >> >>
>> >> >> The variables SailHelpBookingForm and CourseDateFrom_1 refer to
>> the
>> >> form
>> >> >> name and the name of the form input the instance of the calendar
>> >> relates
>> >> >> to.
>> >> >>
>> >> >> In the calendar window, the date is selected and window closed
>> using:
>> >> >>
>> >> >> <a
>> >> >> href="javascript:
>> >> >> window.opener.document.SailHelpBookingForm.CourseDateTo_1.value='
>> >> >> <cfoutput>#retcal#</cfoutput>';
>> >> >> window.close();"
>> >> >>
>> onmouseover="javascript:toggleDisplay('c<cfoutput>#x#</cfoutput>')"
>> >> >>
>> >> >>
>> >>
>>
onmouseout="javascript:toggleDisplay('c<cfoutput>#x#</cfoutput>')"><cfoutput>#x#</cfoutput></a>
>>
>> >>
>> >> >>
>> >> >>
>> >> >> I need to dynamically change the values for the formname and form
>> >> input
>> >> >> name in this link
>> >> >>
>> >>
>> (javascript:window.opener.document.SailHelpBookingForm.CourseDateTo_1)
>> >> >> depending on the variables I set in the first link that opened
the
>> >> >> calendar window.
>> >> >>
>> >> >> How do I do it?
>> >> >>
>> >> >> Thanks, Damien
>> >> >> _______________________________________________
>> >> >>
>> >> >> For details on ALL mailing lists and for joining or leaving
lists,
>> go
>> >> to
>> >> >> http://list.cfdeveloper.co.uk/mailman/listinfo
>> >> >>
>> >> >> --
>> >> >> CFDeveloper Sponsors:-
>> >> >> >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>> >> >> >- Lists hosted by www.Gradwell.com -<
>> >> >> >- CFdeveloper is run by Russ Michaels, feel free to volunteer
>> your
>> >> help
>> >> >> -<
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> _______________________________________________
>> >>
>> >> For details on ALL mailing lists and for joining or leaving lists,
go
>> to
>> >> http://list.cfdeveloper.co.uk/mailman/listinfo
>> >>
>> >> --
>> >> CFDeveloper Sponsors:-
>> >> >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>> >> >- Lists hosted by www.Gradwell.com -<
>> >> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your
>> help
>> >> -<
>> >>
>> >
>> >
>> >
>> _______________________________________________
>>
>> For details on ALL mailing lists and for joining or leaving lists, go
to
>> http://list.cfdeveloper.co.uk/mailman/listinfo
>>
>> --
>> CFDeveloper Sponsors:-
>> >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>> >- Lists hosted by www.Gradwell.com -<
>> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help
>> -<
>>
>
>
>
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
-<




--
\ \
Peter Boughton
blog.bpsite.net
/ /
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to