Re: new window on redirect

2004-07-13 Thread David Dorward
On 13 Jul 2004, at 14:37, Tim McGeary wrote:
I want my web page redirect to open in a new window, as if I were 
putting target=_new in the html of the URL.
Which isn't allowed under HTML. You are probably thinking of _blank.
http://www.w3.org/TR/html4/types.html#h-6.16
How can I do that using CGI.pm's redirect?
print $output-redirect($u)
You can't... well... there is the Window-Target not-really-http-header 
but, last I heard, browser support for that (thankfully) sucks.
http://diveintoaccessibility.org/day_16_not_opening_new_windows.html

--
David Dorward
 http://dorward.me.uk/
http://blog.dorward.me.uk/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response



Re: new window on redirect

2004-07-13 Thread Wiggins d Anconia
 I want my web page redirect to open in a new window, as if I were 
 putting target=_new in the html of the URL.  How can I do that using 
 CGI.pm's redirect?  I have this:
 
 print $output-redirect($u)
 
 with $u being the URL I am redirecting, too.
 

The problem is that the redirect is providing an HTTP header back with
the new location and a result code that instructs the browser to find
the page at the new location, this is working at the protocol level
which has no knowledge of windows, targets, etc. So using 'redirect' is
not likely to get you anywhere at the client level.  

Generally I would think your best bet would be to have the link itself
use a standard target, which for some reason you seem to be avoiding,
reasons?  Alternatively you could pass back some javascript for the
onLoad handler and have it pop the new redirect in a new window, but the
problem I see here is that the browser will have already cleared the
window's contents and loaded a new page, so the same handler would
need to restore the previous contents, which gets real ugly, especially
if the referer is POST'ed.  I wouldn't even want to think about the
nightmares dealing with different versions of browsers + javascript,
etc.  However if your referer is static and you can guarantee it then it
wouldn't be as much of a problem.

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: new window on redirect

2004-07-13 Thread Tim McGeary
Sorry, I didn't mean to not include everyone on my reply...
The reason I need a new window (and I did actually mean _blank), is 
because this is for a Library portal site which has a limited window 
view.  Our users actually (almost) demand a new window because they 
don't want to have to hit their back button 20 times to get back to 
their customized list of electronic Library resources.

And so, if I don't open a new window, then they will complain that they 
cannot see the site they want to see (because the window is too small) 
and they have now lost their portal site, which they need to open other 
sites in order to compare for their research, etc.

I am modifying current open sourced software that's already in place, 
though not yet in production mode for our users.

Does that help explain why I need it?  What would you suggest at this point?
Thanks,
Tim
Tim McGeary
Senior Library Systems Specialist
Lehigh University
610-758-4998
[EMAIL PROTECTED]

Wiggins d Anconia wrote:
I want my web page redirect to open in a new window, as if I were 
putting target=_new in the html of the URL.  How can I do that using 
CGI.pm's redirect?  I have this:

print $output-redirect($u)
with $u being the URL I am redirecting, too.

The problem is that the redirect is providing an HTTP header back with
the new location and a result code that instructs the browser to find
the page at the new location, this is working at the protocol level
which has no knowledge of windows, targets, etc. So using 'redirect' is
not likely to get you anywhere at the client level.  

Generally I would think your best bet would be to have the link itself
use a standard target, which for some reason you seem to be avoiding,
reasons?  Alternatively you could pass back some javascript for the
onLoad handler and have it pop the new redirect in a new window, but the
problem I see here is that the browser will have already cleared the
window's contents and loaded a new page, so the same handler would
need to restore the previous contents, which gets real ugly, especially
if the referer is POST'ed.  I wouldn't even want to think about the
nightmares dealing with different versions of browsers + javascript,
etc.  However if your referer is static and you can guarantee it then it
wouldn't be as much of a problem.
http://danconia.org

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response



Re: new window on redirect

2004-07-13 Thread Wiggins d Anconia
Please bottom post...

 Sorry, I didn't mean to not include everyone on my reply...
 
 The reason I need a new window (and I did actually mean _blank), is 
 because this is for a Library portal site which has a limited window 
 view.  Our users actually (almost) demand a new window because they 
 don't want to have to hit their back button 20 times to get back to 
 their customized list of electronic Library resources.
 

Ah, I love tab capable browsers ;-). (I know it is unreasonable to force
your users to use one.)

 And so, if I don't open a new window, then they will complain that they 
 cannot see the site they want to see (because the window is too small) 
 and they have now lost their portal site, which they need to open other 
 sites in order to compare for their research, etc.
 

Not entirely sure why this is determined after the script has been
called though?  Why not have the list of links modified to force a new
target on the initial link rather than on submission?  

 I am modifying current open sourced software that's already in place, 
 though not yet in production mode for our users.
 
 Does that help explain why I need it?  What would you suggest at this
point?

snip

Sort of. What I don't understand is why do you have to decide on the
server side, post-request that the result will be in a new window? 
Couldn't the original portal page just use targets like normal?

