|
|||||||
| JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...) |
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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.
__________________
JS > PHP > Everything |
|
#2
|
|||
|
|||
|
|
|
#3
|
||||
|
||||
|
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. |
|
#4
|
|||
|
|||
|
Quote:
Quote:
|
|
#5
|
||||
|
||||
|
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.
__________________
JS > PHP > Everything |
|
#6
|
|||
|
|||
|
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> 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%' Last edited by phpnovice; 03-25-2006 at 10:48 PM. |
|
#7
|
||||
|
||||
|
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 |
|
#8
|
|||
|
|||
|
Congratulations.
![]() Cheers. |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|