LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-05-2012, 05:38 AM   #1
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253
Blog Entries: 1

Rep: Reputation: 21
Question Problem running a javascript file?


Hi can anyone tell me how do I run a javascript file that is given in this guide at the link here

Last edited by colucix; 06-06-2012 at 06:01 PM. Reason: Restored misplaced URL.
 
Old 06-05-2012, 12:00 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
The link, you provided points to a page under construction. Are you sure it is what you were supposed to show?
 
Old 06-05-2012, 01:05 PM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
The link is broken. You need to copy and paste the URL rather than clicking it.

OP, you're aware that JavaScript is meant to be embedded in web pages, right? Saying that, I don't know any more about it, so can't help any further unfortunately.
 
1 members found this post helpful.
Old 06-05-2012, 01:10 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
the link is not broken, he simply mixed the link and the text displayed. The correct one is: here, and it definitely works. But I think he has general problems running javascript, it is not related to that page at all. Probably he need to set up a webserver.
 
1 members found this post helpful.
Old 06-06-2012, 12:37 AM   #5
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253

Original Poster
Blog Entries: 1

Rep: Reputation: 21
I have a webserver running.WAMP server 2.2.I dont know how to call that particular JS in an HTML file.
 
Old 06-06-2012, 06:07 PM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
@Ajit Gunge: I've edited your original post to correct the problem reported above. Please, next time you could adjust misplaced URLs or any other typo by yourself, using the EDIT button in your post. Moreover, providing feedback to requests from other members (see Nylex's post) is considered polite from a netiquette point of view. Thank you.

Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 06-06-2012, 09:44 PM   #7
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Rep: Reputation: 47
Definitely no need to run a webserver. Javascript runs locally and is interpreted by your web browser, it is a client side script, not a server side script. In general, this is how you link to a javscript file:

Code:
<script type="text/javascript" src="/path/to/script.js"></script>
It looks like you may need Jquery also to use this script also. You can download Jquery here: http://docs.jquery.com/Downloading_jQuery

Jquery is a .js file just like the one mentioned above, and you link to it just like the example I gave above. Hope this helps.
 
1 members found this post helpful.
Old 06-07-2012, 01:09 AM   #8
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253

Original Poster
Blog Entries: 1

Rep: Reputation: 21
Thank you all for your help.Colucix,next time I will take care that the the URL work.Thanks for correcting the link.Fianlly thanks once again for all your help.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Jar file running problem netpumber Slackware 1 01-28-2009 11:42 AM
Reading/Wirting file/parsing xml file using javascript fakhrul Programming 1 08-14-2007 05:08 PM
problem running a .sh file laney69er Linux - Newbie 2 02-18-2006 11:40 AM
Please help!! Problem on running execute file!! mkwong107 Linux - General 11 10-20-2003 05:59 PM
Please help!! Problem on running execute file!! mkwong107 Linux - General 0 10-20-2003 04:21 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration