• 0

[Javascript/jQUERY] Edit iframe Src


Question

13 answers to this question

Recommended Posts

  • 0

This should work:

<a href="#" id="button">hello</a>
		<iframe src="https://www.yahoo.com/" id="iframe"></iframe>
		&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>&lt;script type="text/javascript"&gt;
		$(document).ready(function(){
		$('#button').click(function(){
			$('#iframe').attr('src', 'http://www.google.com/');
			return false;
		});
});
		&lt;/script&gt;

You just set the source attribute by using attr('attribute-to-set', 'value-to-set-to') if you're using jQuery of course.

  • 0

Does this work?

var iframeURL = $('#iframe').attr('src');//gets the iframe's current url
var newURL = iframeURL + "&amp;q=awesome";//creates a new url with the old url
$('#iframe').attr('src', newURL );//sets the new url

If you need do some url parsing to actually find the value of 'wat' then this should help with that: http://www.idealog.us/2006/06/javascript_to_p.html

  • 0

Ok. It failed, and I tried getting some other guys to help, but that sort of failed. They got most of it except it has one problem, so its all good except for that, and they aren't replying

Here's what I have

  David Diaz said:
Ok. Here is my full source.

index.html

&lt;iframe src="urgent copy.html" name="lolwat" width="320" height="480"&gt;&lt;/iframe&gt;&lt;!-- iFrame, general one. With all the contents. note this will affect iframe_a--&gt;
&lt;iframe id="iframe_a" name="iframe_a" width="500" height="300" src="lolwat"&gt;&lt;/iframe&gt;&lt;!-- iFrame_a--&gt;

urgent copy.html

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">;html xmlns="http://www.w3.org/1999/xhtml">t;head&gt;
&lt;meta content="yes" name="apple-mobile-web-app-capable" /&gt;
&lt;meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /&gt;
&lt;meta content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" name="viewport" /&gt;
&lt;link href="css/style.css" rel="stylesheet" type="text/css" /&gt;
&lt;script src="javascript/functions.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="javascript/jquery-1.3.2.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="javascript/jquery.cookie.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;title&gt;Login&lt;/title&gt;
&lt;meta content="keyword1,keyword2,keyword3" name="keywords" /&gt;
&lt;meta content="Description of your site" name="description" /&gt; 
&lt;/head&gt;
&lt;body&gt;
&lt;div id="topbar"&gt;
	&lt;div id="title"&gt;
		Login&lt;/div&gt;
&lt;/div&gt;
&lt;div id="content"&gt;
	&lt;ul class="pageitem"&gt;
		&lt;li class="textbox"&gt;&lt;span class="header"&gt;iPBADMiN&lt;/span&gt;&lt;p&gt;Welcome to the 
		iPBADMiN application! Please Login to continue.&lt;/p&gt;
		&lt;/li&gt;
		&lt;li class="menu"&gt;&lt;a href="cntlogin.html">lt;img alt="list" src="thumbs/help.png" /&gt;&lt;span class="name"&gt;Can't Login?&lt;/span&gt;&lt;span class="arrow"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
		&lt;span class="graytitle"&gt;Login&lt;/span&gt;
		&lt;ul class="pageitem"&gt;
			&lt;form id='form' method="post" action="#dontclickthis" target="iframe_a"&gt;&lt;!-- goes to jQuery function to redirect iframe_a, as the target shows.--&gt;
			&lt;input type='hidden' name='qstring' id='qstring' value='' /&gt; &lt;!-- Required for Admin Login, I think--&gt;
			&lt;li class="form"&gt;&lt;input placeholder="Admin Username" type="text" id='username' name="username" /&gt;&lt;/li&gt;&lt;!-- Username--&gt;
			&lt;li class="form"&gt;&lt;input placeholder="Admin Password" type="password" id='password' name="password" /&gt;&lt;/li&gt;&lt;!--Password--&gt;
			&lt;li class="form"&gt;&lt;input placeholder="Location of Admin Area" type="text" name="website" value="" id='website' /&gt;&lt;/li&gt;&lt;!--Location of site to redirect to in iframe_a. note this does not affect the current iFrame. also note the id and the script below--&gt;
			&lt;li class="form"&gt;
			&lt;input type="submit" value="Log In" /&gt;&lt;/li&gt;&lt;/form&gt;
		&lt;/ul&gt;
&lt;script language=javascript&gt;window.location.replace("urgent.html");</script>

urgent.html

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">;html xmlns="http://www.w3.org/1999/xhtml">t;head&gt;
&lt;meta content="yes" name="apple-mobile-web-app-capable" /&gt;
&lt;meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /&gt;
&lt;meta content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" name="viewport" /&gt;
&lt;link href="css/style.css" rel="stylesheet" type="text/css" /&gt;
&lt;script src="javascript/functions.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;title&gt;Title of your site&lt;/title&gt;
&lt;meta content="keyword1,keyword2,keyword3" name="keywords" /&gt;
&lt;meta content="Description of your site" name="description" /&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div id="topbar"&gt;
	&lt;div id="title"&gt;
		Urgent&lt;/div&gt;
