Advertise Here

Author Topic: Where can I learn Javascript?  (Read 14411 times)

0 Members and 1 Guest are viewing this topic.

Offline webworldx

  • Code Master's
  • *
  • Posts: 31
    • View Profile
    • InvisionFusion

  • Total Badges: 15
    Badges: (View All)
    Windows User Topic Starter Combination Level 3 Level 2
Re: Where can I learn Javascript?
« Reply #15 on: December 11, 2006, 02:12:02 am »
Hey crasyandconfused, I wrote a tutorial on "forum" coding a while back, i'd be happy to send it to you if you wanted it.

Offline Crasy

  • Global Moderator
  • *
  • Posts: 3960
  • Semi-Retired ;)
    • View Profile

  • Total Badges: 29
    Badges: (View All)
    Poll Starter Poll Voter Seventh year Anniversary Arcade Highscore Windows User
Re: Where can I learn Javascript?
« Reply #16 on: December 11, 2006, 01:48:28 pm »
Hey crasyandconfused, I wrote a tutorial on "forum" coding a while back, i'd be happy to send it to you if you wanted it.
That would be amazing if you could.

Hey, great to see you back around here eh? Your Swap Images code has come into more use than you can possibly imagine lately.
Did my answer help you? Want to help out hosting costs?


Every donation counts.

Offline webworldx

  • Code Master's
  • *
  • Posts: 31
    • View Profile
    • InvisionFusion

  • Total Badges: 15
    Badges: (View All)
    Windows User Topic Starter Combination Level 3 Level 2
Re: Where can I learn Javascript?
« Reply #17 on: December 11, 2006, 04:06:01 pm »
Heh, I did see some of the topics - thanks. I ran out of ideas to be honest after SMFForFree started adding things I was doing admin side :)

Offline Crasy

  • Global Moderator
  • *
  • Posts: 3960
  • Semi-Retired ;)
    • View Profile

  • Total Badges: 29
    Badges: (View All)
    Poll Starter Poll Voter Seventh year Anniversary Arcade Highscore Windows User
Re: Where can I learn Javascript?
« Reply #18 on: December 11, 2006, 04:13:43 pm »
Heh, I did see some of the topics - thanks. I ran out of ideas to be honest after SMFForFree started adding things I was doing admin side :)

The number of requests and suggestions around here keeps growing and growing and growing lately. I'm sure you'll think of something.

Actually...I do have a little request. You think you could make an "easy" Swap Images code? A little script that does it all for you?
A couple input boxes, put in the URL's and it generates the code.

Cause even after you set the code up ever sooo easily most people still couldn't figure it out. Just a request...
Did my answer help you? Want to help out hosting costs?


Every donation counts.

guest4485

  • Guest
Re: Where can I learn Javascript?
« Reply #19 on: June 04, 2008, 10:25:39 pm »
aint it the same?
NOOOOO Java and JavaScript ARE COMPLETLY DIFFERENT
Java = A Coding Language(for advanced programmers)
JavaScript = A SCRIPTING Language (created by the people from Netscape)
an example of Java is
Code: [Select]
import java.awt.BorderLayout;
import java.awt.Rectangle;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;

import javax.swing.DefaultListModel;
import javax.swing.DropMode;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.TransferHandler;

public class DnDDemo3 {
  public static void main(String[] args) {
    JPanel north = new JPanel();
    north.add(new JLabel("Drag from here:"));
    JTextField field = new JTextField(10);
    field.setDragEnabled(true);
    north.add(field);

    final DefaultListModel listModel = new DefaultListModel();
    listModel.addElement("first");
    listModel.addElement("second");
    final JList list = new JList(listModel);
    list.setDragEnabled(true);

    list.setTransferHandler(new TransferHandler() {
      public boolean canImport(TransferHandler.TransferSupport support) {
        if (!support.isDataFlavorSupported(DataFlavor.stringFlavor)) {
          return false;
        }
        JList.DropLocation dl = (JList.DropLocation) support.getDropLocation();
        if (dl.getIndex() == -1) {
          return false;
        } else {
          return true;
        }
      }

      public boolean importData(TransferHandler.TransferSupport support) {
        if (!canImport(support)) {
          return false;
        }

        Transferable transferable = support.getTransferable();
        String data;
        try {
          data = (String) transferable.getTransferData(DataFlavor.stringFlavor);
        } catch (Exception e) {
          return false;
        }

        JList.DropLocation dl = (JList.DropLocation) support.getDropLocation();
        int index = dl.getIndex();
        if (dl.isInsert()) {
          listModel.add(index, data);
        } else {
          listModel.set(index, data);
        }
        Rectangle r = list.getCellBounds(index, index);
        list.scrollRectToVisible(r);
        return true;
      }
    });
    JScrollPane center = new JScrollPane();
    center.setViewportView(list);

    list.setDropMode(DropMode.USE_SELECTION);
    JPanel cp = new JPanel();
    cp.setLayout(new BorderLayout());
    cp.add(north, BorderLayout.NORTH);
    cp.add(center, BorderLayout.CENTER);
    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setContentPane(cp);
    frame.pack();
    frame.setVisible(true);
  }
}

