You are here:
BACCHUS Wiki
>
System Web
>
JQueryPlugin
>
JQueryQueryObject
(revision 1) (raw view)
---+ %TOPIC% %JQPLUGINS{"queryobject" format=" Homepage: $homepage <br /> Author(s): $author <br /> Version: $version " }% %STARTSECTION{"summary"}% This extension creates a singleton query string object for quick and readable query string modification and creation. This plugin provides a simple way of taking a page's query string and creating a modified version of this with little code. %ENDSECTION{"summary"}% ---++ Examples <verbatim class="js"> var url = location.search; > "?action=view§ion=info&id=123&debug&testy[]=true&testy[]=false&testy[]" var section = $.query.get('section'); > "info" var id = $.query.get('id'); > 123 var debug = $.query.get('debug'); > true var arr = $.query.get('testy'); > ["true", "false", true] var arrayElement = $.query.get('testy[1]'); > "false" var newUrl = $.query.set("section", 5).set("action", "do").toString(); > "?action=do§ion=5&id=123" var newQuery = "" + $.query.set('type', 'string'); > "?action=view§ion=info&id=123&type=string" var oldQuery = $.query.toString(); > "?action=view§ion=info&id=123" var oldQuery2 = $.query; > ?action=view§ion=info&id=123 var newerQuery = $.query.SET('type', 'string'); > ?action=view§ion=info&id=123&type=string var notOldQuery = $.query.toString(); > "?action=view§ion=info&id=123&type=string" var oldQueryAgain = $.query.REMOVE("type"); > ?action=view§ion=info&id=123 var emptyQuery = $.query.empty(); > "" var stillTheSame = $.query.copy(); > ?action=view§ion=info&id=123 </verbatim>
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Edit
w
iki text
|
M
ore topic actions
Topic revision: r1 - 12 Feb 2010,
ProjectContributor
System
Log In
Toolbox
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
BeginnersStartHere
TextFormattingRules
Macros
FormattedSearch
QuerySearch
DocumentGraphics
SkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
SiteTools
DefaultPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Copyright &© by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding BACCHUS Wiki?
Send feedback