Replace / Change Links Within Iframes?

Jul 2, 2010

I've got an iframe on my page that displays my affiliate's webpages (located on their domain).

Two concerns: First, all links within the iframe reveal their domain name in the status bar and in the page source, i.e. <a href="affiliate.com/buy.htm">.

Second, the links in the iframe have target="_blank" which opens new tabs/windows, also exposing their domain to my customers.

Would it be possible to replace all instances of "affiliate.com" inside the iframe to "mysite.com"; whereas, "mysite.com" will be a proxy forwarding requests to "affiliate.com"? Keep in mind that these elements do not have ID or Class.

View 1 Replies


ADVERTISEMENT

Linking To Iframes And Change Content?

Aug 20, 2010

I'm rather new to java scripting and trying to get this done for over a week now. I'm building a complete new site (not online yet) which is done for 99,9% The site consists of:

Index - No frames - Just an entrance of the site with links
main menu
Section1 - 1 iframe ("iframe1") - default src=iframe1defaultsection1content
main menu submenu section1
Section2 - 2 iframes ("iframe1","iframe2") - default src = iframe1defaultsection2content - frame2 contains images that change

[Code]...

View 1 Replies View Related

IFrames - Change SRC To Display New Page

Nov 24, 2010

I have an Iframe and some links to different pages. I have the code set up so that it changes the "src" to display the new page. The reason I have it set this was is because I want to be able to manipulate the content in the Iframe. I want to be able to hidden a portion of the new page once it is rendered in the iframe. This is what i have so far. Basically I need my intoIframe function to execute only after the has fully executed. How I accomplish this

Code:
function completeView(){
var tds = document.getElementById("alinks");
var link = tds.getElementsByTagName("a");
for ( i=0; i<link.length - 1; i++){
if ( i > 0){
link[i].onclick = function(){
showDoc(this);
return false;
}}}}
addLoadEvent(completeView);

function showDoc(whichDoc){
if (!document.getElementById || !document.getElementsByTagName || !document.getElementById("viewer"))return false;
var source = whichDoc.getAttribute("href");
var placeholder = document.getElementById("viewer");
placeholder.setAttribute("src",source);
}

function intoIframeUP(){
if (window.frames[0] != null){ alert('Frame is here');}
var mine = window.frames[0].document.getElementsByTagName("body")[0].innerHTML;
var sharepoint = window.frames[0].document.body.innerHTML;
alert(sharepoint);
}

View 2 Replies View Related

JQuery :: Replace Part Of All The Links On A Page?

Jul 12, 2010

I tried finding a similar situation in the forums, but was unable to discover anything sepcific. I think I may be way off here, and or trying to do something bizarre, but what I am trying to do is change only part of the the url for all of the links on a page. So say I want to change:

href="/something/something/all"

to

href="/something/something/specific"

I think I need to use each() in combination with attr but I am not exactly sure how. This is what I have so far (with no luck):

$('a').each( {
$(this).attr('href').replace('all','specific');
});

I've successfully changed part of a single link based of it's enclosing div id, but if there is more than one link in the div, it replaces the entire href of all the other links in that div to be the same as the first one. So that's why I think I need to use each(). But again, I'm not sure how to do this properly in this case.

View 2 Replies View Related

JQuery :: Change Tag And Replace String.

Oct 26, 2011

I have the following plugin to "deobfuscate" an email:[code] At the moment I have two problems:

1.I want to being able to use other values than AT and DOT. So instead of having:email = email.replace(/ at /gi, "@").replace(/ dot /gi, ".");I would like to have something like:email = email.replace(/ options.At /gi, "@").replace(/ options.Dot /gi, ".");But this is not working. How can I make it work?

2.What the plugin does is replace:<span class="Email">name at domain dot com</a>[code]

View 6 Replies View Related

JQuery :: Change Of Select Replace <a> Tag

Jan 21, 2011

I have one little question.

<select name="curr" id="sel">

I need for every change of select replace <a> tag with something(href="#2", href="#3" etc.)

View 2 Replies View Related

Jquery :: Change / Replace Content Of The DIV?

Feb 23, 2011

