Add The Current Page's Url To A Link
Oct 19, 2010I want to add the current page's url to a link, like this:
[Code]...
I want to add the current page's url to a link, like this:
[Code]...
I'm not sure if this is the correct place to post this question. If it isn't, please let me know where I should post it.I created a simple content slider with each link directed to a section on the same page. The menu I'm using is straightforward:
<div id="menu">
<ul>
<li><a href="#home" class=".current">Home</a></li>
[code]....
I have huge page of links, to whcih I am currently adding. I would
like to add a "random link" button which would parse the current page,
extract all URLs then load a random link.
Basically I want some of the links in my page to open in new tabs (I'm
using Firefox) or windows if the user has their options configured
that way. And I want my page to remain intact as it involves some AJAX
and takes a while to load.
But ...and this seems to be a big "but"... I don't want the focus to
move away from the page I'm on. So techniques such as <a
target="_blank"or <a onclick="window.open(...)"aren't working for
this requirement. I even tried using a separate function and
attempting to return to the original window straight after using the
following function: Code:
I want to have twelve pages giving details for each month with a navigation link "This Month" allowing the correct page to be loaded.
View 5 Replies View RelatedI'm trying to create two bookmarklets:
1. Take the current URL of the page and open a new window with a URL based on the current page. Some examples (I use "->" to mean "this URL turns into that URL"):I plan to use these bookmarklets in sequence, first pressing 1 to log into the CMS, then pressing 2 to edit the current page.
I've looked on the forums and google for this, and I can't find anything exactly right:I have a universal navigation, one link is "Print PDF" - I don't want to hand code each page individually.How can I use the current page url - such as "website.com/accomodations.php" to print a PDF named after the page, like "accomodations.pdf", or even better "pdfs/accomodations.php"?OR just any way to print a PDF associated with the current page - I guess it doesn't necessarily need to be the URL that links the files.
View 1 Replies View RelatedUmm, this is a tricky one to add a descriptive title for!
Basically I have two links on the page that go to the same page when clicked. What I want to do is when I hover over one of those links for the hover to work for both of them and visa versa.
So I have this links
<a class="connected" href="">Connected</a>
<a class="remove" href="">Remove</a>
a.connected { background: url(../images/connected.png) no-repeat 0 top; }
a.connected:hover { background: url(../images/connected.png) no-repeat 0 bottom; }
[Code]....
I am quite new to jquery and I wonder if I can do this:
I have an advanced menu. I want to give the link in the menu that is currently active a different styling than the other links.
One way to do this would be to select the link by saying: Get current URL. Now select all links in the menu that contains this URL.
Is this possible? And how?
I've seen this on many sites where the current link in a menu is styled. How do I add a class to a link that is active?
View 5 Replies View RelatedI have list of links inside a DIV. I am trying to apply CSS to the current page linkbut it does not work.
View 1 Replies View RelatedI know how to use javascript to modify a newly opened window's properties. Instead, what I want to happen is someone clicks on a link and they stay in the current browser window, but the window size changes to fit my specifications.
View 4 Replies View RelatedWhat am i doing wrong? I'm trying to toggleclass on a link, with the href of the current anchor
var anchor=window.location.hash;
$('#nav a[href='.anchor.']').toggleClass('active');
I've got this script which effectively should change the clicked link's opacity to full and its siblings' opacity to 0.6. The only part that works though is the changing the text color to black. Here's the script:
<script type="text/javascript">
$(document).ready(function(){ $(".menu a").live('click',function(){
$(this).siblings().css('color','red');
$(this).css('color','black');
$(this).css('opacity',1);
[Code]....
Currently using jQuery's
function loadContent(elementSelector, sourceURL) {
$(""+elementSelector+"").load(""+sourceURL+"");
}
and href="javascript:loadContent('#content', 'page/home.html');"
to load some remote content into the main container. The problems is: i'm unable to find any working solution to highlight the current, active menu item (build as an <ul> and styled with external css), considering the main page isn't reloading - especially when i'm in no way able to understand JS at all.Would any of you have any idea how to mark the current menu item marked as active untill another one is chosen - and then repeat the function?
I'd like to be able to get Superfish to expand the entire menu and show the current active link in pathlevel 2. I'm using the nav-bar style and it seems that only pathlevel 1 is visible:
[URL]
I'm trying to build a menu with an animation color and my problem is that the funtion is apply to all the links in the menu but ideally I would like to apply to all elements less the one with the id current.
at the moment I just created two functions but still apply both of them to the current link.
Here is the code:
<script type="text/javascript">
// font color animation
$(".second a").hover(function() {
$(this).animate({ color: "#00aadd" }, 400);
[Code].....
My requirement is, I have multiple pages in tab format. If i am on first page in edit mode and change any control's value and without saving information i click on other tab that particular time a popup should appear showing validation message say "you are moving without save and it will loos all changes either click ok to loose the changes and move to other page or click cancel to remain on the current page."I tried using var isDirty = false; var msg = 'This page has unsaved changes.Click OK to abandon the changes and leave the page.Click Cancel to stay on the page so that you can save your changes.';
$(document).ready(function ()
{
$(':input').change(function ()
[code]....
Based on the lack of responses to the last hole (which I am attributing to one of the following:
a. The hole being too difficult,
b. It being overly time consuming, or
c. People not wanting to do it)
I have decided to take a step back for this hole.
Create a Javascript include function. This function should include a javascript file (when given a URL) into the current page assuming it wasn't already included in the page (either via the include function call or by HTML). If the file is already included the function should just return.
This function should either take a file name/ path to file or a full URL as a parameter. If it is a filename/ path the function should include the file from the base URL of the current site (such as [url]). If it is a full URL just include it.
Make sure you don't allow files to be included multiple times, we don't want that!
There is many examples of PageLoader's etc. in the web, but I can't find a script like facebook (and many other sites) uses. When a link is cliked -> user stays at current page and get's "Page loading" etc. notice until the next page is fully downloaded.In other words; When I click a link (Internet Explorer), I get first "a white page" until next page show's ..I want, that the page does not go white at all, but current page show's until the next page is fully downloaded.
View 3 Replies View Relatedhow to post dat from curent page to another php page using jquery
View 2 Replies View RelatedI have a button in my site which when clicked, will set the current page to be the home page for the user. I use the following code:
var hiddenLink = document.getElementById('dummyLink');
hiddenLink.style.behavior='url(#default#homepage)'
hiddenLink.setHomePage('http://www.123.com');
somewhere in my <body>, I have the following link definition:
<a href="#" id="'dummyLink'" style="display:none"></a>
Now, this solution works fine for IE But I need to have a working solution for Firefox and Opera too. Does anyone know how to solve this in these 2 browers?
I've got 2 pages: a current events page and a past events page the current events page loads fine as there is only about 10 events the past events page takes about 30 seconds to load and will crash if u click your mouse in the loading time.
The pages are near identical the only difference is the query that selects the events (> versus <)
The page loads immediately without:
But when i put it back in the above happens. I'm using jQuery.roundedcorners.
Is it possible, when a page is reloaded, to replace a link to a javascript in the head with a link to a different script?
View 4 Replies View RelatedIs it possible to have a link with an id within it such as
<li><a href='newpage.html' id='12'>Some title</a></li>
when you click on the link a new page html page opens and on that new page, information found in a database with the id of 12(as found in the link) will be displayed using external style sheets etc. Can this be done with html css javascript and json? P.S I know how to do this with php however I want this to be done in my mobile app so the actual page cannot be a .php page
I wanna scroll the page to a specific location at the bottom. I can get the position of the destination, but how can I know where I am on the page? I need to scroll the page from the current location to the destination slowly not at once, is that possible?
View 2 Replies View Related