Details
-
Type:
Improvement
-
Status:
Open
(View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Labels:None
Description
Both passagestudy and parallelstudy and wordsearchresults currently "reset" to NASB and James 1:19 after a while. I felt that it would be better if clicking on modules, verses and options calls a javascript function to parse the current URL to obtain a new "absolute" URL instead of a "relative" one.
For example, if I am viewing John 1:29 with the ASV and ESV in parallel the URL could be something like
http://www.crosswire.org/study/parallelstudy.jsp?key=John+1:29/&mod=ASV/ESV/&options=notes/crossrefs/strongs/morph/
The link to add Darby's translation would be a call to "add('mod','Darby');".
The link to remove the ASV would be a call to "del('mod','ASV');".
The link to switch to the KJV would be a call to "change('mod','KJV');".
To "Go To" John 6:63 would be a call "change('key','John+6:63');".
Clicking on "Show Notes" would be a call to "add('options','notes');"
I believe this would be one of the easiest solutions. I am sorry I am slightly partial to split() and join()... =P but I have tested these functions on my browser and they work, assuming the jsp always redirects to a valid absolute URL.
function add(x,i)
{
var t;
t=location.href.split(x+"=");
t[1]=t[1].split("&");
t[1][0]=i"/";
t[1]=t[1].join("&");
t=t.join(x+"=");
location.href=t;
}
function del(x,i)
{
var t;
t=location.href.split(x+"=");
t[1]=t[1].split("&");
t[1][0]=t[1][0].split(i+"/").join("");
t[1]=t[1].join("&");
t=t.join(x+"=");
location.href=t;
}
function change(x,i)
{
var t;
t=location.href.split(x+"=");
t[1]=t[1].split("&");
t[1][0]=i+"/";
t[1]=t[1].join("&");
t=t.join(x+"=");
location.href=t;
}
I am sorry the code came out differently than in the preview..