I'm very new to javascript, I'd like to do is replace "sdfsdf" with "New Stuff".
<html xmlns="[URL]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script type ="text/javascript" src="../../js/jquery.js"></script>
<script type="text/javascript">
$('#quizResults').html('<p>New stuff</p>');
</script>
</head>
<body>
<div id="quizResults"><p>sdfsdf</p></div>
</body>
</html>

View 2 Replies View Related

Dynamic Links - How To Change Box Value

Jun 27, 2007

I have a form with several rows and each has a text box labeled 'Status'. The user should be able to change the value of Status, then click Save and a GET query will be run in an iframe without interrupting the browser window. To do this I am using a onkeydown event so the Save button's (which is an a href link) href address is changed to what is in the box. But I can't get the box's value to change! Code:

View 2 Replies View Related

Change Links In Sub Frame?

Jan 11, 2011

not entirely sure this is possible but I have a site people (owners) to use in the shop. I need to make a public accessible side using the same layout. I decided frames would work for this calling content in sub frame. The problem is 2 of the links in the content sub frame contain sensitive information. I cannot change the content or it will affect lots of other users. I cannot edit the content as it affects too many people. It does not reside on the same server.

So I need to change what happens when 2 of the links are clicked. I know the urls, can I force, maybe using code embedded in the top frame, to make 2 links go somewhere else. I.e page loads 2 frames, one is header, other is content.

If customer clicks "trade-prices.html" in the content frame they are taken somewhere else (of my choice) by code sitting in parent to prevent them seeing it. I need to prevent 2 links from opening, or force them to open another page/substitute if > then scenario would be ideal e.g if url trade-price.html link is clicked/loaded then redirect to

View 4 Replies View Related

JQuery :: Change Day Links To Webpage?

Jul 6, 2011

I am trying to make the link on each day in the calendar go to a new page on the site instead of populating a form with the current day.

For example, if you click July 6, 2011 I need it to go to /events.php?page=calendar&event-date=2011-07-06 The link shows "/events.php?page=calendar&event-date=" when you hover over it, but it does not actually link to anything. I also need to dynamically pull the date clicked into the url.

View 1 Replies View Related

Add A Code To Change Outgoing Links?

May 20, 2009

I was wondering if there was a javascript code out there that can change outgoing links. For example, lets say someone took/ripped my website. Could I have a javascript code in there that could change the outgoing links? Something that wouldn't be obvious in the code.

View 4 Replies View Related

OnMouseOver Links Change Image?

Sep 25, 2011

Im trying to make a navagation menu with images that need to be changed when someone hovers over the child category.

So lets say I have a menu that looks like this:

<img src="notactiveimagemenu1.jpg" alt="">
<ul id="menu1">
<li>link</li>
<li>link</li>

[Code]....

I know I could add onmouseover events to each li item and changing the src of the category. But Im trying to find a better solution. And I think I should be able to use document.getElementById(id).onmouseover = function() for that.

note I know I could use jquery to do all of this very easy but I consider this practice because I don't know that much javascript.

View 3 Replies View Related

Change Image And Multiple Links

Nov 22, 2011

I have 3 smaller thumbnail images and when I click on any of them, the resulting image displays in the larger image space.

