Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 312
Search took 0.72 seconds.
Search: Posts Made By: Amphiluke
Forum: JavaScript programming 01-20-2012, 05:30 PM
Replies: 2
Views: 246
Posted By Amphiluke
Not sure that understand you correctly. Maybe...

Not sure that understand you correctly. Maybe this will help:
var re=/^(\d){4}\-(\d){7}$/;
Forum: DOM and JSON scripting 01-14-2012, 07:07 PM
Replies: 2
Views: 706
Posted By Amphiluke
You have missed the "function" keyword in your...

You have missed the "function" keyword in your function declaration
function sayhi(){
Also, there is a typo in getElementById method name
Forum: JavaScript programming 01-14-2012, 01:59 PM
Replies: 5
Views: 592
Posted By Amphiluke
Oops. Sorry, my previous example works as...

Oops. Sorry, my previous example works as expected only in FF (I tested it in Firebug). =(

Here is a cross-browser solution:
var s = "mcdonald mack macdonald macleod";...
Forum: JavaScript programming 01-14-2012, 01:02 PM
Replies: 5
Views: 592
Posted By Amphiluke
var s = "mcdonald mack macdonald macleod"; ...

var s = "mcdonald mack macdonald macleod";
alert(s.replace(/\b(m(a)?c)?(\w)(?=\w)/ig, function($1, $2, $3, $4) {
return ($2) ? "M" + $3 + "c" + $4.toUpperCase() : $4.toUpperCase();
}));
Forum: JavaScript programming 01-08-2012, 06:00 PM
Replies: 16
Views: 1,073
Posted By Amphiluke
Why not simply output a line break explicitly? ...

Why not simply output a line break explicitly?
document.write("Hello and welcome to javascript!<br />");
document.write("It is a tricky language to learn!")
Forum: HTML & CSS 01-08-2012, 05:49 PM
Replies: 6
Views: 351
Posted By Amphiluke
Here is the entire test page. <!DOCTYPE HTML> ...

Here is the entire test page.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<style type="text/css">
.girl {
...
Forum: HTML & CSS 01-08-2012, 05:35 PM
Replies: 6
Views: 351
Posted By Amphiluke
Sure. In that case you may use jQuery library to...

Sure. In that case you may use jQuery library to create such a fade effect.

Something like this:

<style type="text/css">
.girl {
background:url("girl-color.jpg") 0 0 no-repeat;
...
Forum: HTML & CSS 01-08-2012, 05:18 PM
Replies: 6
Views: 351
Posted By Amphiluke
You may either use CSS pseudo-class :hover to...

You may either use CSS pseudo-class :hover to change the background image of a container, or provide JavaScript event handler.



<style type="text/css">
.girl {
...
Forum: HTML & CSS 01-07-2012, 02:15 PM
Replies: 4
Views: 501
Posted By Amphiluke
IMO, margins would be appropriate solution… ...

IMO, margins would be appropriate solution…
#img1 { float:left; margin-left:100px; }
#img2 { float:right; margin-right:100px; }
#img_logo { display:block; margin:0 auto; }
Forum: HTML & CSS 01-07-2012, 01:51 PM
Replies: 4
Views: 501
Posted By Amphiluke
Below is a possible solution CSS #img1 {...

Below is a possible solution

CSS
#img1 { float:left; }
#img2 { float:right; }
#img_logo { display:block; margin:0 auto; }

HTML
<div id="header">
<img src="images/charity.png"...
Forum: JavaScript programming 01-07-2012, 12:14 PM
Replies: 4
Views: 297
Posted By Amphiluke
In that case the script may look like this: ...

In that case the script may look like this:
<script>
function demoRegex(){
var pfrom = document.getElementsByName("pfrom[]"),
txt = document.newform.thestring.value,
re;
for (var i...
Forum: JavaScript programming 01-07-2012, 12:03 PM
Replies: 4
Views: 297
Posted By Amphiluke
Firstly get all the fields named "pfrom[]". Then...

Firstly get all the fields named "pfrom[]". Then loop through them as needed.

<script>
function demoRegex(val){
var txt = document.newform.thestring.value;
var re = new RegExp(val, "g");...
Forum: HTML & CSS 01-07-2012, 11:37 AM
Replies: 3
Views: 249
Posted By Amphiluke
Maybe even simpler: #header { ...

Maybe even simpler:
#header {
width:675px;
border-bottom:1px solid #000;
background:url('http://i41.tinypic.com/5yhtdx.jpg') no-repeat;
font:bold 48px/100px verdana,sans-serif;...
Forum: HTML & CSS 01-07-2012, 11:14 AM
Replies: 3
Views: 249
Posted By Amphiluke
Try this #header p { font-size: 36pt; ...

Try this
#header p {
font-size: 36pt;
font-weight: bolder;
color: green;
font-family: verdana;
text-align: center;
line-height: 100px; /* <-- */
height: 100px;
margin:0; /*...
Forum: JavaScript programming 01-07-2012, 11:00 AM
Replies: 7
Views: 442
Posted By Amphiluke
This bug initially presented in that script...

This bug initially presented in that script (http://roshanbh.com.np/2008/06/accordion-menu-using-jquery.html).

Here is a possible fix:
$(document).ready(function() {
$("#firstpane...
Forum: JavaScript programming 01-07-2012, 09:40 AM
Replies: 7
Views: 442
Posted By Amphiluke
Try to provide the path to the background image...

Try to provide the path to the background image relative to the root of the site:
$(document).ready(function() {
$("#firstpane p.menu_head").click(function(){ ...
Forum: JavaScript programming 01-06-2012, 01:37 PM
Replies: 7
Views: 442
Posted By Amphiluke
Place your code into a function and pass it as a...

Place your code into a function and pass it as a parameter of the .ready() method.
<script type="text/javascript" language="javascript">
$(document).ready(function() {
...
Forum: HTML & CSS 01-06-2012, 11:20 AM
Replies: 7
Views: 422
Posted By Amphiluke
Sorry, here is the above code, supplemented with...

Sorry, here is the above code, supplemented with comments.

<script type="text/javascript">
function foo() {
var fs = document.getElementById("firstCell"); // find a target input...
Forum: JavaScript programming 01-06-2012, 10:53 AM
Replies: 6
Views: 639
Posted By Amphiluke
Well, now I see, thanks.

Well, now I see, thanks.
Forum: JavaScript programming 01-06-2012, 10:41 AM
Replies: 6
Views: 639
Posted By Amphiluke
Looks like flat nonsense… O__o

Looks like flat nonsense… O__o
Forum: JavaScript programming 01-05-2012, 02:36 PM
Replies: 6
Views: 378
Posted By Amphiluke
It seems to me that there is no need in loops at...

It seems to me that there is no need in loops at all… =)
var re = /\s*(\w)\S*[\s$]*/g;
var str = " Irvim John Kenneth Loyd Martin Nero Oliver Paul Quincy ";...
Forum: JavaScript programming 01-05-2012, 12:47 PM
Replies: 6
Views: 378
Posted By Amphiluke
Before the function invoking. ...

Before the function invoking.

var perm = ""
var naam = new initialen(prompt("geef een naam in"));
var tijdelijk = ""
var naamArray = new Array();
Forum: HTML & CSS 01-05-2012, 12:37 PM
Replies: 2
Views: 656
Posted By Amphiluke
Have you tried to use the allowTransparency...

Have you tried to use the allowTransparency attribute?
<iframe src="banner.html" width="468" height="60" allowTransparency></iframe>
Forum: JavaScript programming 01-05-2012, 12:22 PM
Replies: 6
Views: 378
Posted By Amphiluke
Declare the perm variable before you invoke the...

Declare the perm variable before you invoke the initialen() function.

P.S. To be exact, the variable must be initialized before the function will be invoked.
Forum: HTML & CSS 01-05-2012, 11:37 AM
Replies: 7
Views: 422
Posted By Amphiluke
A small correction: ...

A small correction:
onfocus="this.style.backgroundColor='#fff';"

A better way to implement this would be to create a separate function to be invoked on window's load event.

<script...
Showing results 1 to 25 of 312

 
Forum Jump

All times are GMT +1. The time now is 11:00 AM.