473,569 Members | 2,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript Functions

I am learning HTML for the first time taking a self teaching class
though my local Community College. Normally this college rocks and has
some of the best resources and down to earth teachers that pick books
that acutally help folks.

Well they failed and my book take more logic jumps that Stephen
Hawkins! :D

So my ultimate question is as follows:

How do I created a function with the following information provided:

Create a fucntion named Mquote that contains the single parameter,
Qnum.

My apologies for such little information. I am sure its my oversight
that I am unable to locate the answer to my question.

What I am looking for is the base layout for noob java functions.

Thanks!

Jul 23 '05 #1
7 1062
Wintersrush,

You want to create a function that takes in a single parameter:

function Mquote(Qnum)
{
//...code to be executed here...
}

Jul 23 '05 #2
Winters rush wrote:
[...]
How do I created a function with the following information provided:

Create a fucntion named Mquote that contains the single parameter,
Qnum.


var Mquote= function(Qnum){//statements }

Mick
Jul 23 '05 #3
function Mquote (Qnum)
{
//Code
}
**web.dev: You forgot your end of function marks**

Jul 23 '05 #4
ve***********@g mail.com wrote:
function Mquote (Qnum)
{
//Code
}

**web.dev: You forgot your end of function marks**


No he didn't, and if you wanted to reply to web.dev why did you post
your reply to Mick Whilte's post? Looks like you need to find yourself a
functional newsreader.

Richard.
Jul 23 '05 #5
ve***********@g mail.com wrote:
function Mquote (Qnum)
{
//Code
}
**web.dev: You forgot your end of function marks**


This is a copy paste of web.dev's post:
function Mquote(Qnum)
{
//...code to be executed here...
}

Where exactly is the "end of function marks" you are babbling about?
Perhaps if you would read this groups FAQ before posting, you would know
to quote what you are replying to and quoting the above code would have
helped you recognize that the code posted was indeed a complete answer,
not missing anything.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #6
Randy Webb wrote:
ve***********@g mail.com wrote:
function Mquote (Qnum)
{
//Code
}
**web.dev: You forgot your end of function marks**


This is a copy paste of web.dev's post:
function Mquote(Qnum)
{
//...code to be executed here...
}

Where exactly is the "end of function marks" you are babbling about?
Perhaps if you would read this groups FAQ before posting, you would know
to quote what you are replying to and quoting the above code would have
helped you recognize that the code posted was indeed a complete answer,
not missing anything.


Perhaps the reference was to the 'missing' //--> ;-)

--
Rob
Jul 23 '05 #7
Richard Cornford wrote:
ve***********@g mail.com wrote:
function Mquote (Qnum)
{
//Code
}

**web.dev: You forgot your end of function marks**


No he didn't, [...]


I did not check ECMAScript about that, but for all practical purposes he
did. The single-line comment includes the `}' and so the `}' after the
function body is missing which results in a syntax error in Firefox
1.0.4/GNU/Linux.
PointedEars
Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1834
by: whimsica | last post by:
I'm investingating a c++ api, Panda3d.com, that has a python binding. I want to convert this api into an ACtiveX control so it will run on the web. When I do so I want to use Microsoft Script Control to call api routines from Javascript in the browser. Let's say I write up a game in python with my own functions. Then I embed it in a web...
9
2102
by: Charlene Russ | last post by:
Learn on-line at your own in a user-centered format with plenty of interaction and personal attention. This is a basic level coursed designed to introduce the novice to intermediate computer user to the JavaScript language, and focuses on creating user interactivity on personal websites. This Object Oriented Language is known for creating a...
6
1994
by: Alex Fitzpatrick | last post by:
Just by way of introduction, I'm currently the principal developer and maintainer of the a JavaScript editor plug-in for Eclipse. https://sourceforge.net/projects/jseditor/ The plug-in as it stands supports syntax highlighting and outlining of functions, classes and their methods.] When I took over the project in June it was for the...
18
4359
by: Arthur Connor | last post by:
Is there a way of extracting the Javascript code from the "normal" HTML code (e.g. similar to CSS code which can be put into a separate file) ? If you offer a solution: can I determine in your solution where and which part of the code should be placed/inserted in the main HTML code? Sometimes a Javascript functionality is split up to...
136
9251
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to...
2
4056
by: Jeronimo Bertran | last post by:
A couple of questions I am having problems with converting my JavaScript to C#. I have the following code using JavaScript for the mouseover handler that works fine: <SCRIPT language=JavaScript> function MyMouseOver() {
11
2767
by: Nathan Sokalski | last post by:
I add several JavaScript events (onchange, onkeypress, etc.) to Controls using the Add method of the Attributes collection. However, if the JavaScript code contains certain characters, such as & or < or several others, it converts them to html, such as &amp; or &lt; which can sometimes cause my scripts not to work. How can I prevent ASP.NET from...
1
25638
pbmods
by: pbmods | last post by:
VARIABLE SCOPE IN JAVASCRIPT LEVEL: BEGINNER/INTERMEDIATE (INTERMEDIATE STUFF IN ) PREREQS: VARIABLES First off, what the heck is 'scope' (the kind that doesn't help kill the germs that cause bad breath)? Scope describes the context in which a variable can be used. For example, if a variable's scope is a certain function, then that...
2
2498
by: Peter Michaux | last post by:
Douglas Crockford doesn't seem to like JavaScript's built-in syntax for building new objects based on a prototype object. The constructor function, its prototype property and the "new" keyword all seem very offensive to him. For over a year, Crockford has proposed an alternate way of using prototypes like this function object(o) { function...
23
2597
Frinavale
by: Frinavale | last post by:
JavaScript is a very strange place for me... So, I decided that, before I attempt to create an Object, I should first learn about Objects. I had actually created one before with the help of a tutorial. The tutorial was complicated because showed me how to create a JavaScript Object that is a representation my .NET Object and how to get the two...
0
7698
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7673
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7970
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.