The tricky part is that I want the larger image to become a link that changes, depending on which image is displaying. (I don't want the little images to be links.)

Click here [url] for a visual to explain what I am wanting to do.

Here is what I have for script...but I can't figure out the links...This script works fine, but I can't figure out how to make the larger image have 3 separate links, depending on which image is displaying in it.

View 1 Replies View Related

Change The Direction Of Where The Links Pointing

May 10, 2006

Guys I am following the DHTML Utopia book and can not get the following code to work. Can anyone suggest where I am going wrong. All I want to do is change the direction of where the links pointing.

Code:

<script type="text/javascript">
var sitepoint_link = document.getElementById('splink');
sitepoint_link.href = "http://www.google.co.uk/";
</script>

<body>
<li><a href="http://www.sitepoint.com/" id="splink">Sitepoint</a></li>
</body

View 2 Replies View Related

Change Http To Https For Links ?

Aug 27, 2010

How can I change the links for a given domain from http to https? For example: [url] would become [url]

View 2 Replies View Related

Jquery :: Add Simple String Replace To Change Each Space

Nov 14, 2011

I have an input box with a 'did you mean' box that pops up under it, and it pulls it's results from another php page, however when a term with a space in it, such as "I am" vs. "Im" is entered, it stops working. This is the code I'm using to pull the results. So I made a added a simple string replace to change each space into '+';
search = $('#search').val().replace(' ','+');
search.keyup(function() {
results.load('results.php?q=' + search);
});
But for some reason it is only changing the first space into a '+'; so for example: "Hello how are you" = "Hello+how are you". But I need it to change to "Hello+how+are+you";

View 2 Replies View Related

AJAX :: FormData Replace - Change Code That Will Work In IE

Oct 27, 2011

Code:

How i change this code that will work in IE because IE dont support FormData...i need to pass file type to php page.

View 2 Replies View Related

Little On Dinamically Change Class Of Active Links?

Mar 26, 2009

I have three links that call three functions that change a div. Now, I want to change links color when active. I made this so:

var act = "";
function doActive(obj){
obj.className='active';
if(act != undefined && obj != act){
act.className = 'off';

[Code]...

View 4 Replies View Related

Change HREF Onclick, Apply To All Links

Jul 22, 2011

Sounds simple right? Why the heck doesn't this code work?

links = document.links;
for(var i=0; i<links.length; i++)
{
links[i].onclick= "this.href = 'whatever.html'";
}

View 3 Replies View Related

Change Main Photo When You Click On Links?

Jan 13, 2011

I'm trying to add a very simple gallery where the photo is at the top and thumbnails are underneath. All I want to happen is that the photo changes when you click on one of the thumbnails. I've been trying to search for this but the galleries all seem to have stuff I don't want.I tried the following and it does change the image but it also opens up the thumbnail.

Code:
<img id="im" src="photos/039.jpg">
<a href="photos/t001.jpg" onclick="document.getElementById('im').src='photos/001.jpg'"><img src="photos/t001.jpg"></a>

View 7 Replies View Related

JQuery :: .replace - In Internet Explorer The Text Doesn't Change ?

Aug 18, 2009

I'm having a bit of an issue with the site I'm building at the moment. It's currently under [url] with the CSS at [url] and the relevant jQuery file at [url] If you're using Firefox or Chrome you'll see that upon clicking the tabs, the image and text all changes. However in Internet Explorer the text doesn't change, it merely adds onto itself (This will be a lot clearer if you check it out on the site.)

View 2 Replies View Related

JQuery :: Change Image In A Div Through Clicking Links On A Page?

Dec 19, 2010

I'm relatively new to jQuery, and I'm trying to figure out how to create a restaurant menu, that when you click on an item on this menu, an image and description will show on the page. [URL]I've looked through several plugins but cannot find this exact solution. Can anyone please point me in the right direction?

View 2 Replies View Related

Change The Red Code To Create Links For The Relevant Records Which Works In IE?

Apr 21, 2011

Below is a javascript function from my website that loops through nodes in an XML file retrieving certain information about those who joined in the current month/year. The part in red creates a link which when clicked runs a function called show() with the relevant i variable value e.g. show(2) for the second node if that is relevant. Anyway the red part works in Chrome but not Internet Explorer (surprise surprise). I did some research which says that .setattribute is not allowed in IE. How can I change the red code to create links for the relevant records which works in IE?

[Code]...

View 2 Replies View Related

Get Links To Change The External File Currently On The Main Page Without Reloading?

Nov 26, 2004

I am in a bit of a rut in the self-teaching with JS. I am trying to get links to change the external js file currently on the main page without reloading, the external files are basically long document.write sections with a few interactive functions.

The closest I have found for help with this so far is a rotating script, but I want a manual change from a link (button, image, etc) instead of timeOut rotation. I am not sure what I need to do for the links to replace the timeout function to change the dynamic section.

View 4 Replies View Related

JQuery :: Change YouTube And Yahoo Video Links To Embedded Players?

Dec 27, 2009

Looks at each paragraph and converts youtube and yahoo video links to embedded players.Example

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

[code]....

View 1 Replies View Related

Existing Script - Change All My Links To External Sites To Open In A New Window

Jun 29, 2011

I have the existing code that will change all my links to external sites to open in a new window. I now want to change it to allow me to have a way that it will not do this if I put something special in the a href tag.

Code:

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved