62 Posted Topics

Member Avatar for aashishn86

This can easily be done using the [URL="http://www.w3schools.com/jsref/jsref_split.asp"]split()[/URL] method. Here is an example: [CODE=JavaScript]function splitNames(names) { return names.split("/").length; } var names = "aashish/ankush"; alert("There are " + splitNames(names) + " names in the names list.");[/CODE] The [ICODE]split()[/ICODE] function has one parameter, [ICODE]separator[/ICODE], which defines the character(s) that you want to …

Member Avatar for mail2saion
0
325
Member Avatar for Lib Auth

CSS and JavaScript aren't interchangeable languages. They each are designed to do specific things. CSS is for styling the page, and JavaScript is for controlling your HTML dynamically (and for form validation). CSS has some :hover effects that are similar to JavaScript's onMouseover, but you can't recreate a JS animation …

Member Avatar for Airshow
0
102
Member Avatar for new2JS

This isn't the right forum. Please ask this question in the [URL="http://www.daniweb.com/forums/forum9.html"]Java forum[/URL], not Java[U]Script[/U]. They are two very different programming languages.

Member Avatar for peter_budo
0
96
Member Avatar for billymcguffin

The best way to do this is to use Regular Expressions (RegExp). This is a useful, shorthand way to search a string for a certain value. Here's a regular expression to search for a word in JavaScript. Regular Expressions work in most programming languages, so if you're using another, say …

Member Avatar for Airshow
0
564
Member Avatar for Ries

The problem is line 22. You have a string that doesn't terminate (a quote isn't closed). Looks like you're used to another language like PHP that connects strings and variables like [ICODE]"string text".variable."string"[/ICODE]. Javascript uses the plus sign (+) instead of the period to join strings and variables. I made …

Member Avatar for Ries
0
294
Member Avatar for BestJewSinceJC

PHP is not [I]completely[/I] necessary, but it can be useful. You could also do the page with AJAX, so it would be useful to learn JavaScript and XML.

Member Avatar for diafol
0
98
Member Avatar for Archo

The basic line that will stop the form from processing is adding this in your JavaScript if the validation failed: [CODE=JavaScript] if (validationFailed) return false; [/CODE] Only return true if the validation is true, if it fails, then return false.

Member Avatar for Archo
0
305
Member Avatar for stix

This isn't possible because some browsers like Firefox reject requests for iframe URLs as a security measure. Some people could abuse it for XSS (cross-site scripting).

Member Avatar for itsjareds
0
84
Member Avatar for cguan_77

[code=JavaScript] if(arguments.length == 3){ var result = "<" + arguments[1] + ">"; for (var i = 0; i < arguments[2].length; i++){ result += "<li>" + arguments[2][i] + "</li>"; } result += "</" + arguments[1] + "l>"; document.getElementById(arguments[0]).innerHTML = result; } }[/code] It looks like this is creating an unordered list. …

Member Avatar for essential
0
131
Member Avatar for _Nestor

It's pretty easy, in your userscript put these lines: [CODE=JavaScript] var regExp = /google\.ei\//i; if (regExp.test(window.location.href)) window.location.href = "http://www.google.ie"; [/CODE]

Member Avatar for itsjareds
0
202
Member Avatar for jools68

It's alright, you may want to try the [URL="http://www.daniweb.com/forums/forum145.html"]Existing Scripts[/URL] forum though. That forum is for prewritten scripts or script libraries such as MooTools. Be sure to include MooTools in your topic so that the right people view your thread. edit: You could also try the [URL="http://forum.mootools.net/"]MooTools forums[/URL] if you …

Member Avatar for itsjareds
0
117
Member Avatar for sephoria

If it's any help, the purple logo text is the font called [URL="http://download397.mediafire.com/mdjjgcqzfzug/h4dmtkchnlz/gordon__.ttf"]Gordon[/URL].

Member Avatar for itsjareds
0
85

The End.