User Profile

Collapse

Profile Sidebar

Collapse
Roamer
Roamer
Last Activity: Jul 14 '20, 11:32 AM
Joined: Dec 16 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Forget it

    Forget it, I'll not bother
    See more | Go to post

    Leave a comment:


  • Roamer
    started a topic How to insert the image at cursor position

    How to insert the image at cursor position

    I have an insertion of an image into my editor. It works very well, but...

    The image only inserts after all the text.

    How can I insert the image at the cursor position?

    The Javascript in a .js file (not needed for this query):
    Code:
    function gimg(str) {var e = getRefById('Entry'), s = null, r = null; if(e) {if((s = document.selection) && s.createRange) {var repos = false; e.focus(); 
     if((r
    ...
    See more | Go to post

  • Roamer
    replied to Insert code only link into textarea
    Thanks

    HTML in a textarea is standard for editors. The code gets parsed when processed.
    See more | Go to post

    Leave a comment:


  • Roamer
    started a topic Insert code only link into textarea

    Insert code only link into textarea

    This should be very simple.
    It is NOT a live link!
    I have no idea how to do this, so need some help please.

    Code:
    <form>
    <input type="button" id="link" value="Link"><br>
    <textarea name="message" style="width:40%; height:100px;">
    <a href="http://domain.com">Name</a>
    </textarea><br>
    ...
    See more | Go to post

  • Roamer
    replied to Count file
    in Perl
    Thanks Luuk, I'll give that a try. Dunno why I didn't think of that in the first place. Just needs another conditional.
    See more | Go to post

    Leave a comment:


  • Roamer
    started a topic Count file
    in Perl

    Count file

    Hi, I have a file which counts the actual visits to my site pages (not a hit counter).

    It works fine, but I have to manually wipe it each month.

    Is there an easy way (without modules) to zero out the file on the first day of the month 01 ($mday) only once! Which means it has to ignore the $mday of 01 after the first time. I can zero the file okay, but from there is beyond my skill.

    Then every visit to...
    See more | Go to post

  • Roamer
    replied to Finding the RSS Feed
    in Perl
    Can some out there help?
    See more | Go to post

    Leave a comment:


  • Roamer
    started a topic Finding the RSS Feed
    in Perl

    Finding the RSS Feed

    On blogs, you have an RSS Feed.

    In the heading of the page (usually the homepage) there is this:
    Code:
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://anydomain.com/somekindofname.xml">
    Note: there is no way of knowing the exact name of the feed, from the site url alone. It has to be found.

    Using Perl
    Is...
    See more | Go to post

  • Roamer
    replied to Insert image from prompt
    No response yet.

    Have been unwell and just been able to get back here.

    This works in chrome okay but not in Internet Explorer. IE is the one I have to have a space and select it.

    So what do I do to make it work with IE?

    Thanks
    See more | Go to post

    Leave a comment:


  • Roamer
    started a topic Insert image from prompt

    Insert image from prompt

    Hi, have a problem and do not know hot to solve it.

    Image needs to insert where the cursor is.

    I have to hit the space bar, select the space, then insert the image (works).

    How do I insert the image exactly the where cursor is?

    Code:
    <html>
    <head>
    <title>image problem</title>
    <script type="text/javascript">
    <!-- 
    function
    ...
    See more | Go to post

  • Roamer
    replied to File write problem
    in Perl
    Thanks Ron. I use that method for other stuff, but didn't try it here (my Duhh).

    Works fine, thanks again.
    See more | Go to post

    Leave a comment:


  • Roamer
    started a topic File write problem
    in Perl

    File write problem

    Normally I'm okay writing files, but this is something I have never tried before and am not getting the correct result in the new file.

    A file contains some text with a header. I can grab the header okay. What I want to do is write the entire rest of the file to a new one.

    The problem is, it only writes the last line to the new file.

    Text File (real one would contain a lot more)
    Code:
    Aaaaaa
    ...
    See more | Go to post

  • Roamer
    replied to Multiple records in rows
    in Perl
    Got it sorted - thanks
    See more | Go to post

    Leave a comment:


  • Roamer
    replied to Multiple records in rows
    in Perl
    Hi again Ron, I'll try to explain.

    The initial script shows the entire file. 4 rows with 3 records each. If I want to only show 2 of those rows, then somehow those rows have to be broken up in such a way that I can define how many rows I want to show.

    I'm not even sure it can be done, but if so then good. If not, then I'll just have to leave it at only one row and be done with it.

    The database is tiny,...
    See more | Go to post

    Leave a comment:


  • Roamer
    replied to Multiple records in rows
    in Perl
    Hi Ron, thanks for that, but it's kind of going backwards for me. I started with something like a month ago and got to the point where I posted the thread.

    I'm more an artist so programming is really hard for me. Let's go visual.

    It's based on the ID (once I have that working the rest can be done by myself). So here's the concept:

    01 02 03 (first row - 3 different records)
    04 05 06 (second row -...
    See more | Go to post

    Leave a comment:


  • Roamer
    replied to Multiple records in rows
    in Perl
    Anybody out there got an answer?
    See more | Go to post

    Leave a comment:


  • Roamer
    started a topic Multiple records in rows
    in Perl

    Multiple records in rows

    Multiple records in rows
    Hi I have a partial solution working to show so many records in a row.

    How to make it work so only, say, 2 rows show - I don't know how to do.

    file.txt
    Code:
    01|Aaaa|
    02|Bbbb|
    03|Cccc|
    04|Dddd|
    05|Eeee|
    06|Ffff|
    07|Gggg|
    08|Hhhh|
    09|Iiii|
    10|Jjjj|
    11|Kkkk|
    12|Llll|
    Perl script...
    See more | Go to post

  • Roamer
    replied to First Image Grab
    in Perl
    Now sorted it. Thanks for input.
    See more | Go to post

    Leave a comment:


  • Roamer
    replied to First Image Grab
    in Perl
    I've decided that this is going to get too long winded just to get the image, let alone resize and position it. It'll be easer in the long run for me to just be picky about the first image. Then include it in the number of words assigned to my teaser text and have one less teaser.

    Thanks a lot for your input, I have learned something, so it hasn't been a total waste.
    See more | Go to post

    Leave a comment:


  • Roamer
    replied to First Image Grab
    in Perl
    Hi guys,
    Neither of these will work with my code. I don't use the CGI module because it's too overbloated and can't design around it easily.

    I should have posted the sub routine in the first place, sorry. Just thought it would be a little thing.


    Code:
    ## --- This is the part where image is needed --- ##
    else {
    @words = split(/\s+/, $fd[3]); ## the full text of the entry
    
    # I think
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...