www.webdeveloper.com
Results 1 to 2 of 2

Thread: how to run javascript inside Aptana

  1. #1
    Join Date
    Sep 2013
    Posts
    6

    how to run javascript inside Aptana

    I just downloaded Aptana studio 3.I created a new web project.Now inside the root directory of the project I created my html file.I created a new file by right clicking on the js folder(the one inside aptana) and named it practice.js.Below is the code for the 2 files.
    Code:
    <!doctype html>
    <html>
    <head>
    	<title>Practice Canvas in Aptana</title>
    	<style>
    	canvas{
    	border : 1px solid black;
    	}
    	</style>
    	<script src="C:\Users\<myusername>\Documents\Aptana Studio 3 Workspace\practice\js\practice.js"></script>
    </head>
    <body>
    <canvas id="drawingBoard" width="600" height="200"></canvas>
    <p>
    	<label for="shape">Select shape : </label>
    	<select id="shape" >
    		<option value="square">Square</option>
    		<option value="circle">Circle</option>
    		<option value="triangle">Triangle</option>
    	</select>
    	<br>
    	<p>
    	<input type="button" id="goButton" value="Go">
    	</p>
    
    </body>
    </html>
    Code:
    window.onload = function(){
     alert("Hello");
    };
    My javascript is still not running.What do i do???

    Thanks in advance.

  2. #2
    Join Date
    Sep 2013
    Posts
    6
    problem solved guys....just had to change the path of the src in script tag to js/practice.js

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles