« first day (276 days earlier)      last day (2152 days later) » 

11:22 AM
Hai,Good evening,anybody there ?
How can i set the content of an iframe with id 'iframe_preview' ?
using jQuery/javascript
 
11:36 AM
$("#iframe_preview").attr("src", newUrl);
@DileepDil Where newUrl is a variable with your new url to the page.
Worst case scenario I think you can use the old target attributes.
Hope you got a good reason to use iframes though, since it's often not a very pretty solution.
 
@RobinAndersson Don't link to W3Schools, please
 
11:53 AM
@RobinAndersson , please read w3fools.com
 
@RobinAndersson Hai,its very easy to load a page,but i have a javascript variable with html inside it,i want to set the content of that to an iframe
 
NOW !!
 
@YiJiang Does it matter when I link to the "target" attribute of anchor tags? =)
 
@RobinAndersson Yes.
 
@YiJiang How come?
It's not like i presented target as a good idea to start with
 
11:56 AM
@RobinAndersson How can i do with variable ??
 
@RobinAndersson Because every time you link to their site, you're linking to garbage. Doesn't matter what the content of the page you're linking to or the context in which you link it to. You know how page rank works; by doing this you're silently promoting their site
18 messages moved from JavaScript
 

« first day (276 days earlier)      last day (2152 days later) »