http://danconia.org


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: new window on redirect

2004-07-13 Thread Tim McGeary
Wiggins d Anconia wrote:
Please bottom post...
I hate bottom posting...  but alas...  scroll down.  :)
Sorry, I didn't mean to not include everyone on my reply...
The reason I need a new window (and I did actually mean _blank), is 
because this is for a Library portal site which has a limited window 
view.  Our users actually (almost) demand a new window because they 
don't want to have to hit their back button 20 times to get back to 
their customized list of electronic Library resources.


Ah, I love tab capable browsers ;-). (I know it is unreasonable to force
your users to use one.)

And so, if I don't open a new window, then they will complain that they 
cannot see the site they want to see (because the window is too small) 
and they have now lost their portal site, which they need to open other 
sites in order to compare for their research, etc.


Not entirely sure why this is determined after the script has been
called though?  Why not have the list of links modified to force a new
target on the initial link rather than on submission?  


I am modifying current open sourced software that's already in place, 
though not yet in production mode for our users.

Does that help explain why I need it?  What would you suggest at this
point?
snip
Sort of. What I don't understand is why do you have to decide on the
server side, post-request that the result will be in a new window? 
Couldn't the original portal page just use targets like normal?
It's a database driven site and so, unfortunately, it is all server
side, at least for this purpose.  So are you telling me there's no real
way in perl to do this?
Tim
Tim McGeary
Senior Library Systems Specialist
Lehigh University
610-758-4998
[EMAIL PROTECTED]


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response



Re: new window on redirect

2004-07-13 Thread Wiggins d Anconia
Please group reply so others can help and be helped.

 Wiggins d Anconia wrote:
  Please bottom post...
 
 I hate bottom posting...  but alas...  scroll down.  :)
 

Yes but it makes it easier to follow (you can always snip so as not to
force a long scroll)

 Sorry, I didn't mean to not include everyone on my reply...

You did the last time but not this time, hmph.

snip

  Sort of. What I don't understand is why do you have to decide on the
  server side, post-request that the result will be in a new window? 
  Couldn't the original portal page just use targets like normal?
 
 It's a database driven site and so, unfortunately, it is all server 
 side, at least for this purpose.  So are you telling me there's no real 
 way in perl to do this?
 

Right, but again, assuming the page they are linking from is driven then
set the target at the time of the original display rather than during
the link through?  Aka the user goes to the site, is presented a list of
links that are from search results, I am assuming they will click one of
those links to see a detail listing, seeing that detailed listing in a
new window is what you are after?  Rather than trying to set the new
window after the click, you set it when the list is presented
originally. Perl isn't really involved in this because it is running on
the server side, other than you will need to modify how your original
result page (the one they click on) is displayed.

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: new window on redirect

2004-07-13 Thread Thomas Bätzler
Tim McGeary [EMAIL PROTECTED] asked:
  Sort of. What I don't understand is why do you have to decide on the
  server side, post-request that the result will be in a new window? 
  Couldn't the original portal page just use targets like normal?
 
 It's a database driven site and so, unfortunately, it is all server
 side, at least for this purpose.  So are you telling me 
 there's no real way in perl to do this?

Actually, there is no real way to do that in any
programming language. It's not a Perl-specific issue.

HTH,
Thomas

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: new window on redirect

2004-07-13 Thread Tim McGeary
Wiggins d Anconia wrote:
snip
Sort of. What I don't understand is why do you have to decide on the
server side, post-request that the result will be in a new window? 
Couldn't the original portal page just use targets like normal?
It's a database driven site and so, unfortunately, it is all server 
side, at least for this purpose.  So are you telling me there's no real 
way in perl to do this?
Right, but again, assuming the page they are linking from is driven then
set the target at the time of the original display rather than during
the link through?  Aka the user goes to the site, is presented a list of
links that are from search results, I am assuming they will click one of
those links to see a detail listing, seeing that detailed listing in a
new window is what you are after?  Rather than trying to set the new
window after the click, you set it when the list is presented
originally. Perl isn't really involved in this because it is running on
the server side, other than you will need to modify how your original
result page (the one they click on) is displayed.
That won't work (just tried it).  I cannot set a target in the DB.
[sigh]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response



Re: new window on redirect

2004-07-13 Thread Jan Eden
Tim McGeary wrote on 13.07.2004:

Wiggins d Anconia wrote: snip

Sort of. What I don't understand is why do you have to decide on
the server side, post-request that the result will be in a new
window? Couldn't the original portal page just use targets like
normal?

It's a database driven site and so, unfortunately, it is all
server side, at least for this purpose.  So are you telling me
there's no real way in perl to do this?

Right, but again, assuming the page they are linking from is driven
then set the target at the time of the original display rather than
during the link through?  Aka the user goes to the site, is
presented a list of links that are from search results, I am
assuming they will click one of those links to see a detail
listing, seeing that detailed listing in a new window is what you
are after?  Rather than trying to set the new window after the
click, you set it when the list is presented originally. Perl isn't
really involved in this because it is running on the server side,
other than you will need to modify how your original result page
(the one they click on) is displayed.