&lt;/div&gt;
&lt;div id="content"&gt;
	&lt;ul class="pageitem"&gt;
		&lt;li class="textbox"&gt;&lt;span class="header"&gt;iPBADMiN&lt;/span&gt;&lt;p&gt;Welcome to the 
		iPBADMiN application!&lt;/p&gt;
		&lt;/li&gt;
		&lt;li class="menu"&gt;&lt;a href="changelog.html">lt;img alt="changelog" src="thumbs/start.png" /&gt;&lt;span class="name"&gt;Changelog&lt;/span&gt;&lt;span class="arrow"&gt;&lt;/span&gt;&lt;/a&gt;
		&lt;li class="menu"&gt;&lt;a href="credits.html">lt;img alt="changelog" src="thumbs/contacts.png" /&gt;&lt;span class="name"&gt;Credits&lt;/span&gt;&lt;span class="arrow"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li class="menu"&gt;&lt;a href="urgent.html">lt;img alt="changelog" src="thumbs/help.png" /&gt;&lt;span class="name"&gt;Reload Spring for pop-up&lt;/span&gt;&lt;span class="arrow"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;span class="graytitle"&gt;Urgent&lt;/span&gt;&lt;ul class="pageitem"&gt;
		&lt;li class="menu"&gt;&lt;a class="noeffect" onclick="iWebkit.popup('popup1')">lt="list" src="thumbs/settings.png" /&gt;&lt;span class="name"&gt;PERFORMANCE MODE&lt;/span&gt;&lt;span class="arrow"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li class="menu"&gt;&lt;a class="noeffect" onclick="iWebkit.popup('popup3')">lt="music" src="thumbs/settings.png" /&gt;&lt;span class="name"&gt;TURN BOARD ON/OFF&lt;/span&gt;&lt;span class="arrow"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li class="menu"&gt;&lt;a href="featurefiles/ban.html">lt;img alt="music" src="thumbs/settings.png" /&gt;&lt;span class="name"&gt;BAN/FLAG USERS&lt;/span&gt;&lt;span class="arrow"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li class="menu"&gt;&lt;a href="featurefiles/rc.html">lt;img alt="music" src="thumbs/settings.png" /&gt;&lt;span class="name"&gt;Report Center&lt;/span&gt;&lt;span class="arrow"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li class="menu"&gt;&lt;a href="featurefiles/diag.html">lt;img alt="music" src="thumbs/settings.png" /&gt;&lt;span class="name"&gt;View Diagnostics&lt;/span&gt;&lt;span class="arrow"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/div&gt;
&lt;div id="cover" class="nocover"&gt;
&lt;/div&gt;
&lt;div id="popup1" class="popup"&gt;
	&lt;div id="frame" class="confirm_screen"&gt;
		&lt;span&gt;Performance Mode&lt;/span&gt;&lt;a href="java script: locationJump();" id="perf"&gt;&lt;span class="red"&gt;Activate/Deactivate&lt;/span&gt;&lt;/a&gt;&lt;a class="noeffect" onclick="iWebkit.closepopup(event)"&gt;&lt;span class="black"&gt;Close&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
		&lt;script type="text/javascript" src="javascript/jquery-1.3.2.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
		function locationJump() {
var url = document.getElementById('iframe_a').src;
document.getElementById('iframe_a').src = url + "&amp;app=core&amp;&amp;module=tools&amp;section=performance&amp;do=toggle";
}
&lt;/script&gt;
&lt;/div&gt;
&lt;div id="popup3" class="popup"&gt;
	&lt;div id="frame" class="confirm_screen"&gt;
		&lt;span&gt;Turn Board On/Off&lt;/span&gt;&lt;a href="storelist.html"><spans="red"&gt;On / Off&lt;/span&gt;&lt;/a&gt;&lt;a class="noeffect" onclick="iWebkit.closepopup(event)"&gt;&lt;span class="black"&gt;Close&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div id="footer"&gt;
	&lt;!-- please keep this line of text for three reasons: to help us, to thank us and just because it is cool--&gt;
	&lt;a class="noeffect" href="http://iwebkit.net">PoweredWebKit&lt;/a&gt;&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;

javascript/functions.js

