We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Extended Entry JS Help

How Do I?

TheLionsCher's avatar
TheLionsCher
46 posts
10 years ago
TheLionsCher's avatar TheLionsCher

Good morning, folks! I’m running into an issue with same-page extended entries, and I’m hoping one of you can help.

Way back in the day, when I’d first started using EE, I had a lovely JS code that allowed me to extend a blog entry right there on the same page. Being fairly certain that it’s pretty obsolete, I’ve gone in search of a new way to do it, and have found this entry on the forums:

https://ellislab.com/forums/viewthread/56925/

Now, I’ve created a JS (using what you see on that thread) template within my template group of embeds; embedded it into the header of my pages, and added the appropriate extended entry code to my template. Code is below:



The URL where this displays is http://www.thesagefuloak.com/index.php/site/news/site-launch . The problem occurs when I click on the “Read less” link, and I’m smacked upside the head with “The URI you submitted has disallowed characters.” In looking at the URL structure after clicking the “Read less” link, it looks like this:

http://www.thesagefuloak.com/index.php/site/news/[removed]void(0);

And….I’m lost. If you can help me figure this out, I’d really appreciate it. I prefer the idea of not having to navigate to a single entry page to continue reading a post (just personal preference), and would love to once again be able to implement this feature!

Thanks so much, all! 😊

       
jay_turley's avatar
jay_turley
46 posts
10 years ago
jay_turley's avatar jay_turley

It’s actually a javascript problem, not an EE problem.

This line is the problem:



Returning

true

means that the click event should be propagated upwards, resulting in the location.href being set.

Change the true to false and magic happens.



Edit: it appears that EE forums have stripped all the code out that would make the above make sense. Sigh. No posting certain types of javascript here I guess…

So here is the specifics:

showHide(17,0,this,'entry');return true;

should be changed to :

showHide(17,0,this,'entry');return false;
       
TheLionsCher's avatar
TheLionsCher
46 posts
10 years ago
TheLionsCher's avatar TheLionsCher

Thanks so very much, Jay! As always, you are the man!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.