Re: Using Static HREF - Session Problems
Re: Using Static HREF - Session Problems
- Subject: Re: Using Static HREF - Session Problems
- From: Dirk Bajohr <email@hidden>
- Date: Tue, 16 Sep 2003 18:15:00 +0200
Hello Hunter,
we are developing a quite large application and have many parameters that
change from development to deployment environment. We are using different
Properties files to set the different values. We have a Properties.deploy
and a Properties.develop. This way we don't have to change the model for
a different database host and can use different webservers for the images
etc.
Anyways you shouldn't hardcode the URL to the calendar page, use the
Properties file and add a line like
CalendarUrl=http://localhost/calendar.html
or something like this.
In your WOComponent you simply have to call
System.getProperty("CalendarUrl")
Cheers,
Dirk
At 17:27 16.09.2003, you wrote:
Yeah, I should have included this info my original post...
The part of the JavaScript that pops up the window looks like this:
var obj_calwindow = window.open(
'calendar.html?datetime=' + this.dt_current.valueOf()+ '&id=' +
this.id,
'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+
',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes '
);
calendar.html is outside my WO app at /app/calendar.html. Now looking
at this again, it seems like perhaps the path is wrong and I'm getting
some kind of 404 in WO that wants a session... So...
I tried modifying the JavaScript source to change the path:
/calendar/calendar.html
to see if that would make a difference... Well, it does change
things... Now I get my Main component (a login screen) in my tiny pop
up.
Apparently this is because the HREF is still using the WO port (I'm in
dev mode in PB)... So I guess the solution is to specify a hard path in
the JavaScript like this: http://localhost/calendar/calendar.html? That
seems like a hack, since I'll have to change it before I deploy... Is
that my best option?
Thanks,
Hunter
On Tuesday, September 16, 2003, at 03:36 AM, email@hidden
wrote:
Hi Hunter
On Tuesday, September 16, 2003, at 07:44 am, MadBrowser wrote:
First off, thanks to everyone on this list. I'm obviously still
learning WO and you guys have been really helpful.
I am having a problem with a static A HREF in one of my Web
components... Basically this link looks like this:
<a href="javascript:cal1.popup();"><img src="/img/cal.gif" width="16"
height="16" border="0" alt="Click Here to Pick up the date"></a>
What URL does cal1.popup() load?
-- Denis.
--
__________________________________
Dirk Bajohr
iSOLUTION
Hauptstrasse 50
53757 Sankt Augustin
T 02241 921 567-0
F 02241 921 567-89
email@hidden
http://www.iSOLUTION.de
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.