homepage Welcome to WebmasterWorld Guest from 54.196.206.80
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
JavaScript Q&A
DrDoc




msg:3899868
 6:14 pm on Apr 24, 2009 (gmt 0)

In an attempt to bring some life to this forum, and to regain our position as one of the most authoritative resources on all things JavaScript and AJAX, we are launching this simple Q&A section.

What is this?

This thread serves to become a quick reference thread on JavaScript. If you see a phrase you do not understand or recognize, you can turn to this thread to either:
a) find the meaning
b) ask about the meaning, if it has not been covered before

The first post will contain a linked Table of Contents to each question and its answer.

What is this NOT?

This thread is not a place to discuss specific quirks or problems related to a given script. General compatibility questions may be asked, as long as they are generic, and not specific to certain code. Like any other threads in this forum, all posts must adhere to the WebmasterWorld TOS [webmasterworld.com] and the JavaScript Forum Charter [webmasterworld.com].

Only questions and answers should be posted. All other posts may be removed without notice at the best judgement of the moderators.

How will it work?

If you have a question: Simply post your question using as few words as possible. Please label your post with "Question:" so that it can be easily identified. LIMIT ONE QUESTION PER POST.

Example:
Question:
What is the DOM?

If you have an answer: Before posting your answer, please locate the post number for the question you are about to answer. This can be found on the left hand side of the post itself. The post number for this post, for example, is: 3899868

Please label your post with "Answer to post #0000000:" where 0000000 is the post number.

Example:
Answer to post #3899868:
Your detailed (albeit as short as possible) and correct answer goes here.

The original question will be updated with your answer, giving you credit for the answer. Each question will also be linked to below. There will be a separate section for answered and unanswered posts.


Table of Contents
<nothing yet>

Unanswered Questions
<nothing yet>

[edited by: DrDoc at 6:15 pm (utc) on April 24, 2009]

 

ergophobe




msg:3900086
 12:23 am on Apr 25, 2009 (gmt 0)

Q: What's a short list of best practices for cross-browser scripting these days?
[reference num as per the good doctor: 3900086]

httpwebwitch




msg:3900119
 1:11 am on Apr 25, 2009 (gmt 0)

Q: What is "unobtrusive" JavaScript?
[ref num: #3900119]

httpwebwitch




msg:3900121
 1:15 am on Apr 25, 2009 (gmt 0)

Q: How do you set up unit testing for a JavaScript platform? (by platform, I mean, a huge collection of individual scripts used on various pages of a large-scale web application)

[ref num: #3900121 ]

ergophobe




msg:3900465
 4:15 pm on Apr 25, 2009 (gmt 0)

Q: JSON, AJAX and XML-RPC - would someone care to sort these out for me?

ergophobe




msg:3900466
 4:15 pm on Apr 25, 2009 (gmt 0)

Question:
JQuery, Protoype, Scriptaculous - where should I start?

Answer: (by httpwebwitch [webmasterworld.com])
None of the above. Start by learning core JavaScript! You need your JS license before you're allowed to use power tools. That said, three years ago (2006) I would have evangelized Prototype. It was the first really great JS library. Now I'm inclined to recommend either Mootools or JQuery, both are excellent libraries, both borrowed concepts from Prototype; they have comparable features and capabilities.

[edited by: DrDoc at 8:49 am (utc) on April 26, 2009]
[edit reason] Answer added [/edit]

ergophobe




msg:3900468
 4:17 pm on Apr 25, 2009 (gmt 0)

Q: I know about Firebug. Is there something closer to an IDE for building/testing and debugging JS? (maybe this answer might get folded in with #3900121).

httpwebwitch




msg:3900792
 4:52 am on Apr 26, 2009 (gmt 0)

Q: Explain the difference between x=y, x==y, and x===y ?

ergophobe




msg:3901162
 9:57 pm on Apr 26, 2009 (gmt 0)

#3900792
  • = - assignment operator. x now has the same value as y
  • == - comparison operator. Tests whether or not x and y have the same value, but does not change the value.
  • === - identity operator. Same as ==, but with strict type checking as well, so both must be integers, for example. So 1=="1" evaluates to true, but [i]1==="1" evaluates to false.

You need your JS license before you're allowed to use power tools.

Wait, do I need my C license before I'm allowed to use a power tool like Javascript? Do I need my assembly language license before I can use a power tool like C? Paul Graham would say to always use the highest level tools that can get the job done (which is why he uses LISP).

St3v3n




msg:3903752
 3:10 am on Apr 30, 2009 (gmt 0)

hi, im new to web design and i have used xara webstyle 4 to create a vertical navbar, however 1 of the links to a different website doesnt work and is trying to find it from either my pc or home website. im not sure what i have done wrong....the code im trying to alter is below.

(loc+"../","http://www.anywhere.com/","uk_sf_vnavbar_b2",131,32,"Forum","",0);writeButton

can anybody help please?

[edited by: St3v3n at 3:36 am (utc) on April 30, 2009]

St3v3n




msg:3903760
 3:36 am on Apr 30, 2009 (gmt 0)

HIi ppl, no need for a reply, it broke my brain but i found the problem in the end......
the line should say....

("","http://www.anywhere.co.uk/","uk_sf_vnavbar_b2",131,32,"Forum","",0);writeButton

JeffreyMac




msg:3928584
 12:05 pm on Jun 8, 2009 (gmt 0)

Question: How do you change each individual image size (with mouseover) of images in a table?

St3v3n




msg:3929231
 4:11 am on Jun 9, 2009 (gmt 0)

Hi, i'm not too sure about the answr to this as i don't understand javascipt but my guess would be by manually altering the image size in an image editor or in the html code in frontpage (split view, click on button and change size in the html), i havent had that problem and not sure if i will as i am now making vertical navigation buttons seperate without the use of javascript, possibly end up learning actionscript 3.0 and creating them in flash.
Sorry if none of that was any help to you, if it wasn't i'm sure someone will know the answer to it

St3v3n




msg:3929232
 4:14 am on Jun 9, 2009 (gmt 0)

or even as a guess u would change the 2 numbers in the line to whatever suits ur image....(131=width,32=height)
("","http://www.anywhere.co.uk/","uk_sf_vnavbar_b2",131,32,"Forum","",0);writeButton

JeffreyMac




msg:3929635
 3:25 pm on Jun 9, 2009 (gmt 0)

The following scripting language will change the size of an individual image by running the mouse over the image. I can't figure out how to individually alter the size of multiple images in a table.

<html>
<head>
<script type="text/javascript">
function moveover()
{
document.getElementById('image').width="200";
document.getElementById('image').height="360";
}
function moveback()
{
document.getElementById('image').width="100";
document.getElementById('image').height="180";
}
</script>
</head>

<body>

<b>Mouse over the image:</b><br />
<img id="image" src="bulbon.gif"
onmouseover="moveover()"
onmouseout="moveback()"
width="100" height="180" />

</body>
</html>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved