variables - Passing javascript via browser URL field -
like title states... there way pass javascript via browser url field.
for example, if had function opened or closed tabs wanted type in browser url + function on page load tabs opened (or closed)
mydomain.com?windows.open=true (something that) possible.
thank in advanced time , responses, appreciated.
there 2 approaches can use:
pass parameters in query string, next page reads query string , based on it
use 1 of many javascript libraries or frameworks allow map hash in url function in javascript (e.g. backbonejs router, example).
the #2 solution more modern approach.
http://mydomain.com/some/page#tabs/open
and on page javascript allows bind function pattern in hash. sammy.js 1 comes mind.
$.sammy(function() { this.get("#/tabs/open", function() { // jquery make sure tabs open }); });
Comments
Post a Comment