I am trying to save the URL parameters from a referrer link... For example I have the following link: http:www.rene.com/media.asp?q=1234 and it takes you to a page where the javascript is running and saving the cookie: http:[URL] .Now i came out with the javascript code below but for some reason the parameter q is not saving in the cookie...
function gup( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
I have a website with several pages. Each page having the same menu.I need one of this menu item's text to vary according to each of my customers, where the customer id will be passed from an external link at launch time.I also need to change the menu item link <a href.../a> dynamically.I'm planning to create a redir.html pacge for each client and within that page, I can insert a url with parameters to launch the main page.
if I put alert(document.referrer) in code of a file that was linked from another it returns blank... pls, need to get document.referrer, don't why it's not working... read up on oreilly, don't know what I'm doing wrong..
I have a site with the "standar" three frames (top, left, main) and in one of then i have a link that calls a Javascript function that at some point do
But this is sending the referrer the url of the frame where the code is, not the window url. How can i make the referrer the window url, not the frame url? From what i've serched Javascript can not change the referrer, is there any workaround?
Is there a way to set the value of HTTP header Referrer to null or to any specified value?? I have tried doing this
document.Referrer= null
but document.Referrer is a read only property therefore the value can't be changed and a Javascript error is occuring. Any ideas on how this can be achieved.
It certainly doesn't help that IE doesn't seem to pass document.referrer or am I missing something ? Is it set up thru an add-on analysis package? (referrer info from logs? )
This is my first time messing with the document.referrer tag in javaScript, and I'm afraid it's giving me some trouble. It all seems very simple and I'm having no problem getting the other document methods to work, but this one just refuses to get in line. Here's my test code:
<HTML> <HEAD>
<title>refer test</title>
</HEAD> <BODY>
<P> <script LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- Hide script from old browsers
document.write('<P>Here's the URL: ' + document.URL);
document.write('<P>Here's the last modified info : ' + document.lastModified);
document.write('<P>Here's the referrer: ' + document.referrer);
I am looking for a javascript that will redirect if the visitor is coming from a certain specific. url.Basically I need the webpage to do a meta refresh or redirect to a new page if the visitor is coming from a specific url.
So if there was a link on this post to my webpage, it would redirect to google if the visitor came ftom this url,[URL]...
I have adwords coupons and can make a small paypal deposit for your time.
Chrome creates new process for each instance(click to any _blank url). The new instance doesn't get 'document.referrer'.
How I can get it for Chrome? (This problems is only for Chrome)
You can create simple links and page.
This page contain next text: <script language="javascript" type="text/javascript" charset='UTF-8'> document.write('<H2>'); document.write('<b>Referrer Is: </b>');
I'm trying to create a splash page effect on my index page by adding some full screen images with jquery. I got that to work, but I only want to call the script if a person is arriving at the homepage after coming from an external site. I think I can use document.referrer in something like this:
I have very little knowledge of javascript, other than modifying existing scripts, and I can't find anything about this particular problem. creating a simple script that will display a div ONLY if the user comes from a certain page within the same site.
Not sure if that was clear, but let me try with specifics. There is a link to a page called 'Clients' on the 'About Us' page. If a user goes directly to 'Clients', they should have a normal experience. If, however, they come via the 'About Us' page, I want to display a div at the bottom of the page that will take them back to the 'About Us' page.
I know how to get a referrer, and I know how to show/hide divs. I just don't know how to combine the two.
i was hoping to get some help with just figuring out how I should tackle an issue I'm having. I am pretty good with php and javascript, but no expert. Anyways, I have a site where I am wanting to swap some info around the Wordpress site, based on the referrer domain.
More specifically, when a user comes from craigslist.org/anything/ , I need to be able to make a substitution of a couple of html elements during their session. Very likely I will be making that substitution through some combination of js and php - right? - but I'm not quite confident in how I should start off. The site in question is [URL]...
If anyone just has any theories about how this should work, then PLEASE share them! And if you have a code snippet that might start work in this direction, that I can modify and play with, then PLEASE share that as well,
For example ,There is a "Link" called "go to view" at the bottom of the my page, which is redirecting to [URL]. if we use $_SERVER['HTTP_REFERER'] in test.php page It will display the url of the page from which link was clicked. The problem is this my URL can be seen at the target page. This needs to be avoided. How can i do this using javascript ?
I need a counter that will display beside a link, with the number of times the same link has been clicked. I do not have FTP access to the site, since it is based on a CMS.
I have a problem with cookies set via javascript. What I try to achieve is, when a user comes on the intranet, he can click on a link ( a simple href) that will set the content to french or english. I want to set a cookie to persist that choice each time the user comes back on the intranet. This feature must be available everywhere on the intranet and the link is placed in an inner asp script called Menu.asp which is included each time a page loads.
Now, I know it's maybe not the best way to achieve this but I'm just working from what has been made by others, I cannot change the way things are made, too much work would be involved and they won't accept to give time to do everything all over again.
The best approach I got was to set a querystring value and replace the cookie value from vbscript code. The problem is, the intranet we have use a lot of the querystrings for a lot of features and when I click the English/French link, that info is lost. I've tried to set a mechanism to keep all the querystring and only add a new value but I got weird results...
So I've turned to Javascript and still got no luck... For some reasons, the cookie gets deleted from the cookie file as soon as my javascript modifies the cookie.
I wrote a script to generate links to some pictures that I need to regularly update our site with. Is there a way to write a script that just saves the pics to a directory on my pc so I dont have to right click on every link and do a save picture as...? I can't link directly to the pics from our site because our site is https and the site the pics are on are http so the user gets the security warning box every time a pic loads. Code:
WANT: Client to save an image to disk pressing a "download" button. The image name is dynamic, from JS code on another part of the page
DID: Read somewhere I can use document.execCommand("SaveAs") to do it This solves it for MSIE, at least. My code is below
PROBLEM: What actually happens with MSIE is: 1) A window pops up promting me to save as.
2) The filename is correct, but the saveas type shown in the box is limited to "html" and "txt"
3) The "image" that is saved is not an image, but an HTML file containing the link to the image!! This is NOT what I want!
PLEASE help. How do I get MSIE to save the actual image instead? PS With netscape, instead of the saveas dialogue, a window opens with the image displayed. By clicking <CTRL-S> I can save the actual image.
I have a log file that is viewed on the local machine. There are some settings on the html page that allow the user to specify how the file is viewed. I'm just wnodering what are my options in saving these settings (so they could be reloaded next time the user loads the page). Writing to registry, a file, or a cookie? what's the right approach?
I've got an online system which I'm interested in making available offline - i.e. letting the user download certain HTML forms, fill them out offline, then the next time he logs into the site, sending all the data he filled out to the system. However, I can't seem to come up with a good way to do this. I thought of using cookies (that'd be great, since the system could detect them automatically), but it seems I can't set cookies for my server offline; it has to be from a page on the server itself. And from what I can tell, JavaScript doesn't have the capability to write files on a local system either. Does anyone have any ideas about how to go about this using JavaScript?