EPrints Technical Mailing List Archive

Message: #02234


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Custom javascript




Thanks again Seb,
I'm aware of the compatability issues hence me using 'jQuery' rather than $, just have no experience with prototype.

Derek Lawrie

From: sf2 <sf2@ecs.soton.ac.uk>
Reply-To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
Date: Monday, October 7, 2013 10:16 AM
To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
Subject: [EP-tech] Re: Custom _javascript_

Try with:

<script type="text/_javascript_">

//<![CDATA[

 

// your code here

 

//]]>

</script>

 

Also note that EPrints uses the Prototype library instead of jQuery, beware of compatibility issues between the two.

Seb

 

On Mon, 7 Oct 2013 09:35:12 +0000, Derek Lawrie <d.lawrie@nua.ac.uk> wrote:



I was just doing a simple test on the length of an array and when I run 'bin/generate_static' against my repository I get this:
Failed to parse XML file: /usr/share/eprints3/archives/myrepos/cfg/templates/default.xml: Entity: line 9: parser error : StartTag: invalid element name
      if(jQuery('#ep_tm_menu_tools li').length < 2){


The js works if I do it at the console, just thought I'd make sure it worked before I did too much else.

Mnay thanks
Derek

From: sf2 <sf2@ecs.soton.ac.uk>
Reply-To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
Date: Monday, October 7, 2013 10:00 AM
To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
Subject: [EP-tech] Re: Custom _javascript_

What's the error? This should just work.

Seb.

 

On Mon, 7 Oct 2013 09:16:30 +0000, Derek Lawrie <d.lawrie@nua.ac.uk> wrote:



Hi,
I've successfully added some external _javascript_ files to my default.xml but now I want to add some (simple) custom script to the template as well. I tried to add it to the default.xml but it doesn't like me doing that so I was wondering if I should add it in another separate js file and if so where would I put that?

Many thanks
Derek

Rated top Specialist Arts Institution in the UK (National Student Survey 2013) and best Specialist Institution in Art and Design (Complete University Guide 2014)

Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, we do not accept responsibility for any errors or omissions that are present in this message, or any attachment, that have arisen as a result of e-mail transmission. If verification is required, please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the University.

This email and any files sent with it are intended only for the named recipient and may be confidential. If you are not the named recipient please email the sender immediately then delete this message. You should not disclose the content, distribute or retain any copies of this message.


Norwich University of the Arts,
Francis House,
3-7 Redwell Street,
Norwich, NR2 4SN.
Tel: 01603 610561
Fax: 01603 615728
www.nua.ac.uk

NUA Business Limited
Registered office:
Francis House,
3-7 Redwell Street,
Norwich, NR2 4SN.
Registered in England & Wales number 3001912

 


Rated top Specialist Arts Institution in the UK (National Student Survey 2013) and best Specialist Institution in Art and Design (Complete University Guide 2014)

Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, we do not accept responsibility for any errors or omissions that are present in this message, or any attachment, that have arisen as a result of e-mail transmission. If verification is required, please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the University.

This email and any files sent with it are intended only for the named recipient and may be confidential. If you are not the named recipient please email the sender immediately then delete this message. You should not disclose the content, distribute or retain any copies of this message.


Norwich University of the Arts,
Francis House,
3-7 Redwell Street,
Norwich, NR2 4SN.
Tel: 01603 610561
Fax: 01603 615728
www.nua.ac.uk

NUA Business Limited
Registered office:
Francis House,
3-7 Redwell Street,
Norwich, NR2 4SN.
Registered in England & Wales number 3001912

 


Rated top Specialist Arts Institution in the UK (National Student Survey 2013) and best Specialist Institution in Art and Design (Complete University Guide 2014)

Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, we do not accept responsibility for any errors or omissions that are present in this message, or any attachment, that have arisen as a result of e-mail transmission. If verification is required, please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the University.

This email and any files sent with it are intended only for the named recipient and may be confidential. If you are not the named recipient please email the sender immediately then delete this message. You should not disclose the content, distribute or retain any copies of this message.


Norwich University of the Arts,
Francis House,
3-7 Redwell Street,
Norwich, NR2 4SN.
Tel: 01603 610561
Fax: 01603 615728
www.nua.ac.uk

NUA Business Limited
Registered office:
Francis House,
3-7 Redwell Street,
Norwich, NR2 4SN.
Registered in England & Wales number 3001912