PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Naive user needs to sort out generated link

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Naive user needs to sort out generated link

    I'm evaluating zoom to use as a search on a website generated by AuthorIt, which uses javascript to generate what looks like a three pane website side (but is actually made up of divs).

    All subsequent pages on this site are loaded into the correct pane on the index.htm file using the script


    <script type="text/javascript">
    function isTOCLoaded() {
    //this function for loading the topic within the application if loaded by itself
    //i.e. open the topic .htm file or as search engines link
    var url = window.location.href;
    var baseUrl = url.substring(0, url.lastIndexOf("/") + 1);
    var topicNo = url.substring(url.lastIndexOf("/") + 1, url.lastIndexOf(".htm"))
    var newUrl = baseUrl + "index.htm#" + topicNo;
    location.href = newUrl;
    return false;
    }
    </script>

    I have been given the javascript to load the zoom into the right-hand pane,
    ZoomSearchForm = '<form name="sform" id="sform" method="post" action="JavaScript:Kbase._openzoom(sform.zoom_q.va lue)"> \
    <table cellpadding="0px" border="0" cellspacing="0px"> \
    <tr> \
    <td>\
    <input type="text" name="zoom_q" value="'+Kbase._empty_search_box_text+'" onclick="this.select()" class="searchbox" /> \
    </td> \
    <td> \
    <input type="submit" onKeyPress="return submitenter(this,event)" value="'+Kbase._search_button_text+'" onclick="Kbase._openzoom(sform.zoom_q.value)" title="Search" /> \
    </td> \
    </tr> \
    </table> \
    </form> ';
    which loads the first page of the results correctly.

    However, when multiple pages of results are found, the generated link is like this:
    http://www.snapsurveys.com/help/edits/web%20help%20test%20book/index.htm#search.php?zoom_query=files&zoom_page=2& zoom_per_page=10&zoom_and=1&zoom_sort=0

    which simply displays the default index.htm page

    How do I get zoom to generate a page that can be loaded correctly?

    Thanks. I am not a competent scripter myself, so apologies if this has a really obvious answer.

    Rachel

  • #2
    I haven't taken the time to examine and understand the function of all your script, but if the Next and Previous page links are wrong, this can often be corrected by using the link back URL in the advanced configuration window.

    Comment

    Working...
    X