SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Hybrid View

  1. #1
    SitePoint Guru davedibiase's Avatar
    Join Date
    Aug 2001
    Location
    Toronto, Canada
    Posts
    829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript resources

    Hi, I was wondering if someone could help me gather some source code to help boost one of my projects user-friendliness. I wanted to use some JavaScript to implement little features here and there to look cool.

    My first request is a function that changes the background of something on click. For example if I define which background I want changed (for example a table or cell) and have a function call the name that relates to that field then it will change it to the color I define in the function.

    My second request is if I have a link/button I would like it to show/unhide code that I specificy. I am not sure how one could do something like this but have it so that the code is in a specific block of HTML, then when the function is called it actually shows the text. This will come in very handy for some of the massive datasheets in my project.

    My third request is: does anyone know where I can get a good FREE wysiwyg just like the one SPF uses? I have tried spaw wysiwyg but it doesnt support too many os's.

    Thanks for any help you can give
    ||Dave Di Biase||
    ----------------------------------
    "There are 2 secrets in life. 1) Never say everything you know."
    GFXWARS - The ultimate graphics battle!

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Rather than simply provide the codes, I'm going to supply some resources:

    www.htmlgoodies.com has excellent basic, easy-to-follow javascript tutorials, as does www.javascriptcity.com

    I have a few dHTML tutorials/scripts at my site (GrassBlade)

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  3. #3
    SitePoint Guru davedibiase's Avatar
    Join Date
    Aug 2001
    Location
    Toronto, Canada
    Posts
    829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, I could have gone to the sources without posting here BUT I dont have too much time for adding these features. Instead of going through tuts I was hoping someone would be kind enough to provide me with the raw code.

    Save me a lot of time reading. Maybe someone has the same code that they have incorporated into their systems and wouldnt mind sharing.
    ||Dave Di Biase||
    ----------------------------------
    "There are 2 secrets in life. 1) Never say everything you know."
    GFXWARS - The ultimate graphics battle!

  4. #4
    SitePoint Guru davedibiase's Avatar
    Join Date
    Aug 2001
    Location
    Toronto, Canada
    Posts
    829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I found some time (by refusing to help someone) and skimmed through the tut that you provided from HTMLgoodies. Excellent tutorial, very compressed and easy to read. My first request would be easy to do but I have a question about the second idea.

    How would I hide/unhide a block of HTML. I was thinking of creating a layer or a <p> give it a name then use the javascript command to hide or unhide.

    Is there a method called hide/unhide?

    Also does anyone know of a good wysiwyg like the one SPF uses?

    Plz help.
    ||Dave Di Biase||
    ----------------------------------
    "There are 2 secrets in life. 1) Never say everything you know."
    GFXWARS - The ultimate graphics battle!

  5. #5
    Non-Member mmi's Avatar
    Join Date
    Jun 2001
    Location
    Rhode Island
    Posts
    587
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Dave

    I'm no scripter, believe mme, so this may be of little help to you. I just can't stand on the shore and watch a man drown.

    I have a function on my site that "makes a block of HTML hide/unhide." Maybe you can adapt it to your needs.
    Code:
    <!--START OF POPMENU-->
    var tabShow=1;
    function hidepoptext() {
       if(tabShow==1) {show('poptextDiv'); tabShow = 0}				 
       else {hide('poptextDiv'); tabShow = 1}}
    function show(object) {
    	if (n) document.layers[object].visibility = 'show';
    	else if (ie) document.all[object].style.visibility = 'visible'
    	else if (n6) document.getElementById(object).style.visibility = 'visible';}
    function hide(object) {
    	if (n) document.layers[object].visibility = 'hide';
    	else if (ie) document.all[object].style.visibility = 'hidden'
    	else if (n6) document.getElementById(object).style.visibility = 'hidden';}
    <!--END OF POPMENU-->
    from http://ememi.com/ - It's "Today's Links" on the left.

    If you go to any of the other main pages on the site, e.g., http://ememi.com/mmi/write.shtml , I have stuff on the right that displays onmouseover instead of onclick.

    Good luck. With help like what I'm offering, you'll need it.

  6. #6
    SitePoint Guru davedibiase's Avatar
    Join Date
    Aug 2001
    Location
    Toronto, Canada
    Posts
    829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm excellent.

    You just saved me a couple hours of extra work, thanks!

    Now the WYSIWYG is important also. Does anyone know of any good ones? I know of people who have ripped the wysiwyg from phpBB, but I dont have time for doing that. Anyone else have any ideas?
    ||Dave Di Biase||
    ----------------------------------
    "There are 2 secrets in life. 1) Never say everything you know."
    GFXWARS - The ultimate graphics battle!

  7. #7
    SitePoint Enthusiast
    Join Date
    Aug 2002
    Location
    Mauritius
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    You can try this Javascript metasearch:

    http://www.javascript-2.com/

    According to its front page it searches over 8,000 javascripts from over a dozen javascript sites.

  8. #8
    SitePoint Zealot Arkkimaagi's Avatar
    Join Date
    Mar 2002
    Location
    Lappeenranta, Finland
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll give you 3 links worth looking. The first is a bit unknown to me, but the other 2 are on my frequent visit list.

    http://www.blueshoes.org/en/javascript/editor/
    It's a bit overkill, but might be worth looking at.

    http://webfx.eae.net/dhtml/richedit/richedit.html
    WebFX has loads of really nice things with javascript

    http://developer.irt.org/script/script.htm
    javascript FAQ:s, the reference I use when I forget something.

  9. #9
    SitePoint Guru davedibiase's Avatar
    Join Date
    Aug 2001
    Location
    Toronto, Canada
    Posts
    829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Someone gave me a tip to check out SF.net (Sourceforge). Looks like they have a ton of wysiwyg JavaScript projects going.

    Im going to sort through and check which is best!
    ||Dave Di Biase||
    ----------------------------------
    "There are 2 secrets in life. 1) Never say everything you know."
    GFXWARS - The ultimate graphics battle!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •