Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Problem with jump in netscape

Quote Reply
Problem with jump in netscape
OK, I tried searching for the posts ... Did not find it, trust me.
I have a music database, so I use links for it. On the detailed page, when you click download file (originally "visit this link"), IE does the right thing, but netscape gives me 404 page not found, and then prints the url of the song in the address bar with spaces.
I know that Netscape (version 6 doesn't have the problem, but 4 does) needs precentage and 20 sign to recognize the address of the file, but apparently jump.cgi doesn't put it where it needs to.
This is the weird part. When I try downloading the file with IE, in the status bar, the name of the the file is shown exactly the way it should be with percentage and 20 sign. I don't know why doesn't it do the same thing with netscape.
There is another option. Maybe there is a way to make the detailed page show the real URL to the song, instead of jump.cgi?ID, etc.
Any suggestions ...

Thanks,
Milos


Milos
Quote Reply
Re: Problem with jump in netscape In reply to
'Maybe there is a way to make the detailed page show the real URL to the song, instead of jump.cgi?ID, etc.'

Just edit detailed.html so the link points to the URL field.

Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: Problem with jump in netscape In reply to
Can you please tell me how to exactly do that ...

Right now it is
<%db_cgi_url%>/jump.cgi?ID=<%ID%> ...

What do I change it to?

Thanks,
Milos


Milos
Quote Reply
Re: Problem with jump in netscape In reply to
Duh...use <%URL%>.

Regards,

Eliot Lee
Quote Reply
Re: Problem with jump in netscape In reply to
<%URL%>

Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: Problem with jump in netscape In reply to
Thanks ...
It worked. Actually, I tried that before, but I made the beginner's mistake. Instead of URL, I put url ...
Well, not I guess the problem is that is still doesn't put percentage and 20 sign where it needs to ...
Any suggestions?

Thanks,

Milos
Quote Reply
Re: Problem with jump in netscape In reply to
It has to be passed from a form to be changed to the format you want, therefore just using <%URL%> will print the exact url that is in your database.


Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Quote Reply
Re: Problem with jump in netscape In reply to
'needs precentage and 20 sign to recognize the address of the file, but apparently jump.cgi doesn't put it where it needs to.'

Try using a little expression in jump.cgi to format the url the way you want before printing it in the location bar.

Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: Problem with jump in netscape In reply to
From Milos

OK, so I guess it's better to use jump.cgi (for stats, too), but how do I make it to use the percentage 20 instead of space.
Is there a line I can add or something, maybe the same line as in db_utils.pl :

sub build_clean {
# --------------------------------------------------------
# Formats a category name for displaying.
#
my ($input) = shift;
$input =~ s/_/ /g; # Change '_' to spaces.
$input =~ s,/, > ,g; # Change '/' to ' : '.
return $input;

Something like that?

Thanks,

Milos
Quote Reply
Re: Problem with jump in netscape In reply to
Maybe

$goto =~ s/ /&#37;20/g;

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Quote Reply
Re: Problem with jump in netscape In reply to
Can you tell me where exactly to put that, or it doesn't matter? I put it in jump.cgi, so it looked like this:

# Let's get the URL.
open (URL, "<$db_url_name") or &error ("unable to open url database: $db_url_name. Reason: $!");
while (<URL>) {
(/^$id$delim(.+)/o) or next;
chomp ($goto = $1);
$goto =~ s/ /(percentage 20)/g;
last;
}
close URL;
$goto or &error ("Can't find link id: $id");

and it didn't work...
I just need to tell the jump.cgi to put (percentage 20) instead of space ...

Any other ideas?

Thanks,


Milos
Quote Reply
Re: Problem with jump in netscape In reply to
MYCODE

# Now let's send the user to the url..
$goto ?
print "Location: $goto\n\n" :
&error ("Record not found ($in{$db_key})");
}

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Quote Reply
Re: Problem with jump in netscape In reply to
From Milos

That's what my code is ...
If I put $goto =~ s/ / /g;, it still doesnt work ...

Any suggestions?

Thanks,

Milos
Quote Reply
Re: Problem with jump in netscape In reply to
Well the regex works for me so you must be doing something wrong.Wink

What exactly are you adding for the regex because what you are pasting in your messages is wrong... s/ / /g;

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Quote Reply
Re: Problem with jump in netscape In reply to
From Milos

Well, it just didn't print the percentage 20 sign ...
Please, be aware that I am not really perl litterate. Can you explain this or put the whole code exactly what it should look like ... Thank you so much.

Regards,

Milos