EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #01946
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Problem with EPrints and adding javascript to a new created field.
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Problem with EPrints and adding javascript to a new created field.
- From: "Joel Rosental R." <joel.rosental@imdea.org>
- Date: Tue, 21 May 2013 16:50:31 +0200
Hi,I'm having some problems trying to add some javascript code (jQuery) to a new field I've created in one of the steps in the deposit item workflow. Basically, what I wanted to do was to create a dropdown menu in the "Details" stage of the workflow, so that when a user is going to fill-in the "creators" fields if one of the authors is from our organization instead of writing it, it should be selected into the dropdown menu.
My script detects when the default value (UNSPECIFIED) has been changed and then do some ajax stuff querying the database and putting the right information into the "Family Name", "Given Name" and "Email" fields automatically.
The problem is, that if the user click on the "More input rows" button, by some reason my jquery code gets disabled and it doesn't work anymore. I've included this lines:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>jQuery.noConflict()</script><script src="{$config{rel_path}}/javascript/imdea_eprints_author_lookup.js"></script>
to ./archives/<myrepository>/cfg/lang/en/templates/default.xml just below the prototype "auto.js" call:
<script type="text/javascript" src="{$config{rel_path}}/javascript/auto.js"><!-- padder --></script>
Examining the load with Firefox's FireBug what I see is that this button "More input rows" has an event associated call "epjs_ajax" and it calls the script cgi/users/home.
Any ideas what could be happening? -- Joel Rosental R. System Administrator Tel: +34 91 481 69 87 Web: http://www.networks.imdea.org
- Follow-Ups:
- [EP-tech] Re: Problem with EPrints and adding javascript to a new created field.
- From: Sebastien Francois <sf2@ecs.soton.ac.uk>
- [EP-tech] Re: Problem with EPrints and adding javascript to a new created field.
- Prev by Date: [EP-tech] Access problem to the links on EPrints
- Next by Date: [EP-tech] Re: Problem with EPrints and adding javascript to a new created field.
- Previous by thread: [EP-tech] Access problem to the links on EPrints
- Next by thread: [EP-tech] Re: Problem with EPrints and adding javascript to a new created field.
- Index(es):