That won't work (just tried it).  I cannot set a target in the DB.


Sorry, if I do not get you right, but... can't your script provide a link list like 
this:

ul
lia href=detail.pl?id=1234 target=_blankItem 1234/a/li
lia href=detail.pl?id=1235 target=_blankItem 1235/a/li
lia href=detail.pl?id=1236 target=_blankItem 1236/a/li
lia href=detail.pl?id=1237 target=_blankItem 1237/a/li
/ul

This is what Wiggins meant when writing modify your original results page (as far as 
I understand him). It has nothing to do with the database nor with Perl. But it works, 
opening a new window when the user clicks on a link.

- Jan
-- 
Hanlon's Razor: Never attribute to malice that which can be adequately explained by 
stupidity.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: new window on redirect

2004-07-13 Thread Tim McGeary
Jan Eden wrote:
Tim McGeary wrote on 13.07.2004:

Wiggins d Anconia wrote: snip
Sort of. What I don't understand is why do you have to decide on
the server side, post-request that the result will be in a new
window? Couldn't the original portal page just use targets like
normal?
It's a database driven site and so, unfortunately, it is all
server side, at least for this purpose.  So are you telling me
there's no real way in perl to do this?
Right, but again, assuming the page they are linking from is driven
then set the target at the time of the original display rather than
during the link through?  Aka the user goes to the site, is
presented a list of links that are from search results, I am
assuming they will click one of those links to see a detail
listing, seeing that detailed listing in a new window is what you
are after?  Rather than trying to set the new window after the
click, you set it when the list is presented originally. Perl isn't
really involved in this because it is running on the server side,
other than you will need to modify how your original result page
(the one they click on) is displayed.
That won't work (just tried it).  I cannot set a target in the DB.

Sorry, if I do not get you right, but... can't your script provide a link list like 
this:
ul
lia href=detail.pl?id=1234 target=_blankItem 1234/a/li
lia href=detail.pl?id=1235 target=_blankItem 1235/a/li
lia href=detail.pl?id=1236 target=_blankItem 1236/a/li
lia href=detail.pl?id=1237 target=_blankItem 1237/a/li
/ul
This is what Wiggins meant when writing modify your original results page (as far as 
I understand him). It has nothing to do with the database nor with Perl. But it works, opening a 
new window when the user clicks on a link.
- Jan
Actually, I later realized this and indeed am looking into that 
possibility.  :)  I guess I should have responded as such.  Thank you 
for the reminder.

Tim
Tim McGeary
Senior Library Systems Specialist
Lehigh University
610-758-4998
[EMAIL PROTECTED]

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response



Re: new window on redirect

2004-07-13 Thread Wiggins d Anconia
 
 Jan Eden wrote:
  Tim McGeary wrote on 13.07.2004:
  
  
 Wiggins d Anconia wrote: snip
 
 Sort of. What I don't understand is why do you have to decide on
 the server side, post-request that the result will be in a new
 window? Couldn't the original portal page just use targets like
 normal?
 
 It's a database driven site and so, unfortunately, it is all
 server side, at least for this purpose.  So are you telling me
 there's no real way in perl to do this?
 
 Right, but again, assuming the page they are linking from is driven
 then set the target at the time of the original display rather than
 during the link through?  Aka the user goes to the site, is
 presented a list of links that are from search results, I am
 assuming they will click one of those links to see a detail
 listing, seeing that detailed listing in a new window is what you
 are after?  Rather than trying to set the new window after the
 click, you set it when the list is presented originally. Perl isn't
 really involved in this because it is running on the server side,
 other than you will need to modify how your original result page
 (the one they click on) is displayed.
 
 That won't work (just tried it).  I cannot set a target in the DB.
 
  
  
  Sorry, if I do not get you right, but... can't your script provide a
link list like this:
  
  ul
  lia href=detail.pl?id=1234 target=_blankItem 1234/a/li
  lia href=detail.pl?id=1235 target=_blankItem 1235/a/li
  lia href=detail.pl?id=1236 target=_blankItem 1236/a/li
  lia href=detail.pl?id=1237 target=_blankItem 1237/a/li
  /ul
  
  This is what Wiggins meant when writing modify your original
results page (as far as I understand him). It has nothing to do with
the database nor with Perl. But it works, opening a new window when the
user clicks on a link.
  
  - Jan
 
 Actually, I later realized this and indeed am looking into that 
 possibility.  :)  I guess I should have responded as such.  Thank you 
 for the reminder.
 

Yeh that is what I was getting at, obviously didn't do the best job
explaining :-).  (Tim, since you mentioned it was OSS I assumed you
could manipulate the link providing script.) If *all* else fails you
could always wrap the script call to the DB, with a second 'proxy'
script that calls the original page, parses it, and dynamically adds the
targets, but this is very *icky* compared to just modifying the original
source.

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response