For instance, we have an application that will invoke Webhelp with the searchQuery parameter ie /webhelp/index.html?searchQuery=print. We want the first result found in the searchresults to be displayed in the right pane.
I thought I could use webhelp.head.script and supply some jquery to do this. However, the search results don't seem to be loaded until after my code has already run. That even if I use the jquery $( document ).ready function. I've also tried attaching my code to webhelp.body.script
My code is very simple. I get the link associated with the first result, and then use it to change the iframe (#frm) on the right.
Code: Select all
$( document ).ready(function() {
s = $('#foundLink0');
href = $(s).attr('href')
var $iframe = $('#frm');
$iframe.attr('src', href );
})