Thanks Massimo,
I already have the iframe code working as per your suggestion on a
page.
What I would like to do is refresh the iframe when I click on a link
on the main page the
iframe is embedded within.
Also the link should pass the args to the iframe so that the correct
db rows are shown.
The links are the headers for discussion threads, when one is clicked
the iframe should show
the threads under that header
I have this javascript code which will refresh an iframe as I could
not find out how to do
it with jQuery:
<script type="text/javascript">
function refreshiframe(el){
var f =document.getElementById(el)
var rsrc = f.src
f.src="about:blank"
f.src=rsrc
}
</script>
What I want to do is use this or similar to refresh but parse the args
to the iframe
so it refreshes and shows correct db rows.
here is html I am using:
<table>
<tr>
<td>
{{for comment in comments:}}
<h2></h2>
<p>
<h3>
{{=A(comment.title.upper(),_href=URL(r=request,f='ii',args=
[comment.id]),_onclick="iframerefresh(ii)")}} </h3>
</p>
<p> posted by {{=comment.author_alias}} on
{{=comment.timestamp}}
</p>
{{pass}}
{{=form}}
</td>
<td>
<h2></h2>
<iframe name="ii" id="ii" scrolling=" no" height="600"
width="500" frameborder: 0" src="{{=URL
(r=request,f='edit_comment',args=[comment.id])}}"></iframe>
</td>
</tr>
</table>
obviously my code - href=URL(r=request,f='ii',args=
[comment.id]),_onclick="iframerefresh(ii)"
is incorrect but not sure what synatx should be??
thanks
Chrism
On May 2, 10:50 pm, mdipierro <[email protected]> wrote:
> I am guessing you want
>
> <iframe src="{{=URL(r=request,f='edit_comment',args=comment.id))}}"></
> iframe>
>
> Massimo
>
> On May 1, 6:24 pm, murray3 <[email protected]> wrote:
>
> > If I have a page with
> > <h3>{{=A(comment.title.upper(),_href=URL
> > (r=request,f='edit_comment',args=[comment.id]))}} </h3
>
> > if I want to put edit_comment in an iframe and change the above code
> > so it refreshes the iframe and passes the args=[comment.id] to the
> > iframe, what is the syntax?
>
> > I have a list of links and as each is clicked I want an onclick event
> > to dynamically update the iframe page.
>
> > any help appreciated.
> > Chrism
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---