jQuery-LiveUrl icon indicating copy to clipboard operation
jQuery-LiveUrl copied to clipboard

Works Great … But Then What???

Open jdaliani opened this issue 10 years ago • 6 comments

I apologize for being a bit of a JQuery novice (I'm currently taking an online class), so please forgive me if this question has already been answered, but I can't seem to find the resolution within the closed issues. Anyway, this is BY FAR the best one of these types of scripts I've seen. However, I'm at a loss as to how to go about extracting the same data and features once the text within the text area is saved and retrieved. In other words, once the user fills in the text area and submits it through a form, I want to be able to call that content from a database and then display that content in the same way with LiveURL, with all of the urls automatically parsed and so forth - within a DIV or some other DOM element identified by ID, or Name, or whatever. The function seems to be contingent upon a click event, and I can't seem to figure out how to modify it so as to automatically run on the $("document").ready(function(). So I guess my question/point is that it would be great if this could be expanded to include the complete process, both before and after form submission. Thanks

jdaliani avatar May 17 '14 12:05 jdaliani

Hi there,

On my fork (https://github.com/ezilocchi/jQuery-LiveUrl), I added a method for doing that processUrl. You can take a look at a demo HTML: https://github.com/ezilocchi/jQuery-LiveUrl/blob/master/template_example.html#L93-L96

If you need another way of using it, let me know. Probably I can help you

ezilocchi avatar May 17 '14 19:05 ezilocchi

Hey thanks for your response! That works great, but it's contingent upon a post event, and extracting the subsequent content display from that which was posted. What I'm talking about is simply retreiving a set of records from a database, and having them display with the accompanying LivdURL thumbnails, players, previews ect.

So in other words, for example:

SELECT StoogeName,TextContent from MyDataTable WHERE type = 'stooge'

And then display the results in a loop like so, BUT with the Live URL accompanying thumbnails, players, previews ect displaying with each entry on load.

<. div id="Mo" .> The website is www.mohoward.com <. /div .>

<. div id="Larry" .> The website is www.larryfine.com <. /div .>

<. div id="Curly" .> The website is www.curlyhoward.com <. /div .>

Anyhow, I've been messing with it for a while now, but can't seem to identify where in the script the event directive should be replaced, and with what. like I said, I'm a little new to JQuery (I'm currently taking the Lynda.com classes).

jdaliani avatar May 19 '14 14:05 jdaliani

Hey Guys,

sorry in the moment i have'nt time for it. Greets Steve

stephan-fischer avatar May 19 '14 15:05 stephan-fischer

@jdaliani Take a look at https://github.com/ezilocchi/jQuery-LiveUrl/blob/master/jquery.liveurl.js#L120

ezilocchi avatar May 21 '14 03:05 ezilocchi

Mmmm … Yeah! That looks promising.I'll play around with that some. Thanks so much!

jdaliani avatar May 23 '14 12:05 jdaliani

I am using this plugin with MVC and it works really well

Basically I am making a copy (jquery clone) of the .inner Div and serializing to a hidden field bound to my data model.

Once its in the model I clean up line breaks and send it back to the page from the DB.

If only it support Image upload.

darrenst avatar Feb 16 '17 19:02 darrenst