Switching Request Forms When Using OpenURL

Print Friendly and PDF Follow

Overview

If your site implements an OpenURL link to Aeon but can only offer one outbound link, you can edit your request forms to allow users requesting items to order copies without having to first submit a loan request and then request a clone to copy order.

This is useful when a user wants to order material as a photoduplication request but is directed via OpenURL to a default request form.

The simple edits outlined below will enable users to switch to an alternate request form (e.g., the photoduplication request form) before submitting the request through Aeon.

All information transferred from the OpenURL request to the request form is retained when the user clicks on the link to switch to the alternate form, as are any changes or notes added to the original request form.

Editing the forms as explained below will add the functionality needed to allow the form switching to occur and places a default Switch to Photoduplication or Switch to Monograph link to the originating request as shown in the image to the right.

While you can use any of the default request forms as your OpenURL link and link to any forms, the explanations included here edit the DefaultRequest.html form to create a form-switching link to the PhotoduplicationRequest.html form.

Switch to Photoduplication Link

 

Editing the Request Forms to Allow Form Switching

There are two steps involved in configuring the request forms to allow form switching:

  1. Editing the switchRequestForm.js file.
  2. Editing the request form that serves as the outbound link for OpenURL.

As stated above, while you can use any of the default request forms as your OpenURL link and link to a form, the explanations included here edit the DefaultRequest.html form to create a form-switching link to the PhotoduplicationRequest.html form.

Editing the switchRequestForm.js File 

The switchRequestForm.js file, located in the Aeon/web/js folder, contains most of the functionality needed for the form switching feature but does need a little editing.

Example Code Blocks

There are two example code blocks included at the top of the switchRequestForm.js file. These code blocks are used for switching a request from one form to another. One is for switching from the current request form to the photoduplication form, and one is for switching from the current form to the monograph form.

Both of these code blocks are commented out using the /* and */ commands. You will need to remove those comments from the code block that you want to use for form switching.

   /* //Add the onclick handler to the "SwitchToPhotoduplication" link
    //To use this, add the following link to the request form. 
The link text can change but the ID should match the ID used in the click handler: 
<a href="#" id="SwitchToPhotoduplication">Switch to Photoduplication</a>
    $('#SwitchToPhotoduplication').click(function () 
        { 
            return SwitchForm(23, ''); 
        }
     );
    */


    /*
    //Add the onclick handler to the "SwitchToMonograph" link
    //To use this, add the following link to the request form. 
The link text can change but the ID should match the ID used in the click handler: 
<a href="#" id="SwitchToMonograph">Switch to Monograph</a>
    $('#SwitchToMonograph').click(function () 
        { 
            return SwitchForm(20, 'GenericRequestMonograph'); 
        }
     );
    */

Example link for request form

Each of the code blocks shown above contains a comment displaying an example link that you can place on your request page. Copy and paste this link onto the request form. You can choose the location to place this link and edit the text of this link if you like.

 
<button type="button" id="SwitchToPhotoduplication">Switch to Photoduplication</button>

Editing the Request Forms

Several edits need to be made to the request form that you use as your link to OpenURL. Again we are using the DefaultRequest.html form as our example.

The Form Tag

The form tag must be assigned an ID of RequestForm to ensure that the javascript functionality described above works properly. This is included by default on the Aeon 3.2 request forms.

<form action="aeon.dll" method="post" name="DefaultRequest" id="RequestForm" class="f-wrap-request">

The INCLUDE Link

A link to the switchRequestForm.js file needs to be added to the head of the request form. This is included by default on the Aeon 3.2 request forms.

<#INCLUDE filename="include_head_request.html">

The AeonForm tag

A hidden tag for AeonForm must be included on the request form. This is included by default on the Aeon 3.2 request forms.

<input type="hidden" name="AeonForm" value="DefaultRequest">

 

 

Questions?

If this article didn’t resolve your issue, please contact Atlas Support for assistance:

Contact Support