Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Wrapping Text into a link

  • 15-11-2012 10:56am
    #1
    Closed Accounts Posts: 399 ✭✭


    Hey guys,

    I just want to wrap a large piece of text into a link, is this possible?

    So that:

    Attach Files
    Valid file extensions: bmp doc docx gif jpe jpeg jpg kmz pdf png psd sc2replay txt xls xlsx zip

    Thread SubscriptionNotification Type:
    Do not follow No email notification Instant email notification Daily email notification Weekly email notification

    Post a Poll
    Yes, post a poll with this thread
    Number of poll options: (Maximum: 25)

    Would become: Info

    and clicking on info would open the above string. Is there a code to allow this?

    Cheers


Comments

  • Closed Accounts Posts: 34,809 ✭✭✭✭smash


    Like a tool tip or a div that expands and collapses?


  • Closed Accounts Posts: 399 ✭✭-Freebird-


    Expanding or collapsing seems like my only option.

    I need to put, say, 20 topics on a webpage but I don't want to build connected subsites because of the particular format needed on the site. Each topic could have a page of information. I need to wrap them otherwise, it's not going to be very easy on the eye :-/


  • Closed Accounts Posts: 34,809 ✭✭✭✭smash


    So create it like an expanding list. Easy to do.


  • Closed Accounts Posts: 399 ✭✭-Freebird-


    This is all a first for me though.

    Am I entering code into the script to make it expandable?


  • Posts: 0 [Deleted User]


    This kind of thing?

    http://jqueryui.com/accordion/


  • Advertisement
  • Closed Accounts Posts: 399 ✭✭-Freebird-


    Hero!

    Will try it now, thanks!


  • Closed Accounts Posts: 34,809 ✭✭✭✭smash




  • Closed Accounts Posts: 399 ✭✭-Freebird-


    Thanks Smash.

    It still won't work for me, I've formatted my text and headings with the code so they're expandable on a web page.

    The web page I'm actually working on doesn't seem to allow htlm scritping, just simple text scripting.

    It's for work, which is why I'm so restricted in what I do.

    I can't do it all on html because that won't follow the same layout as the main page.

    Any suggestions?


  • Closed Accounts Posts: 34,809 ✭✭✭✭smash


    Are you working through a locked down CMS or something? Can you show us the code?


  • Closed Accounts Posts: 399 ✭✭-Freebird-


    The best way to decribe it, is that it's a prebuilt site which gives the user the ability to design their particular page.

    I'd have the option to add something resembling a feedback section, a document repository or a text section.

    If I build a text section/box then I can either enter rich text or I can enter code into the source editor. I want to manipulate this somehow that I can either redirect to a webpage with the expandable text on it but preferrably, I want to add the expandable text to the main page. I don't see this as being an option if the site doesn't seem to interpret html though.


  • Advertisement
  • Closed Accounts Posts: 34,809 ✭✭✭✭smash


    The source editor should accept HTML. It's what webpages are made of...


  • Closed Accounts Posts: 399 ✭✭-Freebird-


    I know that much! :)

    I know it should understand it, it says it on the page "To type HTML source code, click Source Editor."

    But I literally copied the code from the page posted by SBS before making any changes as I knew it would work. It shows all of the text but it's permenantly expanded, there is no option to click in or out of the expanded view.

    What am I doing wrong? *pulls hair out*


  • Closed Accounts Posts: 399 ✭✭-Freebird-


    Ok, new development.

    It works in firefox but not windows explorer.


  • Closed Accounts Posts: 34,809 ✭✭✭✭smash


    Maybe the code editor accepts HTML but will no accept Javascript as a security measure?


  • Closed Accounts Posts: 399 ✭✭-Freebird-


    Looks like it, getting warnings now: 'The webpage contains content which will not be delivered securely using a HTTPS connection'

    There are plenty of these pages being used already though, don't see why my code won't work when some form of code works with explorer on other sub sites of the same main site?


  • Closed Accounts Posts: 34,809 ✭✭✭✭smash


    Sounds like an issue that needs to be raised with whoever implemented the CMS.


  • Closed Accounts Posts: 399 ✭✭-Freebird-


    I'm actually getting warning in Firefox now too.

    "You have requested an encrypted page that contains some unencrypted information. Information that you see or enter on this page could easily be read by a third party."


  • Closed Accounts Posts: 399 ✭✭-Freebird-


    Encrypting it disables the expand feature. Sigh.


  • Registered Users, Registered Users 2 Posts: 953 ✭✭✭hearny


    sounds like you are calling images or scripts via http://www. on a page using SSL so your URL reads https://www.


  • Closed Accounts Posts: 399 ✭✭-Freebird-


    Ok, my issue is that it's pointing to "http://code.jquery.com/jquery-1.8.2.js" which is being detected as a risk factor.

    Obviously, removing this again, stops the expand/collapse feature.

    Can I get a script to do this without pointing to an external site?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 953 ✭✭✭hearny


    You can save the file to your own server.

    Do you have ftp access or a way to upload files.

    Download the file:
    http://code.jquery.com/jquery-1.8.2.js

    Upload it to the web server and take out the http://code.jquery.com/ in the page referencing it.


  • Closed Accounts Posts: 399 ✭✭-Freebird-


    I've gone with another script which is working a lot better for me.

    <head>
    <title>TEXT</title>

    <style type="text/css">
    #ToggleTarget
    {display: none;}
    </style>

    <script type="text/javascript">
    function Toggle()
    {var el = document.getElementById("ToggleTarget");
    if (el.style.display == "block")
    {el.style.display = "none";}
    else {el.style.display = "block";}
    }
    </script>
    </head>

    <body>

    <p><a href="javascript:Toggle();"><font size = "5">NBA</font size = "5"></a></p>

    <div id="ToggleTarget">TEXT<br />TEXT.</div>

    </body>
    </html>

    Just one issue, I'm going to needs a big list but when I add a second option, the toggle is bringing up the information from the first entry and not the the second?


  • Closed Accounts Posts: 34,809 ✭✭✭✭smash


    That's because the ID is 'ToggleTarget' on the first item


  • Closed Accounts Posts: 399 ✭✭-Freebird-


    Tried changing to 'ToggleTarget2', no joy. That should work, shouldn't it?


Advertisement