www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > JavaScript

    JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...)

    Reply
     
    Thread Tools Rate Thread Display Modes
      #1  
    Old 03-23-2006, 09:19 PM
    hyperlisk's Avatar
    hyperlisk hyperlisk is offline
    Some guy...
     
    Join Date: Mar 2006
    Location: California
    Posts: 306
    Thumbs up Give me things to add...

    Okay, since no one replied to the other post, I decided to show people what I am doing. I am making a script that tries to make difficult things simpler.

    Right now I have these functions:
    Code:
    ** All of these use the "easy" object name **
    
    easy.GETvars(varName);
    This will return the value of a variable in a URL from a GET method of a form.
    
    easy.imageSwitch(image,newSrc);
    This is not difficult to do, but I put it in because I have no ideas. Anyway, it 
    switches the sources of the image.
    
    easy.showHTMLCode(string);
    This will print out the string with all of the HTML codes showing. It also puts 
    it in a box like this one.
    
    easy.getSelected();
    Returns the value of the text selected by the user.
    
    easy.replaceTextInElement(element,find,replace);
    Replaces all instances of "find" with "replace" in the element you specify.
    
    easy.textTransform.to1337(element);
    Makes the element 1337. What can I say, I was bored.
    You can click here to see it in action, or you can click here to download the script. Give me things to add!
    __________________
    JS > PHP > Everything
    Reply With Quote
      #2  
    Old 03-24-2006, 07:36 PM
    phpnovice phpnovice is offline
    Banned
     
    Join Date: Dec 2004
    Posts: 8,652
    Reply With Quote
      #3  
    Old 03-24-2006, 10:21 PM
    hyperlisk's Avatar
    hyperlisk hyperlisk is offline
    Some guy...
     
    Join Date: Mar 2006
    Location: California
    Posts: 306
    Well, your post was a bit confusing. Is it an actual window? or is it just something like a div? Believe it or not, I will attempt this. (I have nothing better
    to do after I do after I do my homework...) Also, does it automatically pop-up,
    or is it after a certain event?
    __________________
    JS > PHP > Everything

    Last edited by hyperlisk; 03-24-2006 at 10:25 PM.
    Reply With Quote
      #4  
    Old 03-25-2006, 12:26 PM
    phpnovice phpnovice is offline
    Banned
     
    Join Date: Dec 2004
    Posts: 8,652
    Quote:
    Originally Posted by hyperlisk
    Well, your post was a bit confusing. Is it an actual window? or is it just something like a div?
    Yes, it is "just" a DIV -- in the end -- but with most of the characteristics of a true window.
    Quote:
    Originally Posted by hyperlisk
    Also, does it automatically pop-up, or is it after a certain event?
    Both, and more. It should be flexible enough to allow complete control by any and all invocation methods desired by the designer using your resulting function.
    Reply With Quote
      #5  
    Old 03-25-2006, 09:43 PM
    hyperlisk's Avatar
    hyperlisk hyperlisk is offline
    Some guy...
     
    Join Date: Mar 2006
    Location: California
    Posts: 306
    Okay, I have basically everything working except one things. I can't seem to get the location of the cursor in Firefox. Isn't it just window.pageXOffset and window.pageYOffset? On a side note, my "windows" look very bad. I use a div with a table inside of it to create it. Just so I make it good enough, what sort of functions/properties did yours have? Mine has these:
    Code:
    popUps[#].show();    - Show specified pop up.
    popUps[#].hide();    - Hide specified pop up.
    popUps[#].rebuild(); - Rebuild the pop up.
    popUps[#].innerHTML; - Get or set the innerHTML.
    popUps[#].titleBar;  - Get or set the title bar 
                           of the pop up.
    popUps[#].style;     - Get or set a style 
                           attribute.
    popUps[#].width;     - Get or set the pop up's 
                           width.
    popUps[#].height;    - Get or set the pop up's 
                           height.
    popUps[#].open;      - Returns whether the pop 
                           up is open.
    popUps[#].popNum;    - Returns the pop up number.
    All of the popUps are in one array, and to create it you just style a DIV, and set the DIV's class attribute to "popUp." Then you call easy.popUps() to make the array.
    __________________
    JS > PHP > Everything
    Reply With Quote
      #6  
    Old 03-25-2006, 10:41 PM
    phpnovice phpnovice is offline
    Banned
     
    Join Date: Dec 2004
    Posts: 8,652
    Mine uses no tables. Initially creating the Popup is a call similar to this:
    HTML Code:
    <script type="text/javascript">
    window.myPopupObject = MyDHTMLPopup(
            object=document.getElementById("popup"),
            closebtn=true,
            titlebar=true,
            title="Title Text"
    );
    </script>
    The object that can be passed to the ShowPopup() method supports these properties:
    Code:
    action:               "Fixed", "SlideDown", "SlideLeft", "SlideRight", or "SlideUp"
    finalX:               "Center", "Left", "Right", or iPosition
    finalY:               "Center", "Top", "Bottom", or iPosition
    background:                     // composit attribute accepts 'color image repeat attachment position' as one setting
    backgroundColor:      '#colorValue', 'colorName', or 'transparent'
    backgroundImage:      'none' or 'url(sUrl)'
    backgroundRepeat:     'repeat', 'no-repeat', 'repeat-x', or 'repeat-y'
    backgroundAttachment: 'scroll' or 'fixed'
    backgroundPosition:             // composit attribute accepts 'positionX positionY' as one setting
    backgroundPositionX:  'positionValue', 'positionPercentage%', 'left', 'center', or 'right'
    backgroundPositionY:  'positionValue', 'positionPercentage%', 'top', 'center', or 'bottom'
    border:                         // composit attribute accepts 'width style color' as one setting
    borderWidth:                    // composit attribute accepts up to four of the folowing as one setting
    borderBottomWidth:    'medium', 'thin', 'thick', or widthValue
    borderLeftWidth:      'medium', 'thin', 'thick', or widthValue
    borderRightWidth:     'medium', 'thin', 'thick', or widthValue
    borderTopWidth:       'medium', 'thin', 'thick', or widthValue
    borderStyle:          'none', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'window-inset', or 'outset'
    borderBottomStyle:    'none', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', or 'outset'
    borderLeftStyle:      'none', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', or 'outset'
    borderRightStyle:     'none', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', or 'outset'
    borderTopStyle:       'none', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', or 'outset'
    borderColor:                    // composit attribute accepts up to four of the folowing as one setting
    borderBottomColor:    '#colorValue' or 'colorName'
    borderLeftColor:      '#colorValue' or 'colorName'
    borderRightColor:     '#colorValue' or 'colorName'
    borderTopColor:       '#colorValue' or 'colorName'
    padding:                        // composit attribute accepts up to four of the folowing as one setting
    paddingBottom:        'paddingValue' or 'paddingPercentage%'
    paddingLeft:          'paddingValue' or 'paddingPercentage%'
    paddingRight:         'paddingValue' or 'paddingPercentage%'
    paddingTop:           'paddingValue' or 'paddingPercentage%'
    And, including drag-n-drop -- all in 200 lines of code (and without puting more than one line of code per physical line).

    Last edited by phpnovice; 03-25-2006 at 10:48 PM.
    Reply With Quote
      #7  
    Old 03-27-2006, 11:51 PM
    hyperlisk's Avatar
    hyperlisk hyperlisk is offline
    Some guy...
     
    Join Date: Mar 2006
    Location: California
    Posts: 306
    Finally, I got on the internet to post this. Here it is, in all it's simple glory. Mine probably will look so stupid that it isn't even funny. My appearance effects are really simple also. ("fly from left/right/top/bottom"). Anyway, it was fun to make while it lasted... *sigh* here... Now I need a new challenge, maybe something more DOM involved... Anyone?
    __________________
    JS > PHP > Everything
    Reply With Quote
      #8  
    Old 03-28-2006, 08:35 AM
    phpnovice phpnovice is offline
    Banned
     
    Join Date: Dec 2004
    Posts: 8,652
    Congratulations.

    Cheers.
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 01:06 PM.



    Acceptable Use Policy

    Internet.com
    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.