User Profile

Collapse

Profile Sidebar

Collapse
svendok
svendok
Last Activity: Apr 14 '11, 09:13 PM
Joined: Jun 2 '10
Location: Oklahoma City
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • svendok
    started a topic using an array's extended properties in jQuery

    using an array's extended properties in jQuery

    What does one have to do in the code below to allow jQuery to make use of the find() function that I added to the array object (see line #26)?

    Is there a namespace clash?

    The code is here http://jsbin.com/oluyu6/5/edit

    Thanks.

    Code:
      Array.prototype.find = function(searchStr) {  
         // http://www.hunlock.com/blogs/Mastering_Javascript_Arrays#quickIDX39
         var returnArray
    ...
    See more | Go to post

  • svendok
    replied to parameter not passed by jQuery
    Oh, I see what you mean. I solved it with this:
    var numselected=$(" #"+list_id+" option:selected ").length;

    which removed that 2nd function entirely.

    Thanks.
    See more | Go to post

    Leave a comment:


  • svendok
    replied to parameter not passed by jQuery
    Well, the thing is that I'm trying to make these functions refactor-able. If I use $("#first option:selected ").length inside the selectedLength( ) function, it obviously becomes a one-off function.
    See more | Go to post

    Leave a comment:


  • svendok
    replied to parameter not passed by jQuery
    Thanks for the response. I'm (probably obviously) a newbie to jQuery. What syntax should I be using instead?

    I find it weird, because a bunch of other functions with form objects passed this way seem to work fine. Is there a different syntax because the object involved is bound to the function? Were it normal JS, I'd just use "this", but didn't work.

    Thanks.
    See more | Go to post

    Leave a comment:


  • svendok
    started a topic parameter not passed by jQuery

    parameter not passed by jQuery

    Can anyone tell me why the selectedLength function is failing in the code below?

    It can be played with here: http://jsbin.com/oluyu6/3/edit

    Thanks.

    Svend


    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <meta charset=utf-8
    ...
    See more | Go to post

  • Hmm, the plot thickens. Thank you yet again!
    See more | Go to post

    Leave a comment:


  • True. The target solution isn't perfect in this case, since IE doesn't allow you to close that window using window.close() (FF does). So the IE user has to click a confirmation message every time. But I can live with that for now.
    See more | Go to post

    Leave a comment:


  • Man, I'm an idiot. That's so simple, it's obscene. Thank you!
    See more | Go to post

    Leave a comment:


  • jQuery: recreating a form's contents in hidden fields on a 2nd page

    I have a CGI-style web application using static HTML (an SAS IntrNet app) that submits a form to the server and then gets a report back.

    I want to change it so that the output is opened in a separate window which gets created using JavaScript.

    That means I need to grab all the form selections and hidden fields and pass them to the new window, plug them into a new form and submit to the server.

    What's...
    See more | Go to post

  • svendok
    replied to Regex for matching over 2 lines
    in Perl
    Thanks, Miller, that's very helpful! Didn't know that about Perl and Windows line breaks.
    See more | Go to post

    Leave a comment:


  • svendok
    replied to Regex for matching over 2 lines
    in Perl
    Thank you! I can't believe I forgot that...

    So I guess the patterns would be:
    Search:
    Code:
    (.*) = (.*)\r\n(.*) = (.*)
    Replace:
    Code:
    $1 = $4\r\n$3 = $2
    See more | Go to post
    Last edited by svendok; Feb 25 '11, 05:18 PM. Reason: Giving code.

    Leave a comment:


  • svendok
    started a topic Regex for matching over 2 lines
    in Perl

    Regex for matching over 2 lines

    Hi,
    I have thousands of lines of code like this:
    Code:
    Blah1 blah1 blah1 = A1;
    Yada1 yada1 yada1 = B1;
    Blah2 blah2 blah2 = A2;
    Yada2 yada2 yada2 = B2;
    I want to swap the A value with the B value.

    What is the syntax for a Perl regex that would do this? I'm struggling with the line break.

    Thanks in advance.

    svend
    See more | Go to post

  • svendok
    replied to How to save a list of links as PDFs?
    in .NET
    Thanks, Oralloy. Doing it manually is definitely out of the question, as there are thousands of links.

    Want I want to do is save all my Delicious bookmarks to an HTML file and then somehow script each one being opened and saved as PDF. That way I can not only save them, but search their content locally using Google Desktop or whatever.

    I'm okay at Perl and VBA, but I'm not familiar with the PDF functionality available in...
    See more | Go to post

    Leave a comment:


  • svendok
    started a topic How to save a list of links as PDFs?
    in .NET

    How to save a list of links as PDFs?

    I have an HTML file that's a long, long list of links to important articles. I want to save each of those links locally, preferably as a PDF.

    Any suggestions on the best approach? Thanks in advance.
    See more | Go to post

  • cookie problem with frameset involving 2 domains

    Hi,
    I have a site whose every page uses JavaScript to redirect visitors to a site use agreement page until they've accepted the agreement. When they click OK, a cookie is saved and the pages stop redirecting.

    It worked fine until the site was displayed from within a wrapper page sitting on a different domain.

    Here's the set-up:
    • The page the user opens is a frameset on Domain A ( www.blah.net/wrapper.html).
    • The
    ...
    See more | Go to post

  • svendok
    replied to DHTML menu hidden by DIV in IE
    I figured it out. The container surrounding the DHTML code (in this case, "lh-col") needs to have a higher z-index value than the other DIV (in this case "content-zone").
    See more | Go to post

    Leave a comment:


  • svendok
    started a topic DHTML menu hidden by DIV in IE

    DHTML menu hidden by DIV in IE

    Hi,
    I am trying to implement a DHTML nav menu and I'm having a problem in IE8.

    The page basically has 2 content areas in DIV tags. The menu is in the 1st DIV on the left and the page content is in the main DIV on the right.

    The problem is that when the menu expands on mouseover it goes under the content area to its right. (Only happens in IE.)

    Any suggestions on how I can send the content area DIV ("content-zone")...
    See more | Go to post
    Last edited by svendok; Jul 16 '10, 07:28 PM. Reason: JS code isn't relevant to the solution

  • svendok
    replied to Long text moves a DIV in FF
    Thanks for the reminder, Dr. H.

    I do realize "<h1 align=center>" is bad form--that was inserted by Dreamweaver--but being new to CSS I don't know why the clearing DIV's are bad (or even why they're there in the first place to be honest). I got the basic code from a CSS generator site.

    Guess I need to educate myself on this.


    Thanks....
    See more | Go to post

    Leave a comment:


  • svendok
    replied to Long text moves a DIV in FF
    Okay, just making sure this wasn't some monster I should recognize. Never have time to play the games anymore. [Sigh]...
    See more | Go to post

    Leave a comment:


  • svendok
    replied to Long text moves a DIV in FF
    Looks like I fixed it. Doesn't seem like it was the width settings that did the trick but simply experimenting with the position: property.


    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>2 col</title>
    <style type="text/css">
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...