M
MS
Hi,
I'm trying to get the LibraryLookup Project bookmarklet to work with a
library search that requires a POST not a GET of the search term.
What I need to do is to create a form in javascript that posts itself
automatically with the required data (already known) as soon as the
bookmarklet is clicked by the user.
I found an old post on Google groups search (from 2002 so long dead) which
gave me some clues.
javascript:'<body onload="document.forms[0].submit()">
<form Method="post" action="/TalisPrism/doSearch.do">
<input name="" ... ></body>'
The data I want to send is in the following rather long string. The
important bit is the long number '0747566534' (43 chars in to the string),
this is a book's unique ISBN number and gets programatically changed for
whatever book the bookmarklet is initiating a search for.
searchType=advSearch&st1=controlNumber&sv1=0747566534&sb1=And&st2=title&sv2=&sb2=And&st3=author&sv3=&searchLocation=talislms&searchCollection=1&searchSites=-1&searchDates=&searchManualDate=&searchLanguages=&searchFormats=&searchOPUS=&pageSize=10
I know how to create the string but not how to tell the javascript form to
just send the string. Instead of creating 'input names' in the form I want
to just post the string, can this be done? If not can I get around this by
creating the required 'input names' and assigning each of them a value and
then post - all automatically within the javascript bookmarklet and
without any user interaction? How can these things be achieved?
Many thanks,
...matthew
I'm trying to get the LibraryLookup Project bookmarklet to work with a
library search that requires a POST not a GET of the search term.
What I need to do is to create a form in javascript that posts itself
automatically with the required data (already known) as soon as the
bookmarklet is clicked by the user.
I found an old post on Google groups search (from 2002 so long dead) which
gave me some clues.
javascript:'<body onload="document.forms[0].submit()">
<form Method="post" action="/TalisPrism/doSearch.do">
<input name="" ... ></body>'
The data I want to send is in the following rather long string. The
important bit is the long number '0747566534' (43 chars in to the string),
this is a book's unique ISBN number and gets programatically changed for
whatever book the bookmarklet is initiating a search for.
searchType=advSearch&st1=controlNumber&sv1=0747566534&sb1=And&st2=title&sv2=&sb2=And&st3=author&sv3=&searchLocation=talislms&searchCollection=1&searchSites=-1&searchDates=&searchManualDate=&searchLanguages=&searchFormats=&searchOPUS=&pageSize=10
I know how to create the string but not how to tell the javascript form to
just send the string. Instead of creating 'input names' in the form I want
to just post the string, can this be done? If not can I get around this by
creating the required 'input names' and assigning each of them a value and
then post - all automatically within the javascript bookmarklet and
without any user interaction? How can these things be achieved?
Many thanks,
...matthew