...

View Full Version : using an iframe src that's not a file.



chubbypama
04-20-2011, 03:45 PM
is it possible to pass a a string of html code to the src property of an iframe?
i was thinking about creating a file and saving the html out to it, but that means that everytime someone comes to my asp page, it's going to create a new file. sounds like it'll be a lot of overhead.
So i want to do somethign like:

<DIV>
<iframe src=<%=myHTMLstring%>></iframe>
</DIV>

any suggestions?

VIPStephan
04-20-2011, 03:52 PM
The question would be: what exactly are you trying to achieve?

chubbypama
04-20-2011, 04:03 PM
in my own page, i need to display "modified" content from another web page. so i get all the html data via an httprequest object, modify the content, and then I need to display it in a "tab" control. I found some sample code on the internet from devshed that uses divs and iframes and buttons to create a tab control where it displays 4 buttons. when you click on a button, a div appears with external content inside. this works fine, but again, i want to pass a string to the iframe instead.
I guess the other option is to create a div and write some javascript or css that will show / hide the div tags? but I don't know how to create 4 buttons that will show a different div in the same spot....



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum