Iframe Expert needed!

Started on the old forum in August 2013 · view the original in the archive · old links redirect here

1 reply · 2,476 views · started 13 years ago · 1 min read

2 participants
AttiDuDe Junior · 24 posts #1

Hi,

I need a coder urgently....

Here is the description of the work :

URL 1 : http://xxxxxxccxxx.com/subid=1233 URL 2 : http://iframeurl.com/subid={URL 1's subid should be found here} i.e http://iframeurl.com/subid=1233

If i want the above URL 1 to redirect to another URL 2 (using Iframe) but i want the SUBID in the Iframe URL..

The subid in the URL 1 will be changing everytime..

I don't really know how this can be done..

If you think you can do it, send me a PM over here...

Thanks!

something else Fellow · 2,296 posts #2

php:

print '<iframe src="http://site.con/subid='.$_GET['subid'].'"></iframe>';

javascript:

<script type="text/javascript">
function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = value;
    });
    return vars;
}
document.write('<iframe src="http://site.con/subid='+getUrlVars()['subid']+'"></iframe>');
</script>

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close