On Thursday, May 12, 2016 at 12:57:07 PM UTC-7, Dave S wrote: > > On Thursday, May 12, 2016 at 12:24:39 PM UTC-7, Steve Joe wrote: >> >> can u write syntax for the same? >> > > This question could mean either of > > 1) How do I share javascript data between 2 pages? > or > 2) How do I copy javascript code from one template to another. > > If you meant 1), then my guess at the answer is that you need to use local > storage, because each page is a separate document in the browser > (if you're trying to handle iframes or ajax divs, the answer may be > different). > <URL:https://www.w3.org/TR/2016/REC-webstorage-20160419/> > > Also, if you're traversing a sequence of links (that is, clicking to get from page 1 to page 2), your javascript can edit the href to provide args and/or vars in the URL to get to the second page. That is the sort of thing SQLFORM does when providing a long table as a set of pages each with a subset of the data.
> > If you meant 2), this is just a matter of how you edit the view [template] > files, isn't it? In the web2py IDE, you can copy a block of code, switch to > a different file, and past the block of code there. Using a text editor in > your development environment would be a similar sequence. > > If you meant 3), please explain. > > /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.