Write current url in an iframe by javascript

 
0
 

I am trying to write current website url in a frame using javascript. Butt my methods does not working... What I want to do is to write the current url path into this code instead of "CURRENT+WEBSITE+URL+HERE" text.

My current iframe code:
<iframe allowtransparency='true' frameborder='0' height='600px' id='web search' marginheight='0' marginwidth='0' scrolling='no' src='http://mysite.com/display?sid=1770469&title_color=0000FF&text_color=000000&background_color=FFFFFF&border_color=FFFFFF&url_color=000000&url=CURRENT+WEBSITE+URL+HERE&b=4' title='Find It' width='160px'></iframe>
In the iframe url src you will get "CURRENT+WEBSITE+URL+HERE" text where I want to put the current URL, so assuming a path of that site is "http://mysite.com/go/went/gone.html" , the iframe will show this url:
http://mysite.com/display?sid=1770469&title_color=0000FF&text_color=000000&background_color=FFFFFF&border_color=FFFFFF&url_color=000000&url=http://mysite.com/go/went/gone.html&b=4' title='Find It' width='160px
It would me much better for me if you would code it, will help me a lot. Thanks

 
0
 

Sorry, I'm not sure what you really want. Do you have an existing page with an existing iframe element with the said URL? Do you want to replace the "CURRENT+WEBSITE+URL+HERE" text from a current existing iframe URL?

 
-1
 

text from a current existing iframe URL?

well i just want to put that page URL which will have that iframe, and i wanna put that page address/URL instead of "CURRENT+WEBSITE+URL+HERE" , so it is not the iframe URL it is that page URL which will bear that iframe. Suppose i have put this iframe in http://example.com/test.html so that the frame URL should like this: http://mysite.com/display?sid=1770469&title_color=0000FF&text_color=000000&background_color=FFFFFF&border_color=FFFFFF&url_color=000000&url=http://example.com/test.html&b=4 see in &url= in this address.. any idea? Thanks

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: