Getting the HTTP referer

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

Getting the HTTP referer

#1

Postby dvanhussel » Fri Oct 04, 2013 1:11 pm

Is it possible in Ebase to check the HTTP referer?

We want to check if a form was started from our CMS or from another page/a users bookmark. So we can redirect them to a CMS page.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Fri Oct 04, 2013 1:32 pm

Should be:

Code: Select all

var referer = client.request.getHeader("referer");
0 x

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

#3

Postby dvanhussel » Wed Oct 09, 2013 7:46 am

Unfortunately, this does not work.

If the form is run the first time, referer is the url of the form, not the url of the page where the form was called from.

When the form is run a second time in the same browser session, referer is 'null'.

Is the 'Ebase Check of Browser capabilities' interfering?
0 x

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

#4

Postby dvanhussel » Wed Oct 09, 2013 7:47 am

Unfortunately, this does not work.

If the form is run the first time, referer is the url of the form, not the url of the page where the form was called from.

When the form is run a second time in the same browser session, referer is 'null'.

Is the 'Ebase Check of Browser capabilities' interfering?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#5

Postby Jon » Wed Oct 09, 2013 1:56 pm

Yes, I think you're right - the browser check mechanism is getting in the way. It should work after the session has been initialised.
0 x


Who is online

Users browsing this forum: No registered users and 16 guests