0

Lets say I have a function like this:

<script type="text/javascript">

function ReturnURL()
{
var url = document.URL;
var url2 = url.split("=");
var urlID = url2[url2.length-1];


//window.open('http://localhost/POSkill/skillshow.aspx?user_id =' + urlID);
return urlID;
}

</script>

And I also have iframe in my html file which is something like below:

<iframe id="showSkill" scrolling="yes" src="http://localhost/POSkill/skillshow.aspx?user_id = ReturnURL()" height="350" runat="server" ></iframe>

Now all I want to do is to send the urlID value of javasrcipt as the user_id value in iframe. I have tried by using user_id = ReturnURL() but its not working.

How can I do this?

Thanks in Advance.

1 Answer 1

0

I answered something very similar at enter link description here

The answer is that you must set the "src" value on the JS rendering.

This means that somewhere in your javascript you should have the following code

...
document.getElementById("showSkill").src="http://localhost/POSkill/skillshow.aspx?user_id =" +  ReturnURL()
...

This should work just fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.