JQuery :: Target Anchors From A Link On A Different Page?
Sep 3, 2010
Using cycle "pager" to call anchors with buttons within ONE page. but, i'm also trying to call these same anchors to show up when referenced on that same page, but from a link on a different page.
I can't seem to get the external page link to go-to the proper anchor on the destination page. I've tried the simple:
<a href="http://website/womens-apparel#">Womens Apparel</a> (traditionally, this would go right to the destination anchor on the targeted page)
I've also tried to set an ID to each anchor in the the destination div, but it won't reference it.
View 1 Replies
ADVERTISEMENT
Feb 16, 2011
Basically, I have a link that should open the targeted link in a blank page, and upon the link being clicked, the original page's URL should be changed. The reason for this is that the user has to browse information on another website, and then pass the information on to me via a contact form, so rather than make them click back on my tab in the browser, and then find the "Contact" page link to fill in the form, I thought it would a good feature to simply go ahead and load the "Contact" page upon them clicking the link to the external page (which of course loads in a new tab). Here is the code I have in place:
Code JavaScript:
<a href="http://www.othersite.com/" target="_blank" onclick="window.location.href='http://www.mysite.com/contactus.php';">Other Site</a>
This all works fine on my computer, regardless of the browser that I use. One of my partners on this project called me this morning and said that the link was taking him directly to the "Contact" page without opening the "Other Site." This is strange because after I put this in place, I showed it to him and it worked fine. Now, a few days later, and it does not work. He said that he cleared his browser cache, history, cookies, etc. and the problem did not go away. He uses IE8. After he told me it was no longer working, I went to test it myself, and it works fine for me no matter which browser I use (IE8 or 9, Firefox 3 or 4 Beta).
why this might have worked one day and not the next? Is it simply a problem on his computer, or could it be an issue where based on what type of browser you are using, this won't work. Also, I know this is the JavaScript forum, but is there a way to do this in PHP without using the JavaScript onclick event? Obviously, I can't use the header() function since this functionality needs to be present on a link within text of a page.
View 2 Replies
View Related
Sep 3, 2010
I have Cycle "pager" navigation working flawlessly in one of my pages. What i'm trying to do is this:
I'm Attempting to LINK to specific Anchors from a link on a different page.
Example:
// external page link //
<a href="http://www.convertstyle.com/beta/apparel/womens-apparel#shirt1">Headline Womens</a>
[Code]....
View 1 Replies
View Related
Jan 26, 2006
I have an image map at the top of my page and when you click on a certain section of the map it reloads the page to get some differnet data and displays it below the image map. Is there way through javascript (or other means) to automatically scroll the page to below the image map when the page reloads? I treid using some inpage anchor tags but those only seemed to work when you clicked on them, not automatically when the page reloaded.
View 2 Replies
View Related
Sep 20, 2009
I need a page to scroll to the top when visited, without using HTML anchors. Is this possible with JavaScript?
View 1 Replies
View Related
Jan 21, 2011
Im just wondering if anyone knows how to create a dropdown menu which lists all anchors on that page dynamically?
View 3 Replies
View Related
Mar 24, 2011
I am using the following javascript on the target page to open it as top location from within an iframe, which is working ok.
<script type="text/javascript">
if(self!=top) {
top.location.href=location.href
}
</script>
However my problem occurs when the user uses the browsers back arrow to return to the previous page, the script executes again returning them once more to the page they have come from. Is anyone aware of a work around to this problem as it would seem there isn't one? perhaps even a better solution for opening the target page from the iframe as top location. This is really causing confusion for users, and I really need to get the issue fixed.
View 2 Replies
View Related
Feb 5, 2005
Does anyone know how to target a link to a div tag. Basically instead of using an iframe, im using a div tag with overflow, and I want to have it so when a link is clicked, that href is loaded in the div tag..
View 1 Replies
View Related
Dec 25, 2006
I read a thread on this forum about double target links. People said that the only way to do this was to make a java script, and so i did. This is how i did: Code:
View 1 Replies
View Related
Feb 28, 2010
I have a php page which uses the following javascript code to open another page (The users profile page) and alos carry over the userID (dUid)
var userProfileUrl = chatProfileUrl+dUid.replace(/_/gi,"");
document.getElementById('userdetails').innerHTML += "<span class='userinfo' onClick="window.open('"+userProfileUrl+"','"+dUid+"')"><img id='profile' style='cursor:pointer;vertical-align:middle;padding-top:4px;' src=images/zoom.png> View Profile</span></br>";
I wanted to add to the menu another image link so I copied the same coding, but I do not know where to place the URL target that I want opened. I know I want the userID (dUid) also to follow this link as well. If I want the coding below to act in the same manner as the coding above, but instead open a page called /gift.php, where do I set the Url?
document.getElementById('userdetails').innerHTML += "<span class='userinfo' onClick="window.open('"+userProfileUrl+"','"+dUid+"')"><img id='profile' style='cursor:pointer;vertical-align:middle;padding-top:4px;' src=images/gift.png> Send Gift</span></br>";
View 2 Replies
View Related
Nov 27, 2005
My goal is to have a simple navigation/menu at the top of the site, where depending on a selection from the navigation (in most cases by selection) the selection would pull up or "call up" a theme image in window A or IFRAME A, which resides side by side to window B or IFRAME B which will also populate at the same time with content to coincide with the theme image (IFRAME A).
Basically I want to encapsulate all the content with a certain sizing of the browser window ... IFRAME A would stay static and would not scroll in any direction so the theme image would stay resident and visible next to IFRAME B which may--or may not require vertical scrolling. Code:
View 2 Replies
View Related
Apr 12, 2007
Code:
<a href="#" onclick="window.location='http://YourSite.com'">click here</a>
I want to make it so that it opens a new normal browser window just like target=_blank does.
View 3 Replies
View Related
Jul 30, 2010
I have an unordered list of hyperlinks present in a right sidebar on each page where each list item is a specific topic. For example:
Drunk Driving
Homicide
Rape
Molestation
Etc.
Right now each of these simply hyperlinks to a page that contains a similar list with a few additions and those list items utilize the .load function to draw an external page for each topic into a div located below the list.
So, the sidebar list currently just links to 'crime.html' and 'crime.html' has a JQuery .load functionality built into the list of crimes that summons the respective topic pages into the target div. What I want to do is figure out a way where IF they click on one of the sidebar list items it takes them to the 'crime.html' and displays the specific topic they clicked on automatically in the target div. Right now anytime they click on the sidebar links (any of them) they merely take the person to the 'crime.html' page where would then have to select the topic again from the list that's present which then summons.. yep.. the external file into the target div. So, trying to eliminate that need for the 2nd click.
Here's the code I have on the 'crime.html' page that summons the external pages into the target div and provides some animation (fade in, out):
$(document).ready(function() {
$('#crimecontent').load('prostitution.html');
$('.crimes li a').click(function() {
var toLoad = $(this).attr('href');
[Code].....
Notice they all point to crime.html since I don't know how I can pass a specific topic to display. Therefore, they have to click again when they get to crime.html.
View 10 Replies
View Related
Aug 6, 2010
I need to target a certain div and all its links and on click of any of those links load a tracking page in an iframe. Right now, if this function can just load the same file into that iframe, that will be great. In the future, if I could loop through all the links and get their name attribute (which will have the specific link to an individual tracking file), and load that into the iframe, this would be the most desirable.
View 1 Replies
View Related
Apr 28, 2011
I'm trying to read the substring of a url so when the page loads up, it would know if it needs toimmediatelyjump to another tab.So a user clicks a link like this:[URL] On that page, there are already functions listening for click events on objects with a class names like "gotoTab2".So all I really need is for jquery to check if there's a '#something' in the url when the page loads up, and if so execute a 'click' on that substring as if it was a class.
View 3 Replies
View Related
Apr 7, 2011
I'm sure the answer to this question has to do with iterating over each element in the wrapped set, but I still don't understand why. I have a number of anchors in my page that have a class named Get.I want to append a querystring name value pair to the end of each href.
$(
'.Get').attr('href').append('&id=' + id); does not work. Can someone tell me why and what is the correct solution.
View 6 Replies
View Related
Jul 26, 2010
I've tried this code to get all anchors that have a title attribute but it does not work
The strange thing is also that if I take away the a selector in front of :has all elements in the whole document get selected.
View 4 Replies
View Related
Nov 16, 2010
I am trying to select all anchors that point to external links and do not contain images (so that I can append an image indicating such). The first in this multistage process is to select anchors that have href values beginning with "http" but it appears that .attr() sets the value, as opposed to retrieving it.
View 5 Replies
View Related
Dec 1, 2010
I'm using the jQuery Cycle plugin to build a slideshow that the main image is wrapped in an anchor and also has the thumbnailnavigation. I basically have the same code from the demo page of jQuery Cycle. Once I wrapped the images in a link the thumbnails broke. I have tried dropping the "slide.src" for $('#slideshow img).attr('src') but that still comes back as undefined.
$('#slideshow').before('<ul id="slideshow-nav">').cycle({
fx: 'fade',
speed: 'slow',
[code]....
View 4 Replies
View Related
Feb 7, 2011
I have problem with aniamate function. It doesn't works with colors and anchors.
$(this).animate({ backgroundColor: "black" }, 1000);
with sizes like 'width', everything is ok.
View 2 Replies
View Related
Oct 6, 2007
How do I find the length of page in target iframe?
I am looking for the code or give me idea to find the length
View 4 Replies
View Related
Jan 23, 2010
I am using the following sample code. I only telling u concept what the code looks like ... it may have single or two errors so igore them. code...
<p>here huge text is written so that the href tag goes very bottom of the page so that iframe is not seen while clicking on ...
Now my question is that how can i automatically scroll the browser slider to the top of the page when i click on href. Notice that when i click on href the control first goes to the file myfile.php
View 2 Replies
View Related
Sep 13, 2010
I need this iframe for a facebook tab, since they changed the width to 520px. The original page in the iframe is 700px wide, and I've changed a few CSS properties using the frameReady plugin. It's works just fine, but trouble starts, when i'm navigating the target site, the CSS properties I've changed goes back to the original props.
[Code]...
Try clicking any of the 'view on map' links, then you'll see where I'm getting at.
How could I work around this? Can I make it apply the script every time something new loads into the iframe?
View 10 Replies
View Related
Jun 15, 2010
I know next to nothing about javascript and I don't even know if this is possible. I need to target window.location.href to an iframe on a different page. So, right now, the piece of the code that redirects the browser looks like this: window.location.href='http://www.somewhere.com/'; Works great, brings it up in the same browser window. So now I need to modify the code so it goes to a different page and brings that page up in a specified iframe.
View 6 Replies
View Related
Jun 29, 2000
When you right click on a link you get the option to save target as...(ie) and save link as...(netscape). Is there some JavaScript to call this function like the JavaScript to open a new window?
View 3 Replies
View Related
May 19, 2011
i want to submit form data from the popup window, close the popup, and load in the main window. problem is, it always opens a new 'tab'. i'm using google chrome, i didn't think to try this in
in the <head> of the 'main' window:
<script language='javascript' type='text/javascript'>
window.name='main';
</script>
[Code]....
View 4 Replies
View Related