I'm trying to find a way to get a url from an iframe and using javascript modify the link and move to a another page. basicly the address in the iframe is something like "http://www.somthing.com/12/somt/arr_1.htm", using the javascript I want to remove the last five character (leaving this "http://www.somthing.com/12/somt/arr_") and than add the next logical number to it (making the link this "http://www.somthing.com/12/somt/arr__2.htm").
So far I have something like this.
<script language="javascript" type="text/javascript">
function urlGen(f){
var i1 = document.getElementById("iframe_id").contentWindow.location.href;
var i2 = "1.htm";
var i3 = "2.htm";
var newURL = i1 - i2 + i3
f.action = i1 - i2 + i3
return i1 - i2 + i3;
}
</script>
So based on what I understand from what you said it should look something like this? so it should look something like this? (keep in mind I'm the forest gump of javascript... "I'm not a smart man but I know what java is")
<script language="javascript" type="text/javascript">
function urlGen(f){
var i1 = document.getElementById("iframe_id").contentWindow.location.href = newURL;
newURL = il.slice(0, -5);
var i3 = "2.htm";
f.action = newURL + i3
}
</script>