An example of javascript is as simple as
Code: [Select]
<script type="text/javascript">
document.write('<p>What ever you want to write<\/p>');
</script>
This would write simple text that says
What ever you want to write

Offline Crasy

  • Global Moderator
  • *
  • Posts: 3960
  • Semi-Retired ;)
    • View Profile

  • Total Badges: 29
    Badges: (View All)
    Poll Starter Poll Voter Seventh year Anniversary Arcade Highscore Windows User
Re: Where can I learn Javascript?
« Reply #20 on: June 05, 2008, 06:34:37 am »
aint it the same?
NOOOOO Java and JavaScript ARE COMPLETLY DIFFERENT
Java = A Coding Language(for advanced programmers)
JavaScript = A SCRIPTING Language (created by the people from Netscape)
an example of Java is
Code: [Select]
import java.awt.BorderLayout;
import java.awt.Rectangle;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;

import javax.swing.DefaultListModel;
import javax.swing.DropMode;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.TransferHandler;

public class DnDDemo3 {
  public static void main(String[] args) {
    JPanel north = new JPanel();
    north.add(new JLabel("Drag from here:"));
    JTextField field = new JTextField(10);
    field.setDragEnabled(true);
    north.add(field);

    final DefaultListModel listModel = new DefaultListModel();
    listModel.addElement("first");
    listModel.addElement("second");
    final JList list = new JList(listModel);
    list.setDragEnabled(true);

    list.setTransferHandler(new TransferHandler() {
      public boolean canImport(TransferHandler.TransferSupport support) {
        if (!support.isDataFlavorSupported(DataFlavor.stringFlavor)) {
          return false;
        }
        JList.DropLocation dl = (JList.DropLocation) support.getDropLocation();
        if (dl.getIndex() == -1) {
          return false;
        } else {
          return true;
        }
      }

      public boolean importData(TransferHandler.TransferSupport support) {
        if (!canImport(support)) {
          return false;
        }

        Transferable transferable = support.getTransferable();
        String data;
        try {
          data = (String) transferable.getTransferData(DataFlavor.stringFlavor);
        } catch (Exception e) {
          return false;
        }

        JList.DropLocation dl = (JList.DropLocation) support.getDropLocation();
        int index = dl.getIndex();
        if (dl.isInsert()) {
          listModel.add(index, data);
        } else {
          listModel.set(index, data);
        }
        Rectangle r = list.getCellBounds(index, index);
        list.scrollRectToVisible(r);
        return true;
      }
    });
    JScrollPane center = new JScrollPane();
    center.setViewportView(list);

    list.setDropMode(DropMode.USE_SELECTION);
    JPanel cp = new JPanel();
    cp.setLayout(new BorderLayout());
    cp.add(north, BorderLayout.NORTH);
    cp.add(center, BorderLayout.CENTER);
    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setContentPane(cp);
    frame.pack();
    frame.setVisible(true);
  }
}

An example of javascript is as simple as
Code: [Select]
<script type="text/javascript">
document.write('<p>What ever you want to write<\/p>');
</script>
This would write simple text that says
What ever you want to write

Dude, the last reply to this thread was 2 years ago  :P
Did my answer help you? Want to help out hosting costs?


Every donation counts.

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
6584 Views
Last post July 11, 2007, 12:40:04 pm
by doggiedoo86
3 Replies
2047 Views
Last post March 19, 2007, 02:49:53 pm
by Crasy
0 Replies
3276 Views
Last post February 04, 2008, 07:28:49 pm
by slayer766
0 Replies
1065 Views
Last post May 05, 2008, 05:36:39 pm
by Firestar
3 Replies
3643 Views
Last post June 04, 2008, 11:26:18 pm
by guest4485