var iWebkit;if(!iWebkit){iWebkit=window.onload=function(){iWebkit.checkboxHeight="25";iWebkit.radioHeight="25";iWebkit.autolistNumVisible=10;function b(){var d=document.getElementsByTagName("a");for(var e=0;e&lt;d.length;e++){if(d[e].className.match("noeffect")){}else{dk=function(){window.location=this.getAttribute("href");return false}}}}function c(){window.scrollTo(0,0.9)}iWebkit.popup=function(){window.scrollTo(0,9999);var e=document.getElementById(arguments[0]);var f=e.getElementsByClassName("confirm_screen")[0];f.className="confirm_screenopen";var d=document.getElementById("cover");d.className="cover";d.style.height=document.height+"px"};iWebkit.closepopup=function(){var e=arguments[0].toElement;var f=false;do{e=e.parentNode;if(e.tagName.toLowerCase()=="div"&amp;&amp;e.className.toLowerCase()=="popup"){f=true;break}}while(e.parentNode);if(f===false){return false}var g=e.getElementsByClassName("confirm_screenopen")[0];g.className="confirm_screenclose";var d=document.getElementById("cover");d.className="nocover";d.style.height=0};function a(){var g=document.getElementsByTagName("ul");for(var f=0;f&lt;g.length;f++){var h=g[f];if(h.getAttribute("class").search(/(autolist)/)===-1){continue}var d=h.getElementsByTagName("li");if(d.length&lt;=iWebkit.autolistNumVisible){continue}h.numitems=d.length;h.visibleitems=0;var e=h.getElementsByClassName("autolisttext")[0];e.onclick=function(i){var j=this.parentNode;j.showItems(j.visibleitems+iWebkit.autolistNumVisible);return false};h.showItems=function(l){var j=this.getElementsByTagName("li");var m=0;for(var k=0;k&lt;j.length;k++){j[k].className=j[k].className.replace(/hidden/g,"");if(k&gt;=l){j[k].className=j[k].className+" hidden"}else{m+=1}}this.visibleitems=m;e.className=e.className.replace(/hidden/g,"");if(m&gt;=(j.length-1)){e.className=e.className+" hidden"}};h.showItems(iWebkit.autolistNumVisible)}}iWebkit.init=function(){b();c();a();var h=document.getElementsByTagName("input"),j=[],g,i,k;for(var f=0;f&lt;h.length;f++){if(h[f].type==="checkbox"||h[f].type==="radio"){j[f]=document.createElement("span");j[f].className=h[f].type;if(h[f].checked){if(h[f].type==="checkbox"){var e="0 -"+(iWebkit.checkboxHeight*2)+"px";j[f].style.backgroundPosition=e}else{e="0 -"+(iWebkit.radioHeight*2)+"px";j[f].style.backgroundPosition=e}}h[f].parentNode.insertBefore(j[f],h[f]);h[f].onchange=iWebkit.clear;j[f].onmouseup=iWebkit.check;document.onmouseup=iWebkit.clear}}h=document.getElementsByTagName("select");for(f=0;f<h.length;f++){if(h].getElementsByTagName("option");k=i[0].childNodes[0].nodeValue;g=document.createTextNode(k);for(var d=0;d&lt;i.length;d++){if(i[d].selected){g=document.createTextNode(i[d].childNodes[0].nodeValue)}}j[f]=document.createElement("span");j[f].className="select";j[f].id="select"+h[f].name;j[f].appendChild(g);h[f].parentNode.insertBefore(j[f],h[f]);h[f].onchange=iWebkit.choose}}};iWebkit.pushed=function(){var d=this.nextSibling;if(d.checked&amp;&amp;d.type==="checkbox"){this.style.backgroundPosition="0Webkit.checkboxHeight*3+"px"}else{if(d.checked&amp;&amp;d.type==="radio"){this.style.backgroundPosition="0Webkit.radioHeight*3+"px"}else{if(!d.checked&amp;&amp;d.type==="checkbox"){this.style.backgroundPosition="0Webkit.checkboxHeight+"px"}else{this.style.backgroundPosition="0Webkit.radioHeight+"px"}}}};iWebkit.check=function(){var f=this.nextSibling;if(f.checked&amp;&amp;f.type==="checkbox"){this.style.backgroundPosition="0.checked=false}else{if(f.type==="checkbox"){this.style.backgroundPosition="0Webkit.checkboxHeight*2+"px"}else{this.style.backgroundPosition="0Webkit.radioHeight*2+"px";var g=this.nextSibling.name;var e=document.getElementsByTagName("input");for(var d=0;d&lt;e.length;d++){if(e[d].name===g&amp;&amp;e[d]!==this.nextSibling){e[d].previousSibling.style.backgroundPosition="0}f.checked=true}};iWebkit.clear=function(){var e=document.getElementsByTagName("input");for(var d=0;d&lt;e.length;d++){if(e[d].type==="checkbox"&amp;&amp;e[d].checked){e[d].previousSibling.style.backgroundPosition="0Webkit.checkboxHeight*2+"px"}else{if(e[d].type==="checkbox"){e[d].previousSibling.style.backgroundPosition="0lse{if(e[d].type==="radio"&amp;&amp;e[d].checked){e[d].previousSibling.style.backgroundPosition="0Webkit.radioHeight*2+"px"}else{if(e[d].type==="radio"){e[d].previousSibling.style.backgroundPosition="0}}}};iWebkit.choose=function(){var e=this.getElementsByTagName("option");for(var f=0;f&lt;e.length;f++){if(e[f].selected){document.getElementById("select"+this.name).childNodes[0].nodeValue=e[f].childNodes[0].nodeValue}}};iWebkit.init()}};

css/style.css

