News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[4067]smf_prepareScriptUrl and JumpTo.prototype.showSelect

Started by fannoj, September 20, 2009, 07:34:38 AM

Previous topic - Next topic

fannoj

Cool, but think i fouend one more. (similar)

i am replying here again because similar error:

is:
// Show the initial select box (onload). Method of the JumpTo class.
JumpTo.prototype.showSelect = function ()
{
var sChildLevelPrefix = '';
for (var i = this.opt.iCurBoardChildLevel; i > 0; i--)
sChildLevelPrefix += this.opt.sBoardChildLevelIndicator;
setInnerHTML(document.getElementById(this.opt.sContainerId), this.opt.sJumpToTemplate.replace(/%select_id%/, this.opt.sContainerId + '_select').replace(/%dropdown_list%/, '<select name="' + this.opt.sContainerId + '_select" id="' + this.opt.sContainerId + '_select" ' + (typeof(document.implementation) == 'undefined' ? 'onmouseover="grabJumpToContent();" ' : '') + (typeof(document.onbeforeactivate) == 'undefined' ? 'onfocus' : 'onbeforeactivate') + '="grabJumpToContent();"><option value="?board=' + this.opt.iCurBoardId + '.0">' + sChildLevelPrefix + this.opt.sBoardPrefix + this.opt.sCurBoardName.removeEntities() + '</option></select>&nbsp;<input type="button" value="' + this.opt.sGoButtonLabel + '" onclick="window.location.href = \'' + smf_scripturl + '?board=' + this.opt.iCurBoardId + '.0\';" />'));
this.dropdownList = document.getElementById(this.opt.sContainerId + '_select');
}


would expect
// Show the initial select box (onload). Method of the JumpTo class.
JumpTo.prototype.showSelect = function ()
{
var sChildLevelPrefix = '';
for (var i = this.opt.iCurBoardChildLevel; i > 0; i--)
sChildLevelPrefix += this.opt.sBoardChildLevelIndicator;
setInnerHTML(document.getElementById(this.opt.sContainerId), this.opt.sJumpToTemplate.replace(/%select_id%/, this.opt.sContainerId + '_select').replace(/%dropdown_list%/, '<select name="' + this.opt.sContainerId + '_select" id="' + this.opt.sContainerId + '_select" ' + (typeof(document.implementation) == 'undefined' ? 'onmouseover="grabJumpToContent();" ' : '') + (typeof(document.onbeforeactivate) == 'undefined' ? 'onfocus' : 'onbeforeactivate') + '="grabJumpToContent();"><option value="?board=' + this.opt.iCurBoardId + '.0">' + sChildLevelPrefix + this.opt.sBoardPrefix + this.opt.sCurBoardName.removeEntities() + '</option></select>&nbsp;<input type="button" value="' + this.opt.sGoButtonLabel + '" onclick="window.location.href = \'' + smf_prepareScriptUrl(smf_scripturl) + 'board=' + this.opt.iCurBoardId + '.0\';" />'));
this.dropdownList = document.getElementById(this.opt.sContainerId + '_select');
}

Norv

Can you please tell what is it supposed to fix?
Any details about the behavior may help.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

fannoj

it has been so long so that i forgot about this one, but here is the diferance

now it is doing:
....smf_scripturl + '?board=....

putting the url together with smf_scripturl togather with  ?board= ......

however working with integration this cause problem as the smf_scripturl can already have a ? in it.
eg:
site.com/index.php?Itemid=30&option=com_jfusion?board=56.0

but if you put it throw smf_prepareScriptUrl (like you do almost eveywhere else i might add) then that would not be a problem

...smf_prepareScriptUrl(smf_scripturl) + 'board=...

-Thanks

know my english is not be bets but hope you understand

Norv

Thank you for your report, and sorry for the delay on this.
Tracked for easy feedback and eventually decision: http://dev.simplemachines.org/mantis/view.php?id=4067
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github


Advertisement: