Skip to main content

Specifying dynamic ibrowser parameters

1 reply [Last post]
jvence
Offline
Joined: 2006-06-21
Points: 0

Is there anyway to specify the userid (see below) dynamically:

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

You could hard wire into the component.js

This is from the jMaki v.5 component.js (look at the bottom):

if (typeof widget.args.sourceType != 'undefined') {
if (widget.args.sourceType == 'flickr') {
controller.loadFlickr([widget.args.tag], is);
} else if (widget.args.sourceType == 'json'){

controller.loadJSON([widget.args.url], is);
}

}

Instead of widget.args.url you could use widget.args.url + widget.args.userid

if (typeof widget.args.sourceType != 'undefined') {
if (widget.args.sourceType == 'flickr') {
controller.loadFlickr([widget.args.tag], is);
} else if (widget.args.sourceType == 'json'){

controller.loadJSON([widget.args.url + widget.args.userid], is);
}

}

In the tag then:

jMaki will send any arguments straight through and you don't need to do anything more.

Let us know if that doesn't work for you.