Ԫ?body{position:relative;margin:0;-webkit-text-size-adjust:none;min-height:416px;font-family:helvetica,sans-serif;background:url("../images/background.png"),url('../images/menutouched.pngeat;-webkit-touch-callout:none}.center{margin:auto;display:block}img{border:0}a:hover span.arrow{background-position:0 -13px!important}#topbar{position:relative;left:0;top:0;height:44px;width:auto;background:url("../images/header.png") repeat;margin-bottom:13px}#title{position:absolute;top:0;left:0;right:0;padding:0 10px;text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;height:44px;line-height:44px;font-weight:bold;color:#FFF;text-shadow:rgba(0,0,0,0.6) 0 -1px 0;font-size:16pt}#content{width:100%;position:relative;min-height:250px;margin-top:10px;height:auto;z-index:0;overflow:hidden}#footer{text-align:center;position:relative;margin:20px 10px 0;height:auto;width:auto;bottom:10px}#footer a,#footer{text-decoration:none;font-size:9pt;color:#4C4C4C;text-shadow:#FFF 0 1px 0}.pageitem{-webkit-border-radius:8px;background-color:#fff;border:#878787 solid 1px;font-size:12pt;overflow:hidden;padding:0;position:relative;display:block;height:auto;width:auto;margin:3px 9px 17px;list-style:none}.textbox{padding:5px 9px;position:relative;overflow:hidden;border-top:1px solid #878787}.textbox p{margin-top:2px;color:#000;margin-bottom:2px;text-align:justify}.textbox img{max-width:100%}.textbox ul{margin:3px 0 3px 0;list-style:circle!important}.textbox li{margin:0!important}.pageitem li:first-child{border-top:0}li.menu,li.form{position:relative;list-style-type:none;display:block;height:43px;overflow:hidden;border-top:1px solid #878787;width:auto}ul.pageitem li:first-child:hover,.pageitem li:first-child a,li.form:first-child input[type=radio],li.form:first-child select,li.form:first-child input[type=submit],li.form:first-child button,li.form:first-child input[type=reset]{-webkit-border-top-left-radius:8px 8px;-webkit-border-top-right-radius:8px 8px}ul.pageitem li:last-child:hover,.pageitem li:last-child a,li.form:last-child input[type=radio],li.form:last-child select,li.form:last-child input[type=submit],li.form:last-child button,li.form:last-child input[type=reset]{-webkit-border-bottom-left-radius:8px 8px;-webkit-border-bottom-right-radius:8px 8px}li.menu:hover{background:url("../images/menutouched.pngpeat-x #0274ee}li.menu a:hover span.name,li.menu a:hover span.comment,li.store:hover .starcomment,li.store:hover .name,li.store:hover .comment,body.list li.withimage a:hover .comment{color:#fff}li.menu a:hover span.comment{color:#CCF}li.menu a{display:block;height:43px;width:auto;text-decoration:none}li.menu a img{width:auto;height:32px;margin:5px 0 0 5px;float:left}li.menu span.name{margin:11px 0 0 7px;width:auto;color:#000;font-weight:bold;font-size:17px;text-overflow:ellipsis;overflow:hidden;max-width:75%;white-space:nowrap;float:left}li.menu span.comment{margin:11px 30px 0 0;width:auto;color:#000;font-size:17px;text-overflow:ellipsis;overflow:hidden;max-width:75%;white-space:nowrap;float:right;color:#324f85}li.menu span.arrow,li.store span.arrow,body.musiclist span.arrow,body.list span.arrow{position:absolute;width:8px!important;height:13px!important;right:10px;top:15px;margin:0!important;background:url("../images/arrow.png0 no-repeat}li.store{height:90px;border-top:#878787 solid 1px;overflow:hidden;position:relative}li.store a{width:100%;height:90px;display:block;background:url("../images/storebg.png") left top no-repeat;text-decoration:none;position:absolute}li.store:hover{background:url("../images/storetouched.pngpeat-x #0274ee}li.store .image{position:absolute;left:0;top:0;height:90px;width:90px;display:block;background:url('../images/storetouched.png') no-repeat}li:first-child.store .image,li.store:first-child a{-webkit-border-top-left-radius:8px 8px}li:last-child.store .image,li.store:last-child a{-webkit-border-bottom-left-radius:8px 8px}li.store .name{font-size:15px;white-space:nowrap;margin:5px 0 0 95px;display:block;overflow:hidden;color:#000;max-width:60%;text-overflow:ellipsis;font-weight:bold;white-space:nowrap;text-overflow:ellipsis}li.store .comment,body.list li.withimage .comment{font-size:12px;color:#7f7f7f;margin:16px 0 0 95px;display:block;width:60%;font-weight:bold;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}li.store .arrow,body.list li.withimage .arrow{top:39px!important}li.store .stars{margin:6px 0 0 95px}li.store .starcomment{position:absolute;left:165px;top:56px;font-size:12px;color:#7f7f7f;font-weight:lighter}.graytitle{position:relative;font-weight:bold;font-size:17px;right:20px;left:9px;color:#4C4C4C;text-shadow:#FFF 0 1px 0;padding:1px 0 3px 8px}.header{display:block;font-weight:bold;color:rgb(73,102,145);font-size:12pt;margin-bottom:6px;line-height:14pt}body.musiclist div#content{width:auto;margin:-29px auto auto -40px}body.musiclist div#content ul{background:url("../images/musiclistbg.png") repeat}body.musiclist div#content ul li{list-style:none;height:44px;width:auto;border-bottom:1px solid #e6e6e6;position:relative}body.musiclist div#content ul li a{text-decoration:none;color:#000;width:100%!important;height:100%;display:block}body.musiclist ul li .number,body.musiclist .name,body.musiclist .time{display:inline-block;height:44px;font-weight:bold;font-size:large;width:44px;text-align:center;line-height:46px}body.musiclist ul li .name{margin-left:0;width:auto!important;font-size:medium;padding-left:5px;border-left:solid 1px #e6e6e6}body.musiclist ul li .time{color:#848484;font-size:medium;margin-left:4px;width:auto!important;font-weight:normal}body.musiclist{background-image:none!important;background-color:#cbcccf}body.musiclist ul li span.name{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:62%}body.list ul li.title{background:url("../images/listheader.gifpeat-x;height:22px!important;width:100%;color:#fff;font-weight:bold;font-size:16px;text-shadow:gray 0 1px 0;line-height:22px;padding-left:20px;border-bottom:none!important}body.list ul{background-color:#fff;width:100%;overflow:hidden;padding:0;margin:0}body.list div#content li{height:40px;border-bottom:1px solid #e1e1e1;list-style:none}body.list{background-color:#fff;background-image:none!important}body.list div#footer{margin-top:24px!important}body.list div#content li a{padding:9px 0 0 20px;font-size:large;font-weight:bold;position:relative;display:block;color:#000;text-decoration:none;height:32px}body.list div#content li a span.name{text-overflow:ellipsis;overflow:hidden;max-width:93%;white-space:nowrap;display:block}body.list div#content li a:hover{color:#fff}body.list div#content li a:hover{background:url("../images/menutouched.png") repeat-x}body.list div#content{margin-top:-13px!important}body.list ul img{width:90px;height:90px;position:absolute;left:0;top:0}body.list li.withimage{height:90px!important}body.list li.withimage span.name{margin:13px 0 0 90px;text-overflow:ellipsis;overflow:hidden;max-width:63%!important;white-space:nowrap}body.list li.withimage .comment{margin:10px auto auto 90px !important;max-width:63%!important}body.list li.withimage a,body.list li.withimage:hover a{height:81px!important;background:url("../images/storebg.png") left top no-repeat!important}body.list li.withimage:hover{background-image:url("../images/storetouched.png")}.confirm_screen{position:absolute;bottom:0;-webkit-transform:translate(0,100%);-webkit-transition-property:-webkit-transform;background-image:url("../images/popup-bg.png");opacity:0}.confirm_screenopen{position:absolute;opacity:0.8;overflow:hidden;bottom:-100%;width:100%;background:url("../images/popup-bg.png-webkit-transition-duration:0.8s;-webkit-transition-property:-webkit-transform;-webkit-transform-style:preserve-3d;-webkit-transform:translate(0,0);text-align:center;z-index:99999}.confirm_screenopenfull{position:absolute;opacity:0.8;overflow:hidden;bottom:-100%;width:100%;background:url("../images/popup-bg.png") repeat-x #4e545f;-webkit-transition-duration:0.8s;-webkit-transition-property:-webkit-transform;-webkit-transform-style:preserve-3d;-webkit-transform:translate(0,45px);text-align:center;z-index:99999}.confirm_screenclose{-webkit-transition-duration:1.2s;-webkit-transition-property:-webkit-transform;-webkit-transform-style:preserve-3d;position:absolute;opacity:0.8;overflow:hidden;bottom:-100%;width:100%;background:url("../images/popup-bg.png") repeat-x #545A67;text-align:center;-webkit-transform:translate(0,150%)}.confirm_screenopen span,.confirm_screenclose span,.confirm_screenopenfull span,.confirm_screenclosefull span{margin:10px 0 20px;font-size:17px;color:#fff;width:100%;height:10px;text-shadow:rgba(0,0,0,1) 0 -1px 0;display:block}.popup{position:absolute;bottom:0;width:100%;left:0;z-index:9999}.cover{width:100%;position:absolute;top:0;z-index:9998;opacity:0.4;left:0;background-color:#000}.nocover{opacity:0;background-image:url('../images/bluebutton.png'),url('../images/darkredbutton.png')}#frameration:none;display:block;width:90%;margin-left:auto;margin-right:auto;margin-bottom:-15px;margin-top:0}#frame span.black,#frame span.red,#frame span.gray{display:block;height:46px;border-width:0 14px;width:auto;background-repeat:no-repeat;line-height:46px;font-size:large;opacity:1;font-weight:bolder;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-family:Arial,Helvetica,sans-serif}#frame span.black{-webkit-border-image:url("../images/graybutton.png14 0 14;color:#fff}#frame span.red{-webkit-border-image:url("../images/redbutton.png14 0 14;color:#fff}#frame span.gray{-webkit-border-image:url("../images/whitebutton.png14 0 14;color:#000;text-shadow:white 0 1px 0}#frame a:last-child{margin-bottom:20px!important}#frame a:hover span.black,#frame a:hover span.gray{-webkit-border-image:url("../images/bluebutton.png14 0 14;color:#fff;text-shadow:rgba(0,0,0,1) 0 -1px 0}#frame a:hover span.red{-webkit-border-image:url("../images/darkredbutton.png14 0 14}#leftnav,#leftbutton{position:absolute;font-size:12px;left:9px;top:7px;font-weight:bold}#leftnav,#leftbutton,#rightnav,#rightbutton{z-index:5000}#leftnav a,#rightnav a,#leftbutton a,#rightbutton a{display:block;color:#fff;text-shadow:rgba(0,0,0,0.6) 0 -1px 0;line-height:30px;height:30px;text-decoration:none}#leftnav img,#rightnav img{margin-top:4px}#leftnav a:first-child{z-index:2;-webkit-border-image:url("../images/navleft.png") 0 5 0 13;border-width:0 5px 0 13px;-webkit-border-top-left-radius:16px;-webkit-border-bottom-left-radius:16px;-webkit-border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;width:auto}#leftnav a{-webkit-border-image:url("../images/navlinkleft.png") 0 5 0 13;z-index:3;margin-left:-4px;border-width:0 5px 0 13px;padding-right:4px;-webkit-border-top-left-radius:16px;-webkit-border-bottom-left-radius:16px;-webkit-border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;float:left}#rightnav,#rightbutton{position:absolute;font-size:12px;right:9px;top:7px;font-weight:bold}#rightnav a{-webkit-border-image:url("../images/navlinkright.png") 0 13 0 5;z-index:3;margin-right:-4px;border-width:0 13px 0 5px;padding-left:4px;-webkit-border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;float:right;-webkit-border-top-right-radius:16px;-webkit-border-bottom-right-radius:16px}#rightnav a:first-child{z-index:2;-webkit-border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-webkit-border-image:url("../images/navright.png") 0 13 0 5;border-width:0 13px 0 5px;-webkit-border-top-right-radius:16px;-webkit-border-bottom-right-radius:16px}#leftbutton a,#rightbutton a{-webkit-border-image:url("../images/navbutton.png") 0 5 0 5;border-width:0 5px;-webkit-border-radius:6px}.rssxpresschannel{font-family:helvetica,sans-serif;border:none}.rssxpresschtitle{text-align:center}.rssxpresschdesc{color:#000;text-align:center;border-bottom:1px solid #000;padding-bottom:5px}.rssxpressittitle{display:block;font-size:12pt;background:#fff;margin:5px 0 2px}.rssxpressittitle a{text-decoration:none!important;font-weight:bold;color:rgb(73,102,145);line-height:10pt}.rssxpressitdesc{background:#fff;font-size:12pt}.rssxpressdivider{display:none}li.form input[type=text],li.form input[type=password],li.form input[type=search]{border-width:7px 7px;font-weight:normal;border-color:white;height:10px;-webkit-border-image:url("../images/textfield.png") 7 7 7 7;-webkit-appearance:none;line-height:8px;font-size:18px;margin:auto;display:block;position:relative;width:90%}li.form input[type=submit]{width:100%;background:none;border:0px;color:#000;margin-top:-5px;margin-bottom:-5px;font-weight:bold;font-size:17px}.form{padding:5px 8px 0 5px;height:37px!important;position:relative;overflow:hidden}li.form .narrow textarea,li.form .narrow input[type=text],li.form .narrow input[type=checkbox],li.form .narrow input[type=password],li.form .narrow input[type=search]{width:40%!important;border-width:7px 7px;height:10px;-webkit-border-image:url("../images/textfield.png") 7 7 7 7;-webkit-appearance:none;line-height:8px;font-size:18px;font-weight:normal;border-color:white;margin:0!important;position:absolute;right:-17px}li.form span.narrow,li.form span.check{width:90%!important;display:block;position:relative;margin:auto}li.form .name{width:55%!important;white-space:nowrap;text-overflow:ellipsis;position:absolute;margin:6px 0 0 7px;color:#000;font-weight:bold;font-size:17px;overflow:hidden;left:-17px}li.form .check .name{width:70%!important}li.form input[type=radio]{width:100%;height:42px;display:block;margin:-5px -8px 0 -5px;-webkit-appearance:none;border:0;-webkit-border-radius:0;position:relative;background:transparent;position:absolute}span.radio{width:16px;height:30px;background:url(../images/check.png) no-repeat;display:block;position:absolute;right:5px;overflow:visible;z-index:1}span.checkbox{width:94px;height:27px;background:url(../images/checkbox.png) no-repeat;display:block;position:absolute;right:-14px;top:2px}input[type=checkbox]{display:none}select{height:40px;opacity:0;position:absolute;width:100%;margin:-5px 0 0 -5px;-webkit-border-radius:0}.form .choice .name{left:1.7%;width:87%!important}span.select{z-index:1;position:absolute;white-space:nowrap;text-overflow:ellipsis;margin:6px 0 0 7px;color:#000;font-weight:bold;font-size:17px;overflow:hidden;max-width:87%}.form .arrow{background:url('../images/more.png') no-repeat;width:13px;height:8px;position:absolute;right:8px;top:18px;margin:0!important}input[type=submit],button,input[type=button],input[type=reset]{background:transparent;width:100%;height:40px;left:0px;position:absolute;top:6px;display:block;-webkit-border-radius:0;line-height:40px}button,input[type=button],input[type=reset]{top:0px!important;border:none;color:black;font-weight:bold;font-size:17px;-webkit-appearance:none}.textbox textarea{min-height:50px;margin:3px auto 4px auto;position:relative;-webkit-border-image:url("../images/textfield.png") 7 7 7 7;padding:3px 0 0 0;line-height:18px;left:-2px;font-size:18px;font-weight:normal;width:97%;display:block;border-width:7px 7px}ul li.hidden{display:none}ul li.autolisttext{text-align:center}body.musiclist ul li.autolisttext{line-height:44px!important}ul li.autolisttext a:hover{background-image:none!important;color:black!important}

and they replied with this

  Quote
Okay, I guess the code "top.document.getElementById('iframe_a').src" is coming up as null. That is a browser compatibility. Try these changes:

urgent.html

REPLACE:

&lt;a href="java script: locationJump();" id="perf"&gt;

WITH:

&lt;a href="java script: locationJump('&amp;app=core&amp;&amp;module=tools&amp;section=performance&amp;do=toggle');" id="perf"&gt;

urgent.html

REPLACE:

&lt;script type="text/javascript"&gt;
		function locationJump() {
var url = top.document.getElementById('iframe_a').src;
alert('url:' + url);
top.document.getElementById('iframe_a').src = url + "&amp;app=core&amp;&amp;module=tools&amp;section=performance&amp;do=toggle";
alert('new url:' + top.document.getElementById('iframe_a').src);
}
&lt;/script&gt;
&lt;/div&gt;

WITH:

&lt;script type="text/javascript"&gt;
	function callLocationJump(){
		parent.locationJump();
	}
&lt;/script&gt;

index.html

Add to Top:

&lt;script type="text/javascript"&gt;
function locationJump() {
var url = top.document.getElementById('iframe_a').src;
c = url.length;
t = url.charAt(c);
if ( t != "?" ) { url += "?"; }
top.document.getElementById('iframe_a').src = url + "&amp;app=core&amp;&amp;module=tools&amp;section=performance&amp;do=toggle";
}
&lt;/script&gt;

problem is that when i click the button it just redirects the iframe to index.html, which i dont want. I want it to add the url to the iframe url (etc. example.com + url here) and go to that url, without needing to type.

  • 0

I would assume yes as once you login it redirects the iframe, but if I want to change the iframe page (as the iframe would be like this "www.example.com/admin/index.php?adsess=randomvaluehere&") and I want to go to a page and the only way is like "www.example.com/admin/index.php?adsess=randomvaluehere&value1=value&value2=value" the only suitable way is to edit the iframe, but I can't use php because I'm not using a server, and cant just redirect the page as I dont know the value of adsess.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • They are shifting into AI now. Don't you see?
    • Exactly. No need to pay to rent a license. I'd rather own it.
    • Weekend PC Game Deals: Automation fests, Civilization for free, charity specials, and more by Pulasthi Ariyasinghe Weekend PC Game Deals is where the hottest gaming deals from all over the internet are gathered into one place every week for your consumption. So kick back, relax, and hold on to your wallets. The Epic Games Store unlocked a big strategy game giveaway earlier this week: Civilization VI: Platinum Edition. Coming in from Firaxis Games, the turn-based 4X experience has you starting world-conquering campaigns to explore, expand, exploit, and exterminate everything in your empire's reach. PvP and co-op multiplayer are also options if the various forms of AI prove to be too easy or even too troublesome. The Sid Meier’s Civilization VI: Platinum Edition giveaway is live until July 24, and it comes with two massive expansions as well as six DLC packs with extra scenarios, leaders, and more. Next week, tower defense title Legion TD 2 will become the latest freebie on the Epic Games Store. The Humble Store brought a new bundle for action game fans this weekend, and it's all about the Devil May Cry franchise. The Devil Trigger Collection begins with DmC: Devil May Cry and Devil May Cry HD Collection for $10. If you want to complete the bundle, it will set you back $20, which gets you Devil May Cry 4 Special Edition as well as the most recent entry, Devil May Cry 5, as well as its Vergil DLC. This bundle has two weeks left on its counter before it goes away. Big Deals Most publishers are returning to their usual weekend specials after the massive summer sales, so there are plenty of discounts to go around. There's even a special Make a Wish charity sale running on Steam with some discounted viral hits. With all those and more, here's our hand-picked big deals list for the weekend: Satisfactory – $27.99 on Steam Captain of Industry – $24.49 on Steam No Man's Sky – $23.99 on Steam Persona 5 Royal – $23.99 on Steam No More Room in Hell 2 – $22.49 on Steam FOUNDRY – $20.99 on Steam Banishers: Ghosts of New Eden – $19.99 on Steam SULFUR – $19.99 on Steam Assassin's Creed Mirage – $19.99 on Steam Alan Wake 2 – $19.99 on Epic Store Grand Theft Auto V Enhanced – $19.79 on Steam Norland – $19.49 on Steam Stray – $17.99 on Steam V Rising – $17.49 on Steam Dyson Sphere Program – $15.99 on Steam The Outlast Trials – $15.99 on Steam Warhammer 40,000: Darktide – $15.99 on Steam The Outlast Trials – $15.99 on Steam Red Dead Redemption 2 – $14.99 on Steam Turing Complete – $13.99 on Steam Eden Crafters – $13.99 on Steam Core Keeper – $13.99 on Steam Thank Goodness You're Here! – $12.99 on Steam Opus Magnum – $9.99 on Steam Autonauts – $9.99 on Steam EXAPUNKS – $9.99 on Steam DRAGON BALL XENOVERSE 2 – $9.99 on Steam Superliminal – $9.99 on Steam Heaven's Vault – $9.99 on Steam RAILGRADE – $9.89 on Steam Goat Simulator 3 – $9.89 on Steam Tchia – $9.89 on Steam ACE COMBAT 7: SKIES UNKNOWN – $9.59 on Steam PAYDAY 3 – $8.99 on Steam Assassin's Creed Origins – $8.99 on Steam Viewfinder – $8.74 on Steam Escape Academy – $7.99 on Steam Pit People – $7.99 on Steam Skull and Bones – $7.99 on Steam Immortals Fenyx Rising – $7.99 on Steam Imperator: Rome – $7.59 on Steam SHENZHEN I/O – $7.49 on Steam Tom Clancy’s The Division 2 – $7.49 on Steam Bassmaster Fishing – $7.49 on Steam Let's Build a Zoo – $6.99 on Steam The Forgotten City – $6.24 on Steam Control Ultimate Edition – $5.99 on Steam Bramble: The Mountain King – $5.99 on Steam Assassin’s Creed Rogue – $5.99 on Steam RoboCop: Rogue City – $4.99 on Steam Kingdom Two Crowns – $4.99 on Steam Scott Pilgrim vs. The World: The Game – $4.94 on Steam Castle Crashers – $4.49 on Steam BattleBlock Theater – $4.49 on Steam TOEM: A Photo Adventure – $3.99 on Steam Supraland – $3.99 on Steam Vampire Survivors – $3.99 on Steam Darkwood – $3.74 on Steam Valiant Hearts: The Great War – $3.74 on Steam TIS-100 – $3.49 on Steam PAYDAY 2 – $3.29 on Steam Cake Bash – $2.99 on Steam Ragnarock – $1.99 on Steam Alan Wake – $1.49 on Steam Civilization VI Platinum Edition – $0 on Epic Store DRM-free Specials Lastly, here are some highlights from the DRM-free discounts available on the GOG store this weekend: Age of Wonders 4 - $29.99 on GOG Pathfinder: Wrath of the Righteous - Game of the Year Edition - $19.99 on GOG Tomb Raider IV-VI Remastered - $19.49 on GOG The Thaumaturge - $19.24 on GOG Chained Echoes - $13.74 on GOG Tyranny - Gold Edition - $12.49 on GOG Tomb Raider I-III Remastered Starring Lara Croft - $11.99 on GOG Baldur's Gate: Enhanced Edition - $9.99 on GOG Baldur's Gate II: Enhanced Edition - $9.99 on GOG Neverwinter Nights: Enhanced Edition - $9.99 on GOG Old World - $9.99 on GOG Icewind Dale: Enhanced Edition - $9.99 on GOG Neverwinter Nights: Doom of Icewind Dale - $7.99 on GOG Kingdom Come: Deliverance - $5.99 on GOG Might and Magic 6-pack Limited Edition - $4.99 on GOG Heroes of Might and Magic 3: Complete - $4.99 on GOG Blood Omen: Legacy of Kain - $3.49 on GOG Might and Magic 8: Day of the Destroyer™ - $2.99 on GOG Worms Armageddon - $2.99 on GOG ATOM RPG: Post-apocalyptic indie game - $2.99 on GOG Keep in mind that availability and pricing for some deals could vary depending on the region. That's it for our pick of this weekend's PC game deals, and hopefully, some of you have enough self-restraint not to keep adding to your ever-growing backlogs. As always, there are an enormous number of other deals ready and waiting all over the interwebs, as well as on services you may already subscribe to if you comb through them, so keep your eyes open for those, and have a great weekend.
    • Wild that this was even allowed from the jump
    • Microsoft stops using China-based engineers to support US defense clients by Hamid Ganji Microsoft announced on Friday that its China-based engineers can no longer provide technical support to the US military and other defence clients using the company's cloud services. Frank Shaw, Microsoft's Chief Communications Officer, wrote on X, "In response to concerns raised earlier this week about US-supervised foreign engineers, Microsoft has made changes to our support for US Government customers to assure that no China-based engineering teams are providing technical assistance for DoD Government cloud and related services." The issue came into the spotlight after a report by ProPublica detailed how Microsoft's Azure engineers in China are providing technical support to the US defense clients. Microsoft had apparently told ProPublica that its engineers and contractors complied with US government laws. These China-based engineers are reportedly supervised through so-called "digital escorts" in the US, who are allegedly less technically qualified than the engineers and can not determine whether the Chinese engineers under their supervision pose a cyber threat to the United States. On Friday, Senator Tom Cotton sent a letter to Defense Secretary Pete Hegseth, demanding explanations about how these "digital escorts" are trained to detect threats, as well as the list of contractors that use Chinese personnel. "The US government recognizes that China's cyber capabilities pose one of the most aggressive and dangerous threats to the United States, as evidenced by infiltration of our critical infrastructure, telecommunications networks, and supply chains," Cotton wrote. In a video posted on X, Hegseth said this is "obviously unacceptable" and that he's issuing a two-week review of Pentagon cloud deals to ensure that "China will no longer have any involvement whatsoever in our cloud services, effective immediately." The US Defense Secretary also said the current controversy is due to "A legacy system created over a decade ago, during the Obama administration." Microsoft, Amazon, Google, and Oracle jointly received a $9 billion Department of Defense cloud services contract in 2022.
  • Recent Achievements

    • First Post
      artistro08 earned a badge
      First Post
    • First Post
      paul29 earned a badge
      First Post
    • Dedicated
      Homeless Vagrant earned a badge
      Dedicated
    • One Month Later
      Coolray5432 earned a badge
      One Month Later
    • Week One Done
      Coolray5432 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      498
    2. 2
      ATLien_0
      223
    3. 3
      Michael Scrip
      196
    4. 4
      Xenon
      161
    5. 5
      +FloatingFatMan
      138
  • Tell a friend

    Love Neowin? Tell a friend!