Troy III 272 Posting Pro

good, now see what's being returned by:alert(document.getElementById(v))

Troy III 272 Posting Pro

What is the value of the v pointer?
Try alert(document.getElementById(v)) before your if conditional and see whats being returned first.

Troy III 272 Posting Pro

you've introduced some new kind of error there. File Protocol not specified{?}

But it doesn't matter, in case you are planning to publish it on internet it will play perfectly with relative paths anyway.

Troy III 272 Posting Pro

Try with absolute addresses of file sources instead of relative ones you might be using right now.

Troy III 272 Posting Pro

remove "controls" statements.
Put "autoplay" instead.

Troy III 272 Posting Pro

uninstall the plugin asap or better more try a restore point (but the exact one if it is created) also,
than try this code:

<audio controls>
  <source src="sound_5.ogg" type="audio/ogg"><!--firefox-->
  <source src="sound_5.mp3" type="audio/mpeg">
  <img dynsrc="sound_5.mp3" height=30 width=120 controls>
</audio>
Troy III 272 Posting Pro

The thing you are getting there is the text content of the link element - it seems{?}
and it is a lot easier to strip correctly.
And, it is valid and usable for as long as the link inner-text values are correct as well.
In that case a simple line of code will do your thing:

lnk = document.links['linkId'].innerHTML; //the following is, sport.
alert(lnk);  // >> "Home"
delete lnk; //[*]as soon as your'e done using it.

* because undeclared variables are erasable: meaning "green"; "biodegradable", environmentally friendly and pollution free.

Troy III 272 Posting Pro

of course there is, what part of it do you need exactly?

Troy III 272 Posting Pro

what i acctual needed was that some one has to clickthe table content ie the link below "jimm" so as to make the "next" button clickable

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
</style>
</head>

<body>
<script>
	toggleProp=
	/*b.b Troy III p.a.e*/
	function(e,p,v){e[p]==v?e[p]=e.b:(e.b=e[p],e[p]=v)}
</script>
<form  autocomplete="off">
	<input type=checkbox onchange="toggleProp(document.forms[0].button,'disabled',0)">
	I accept<br> 
	<input type=button name="button" value=Next onclick="yourFunction()" disabled>
	continue<br><hr><hr><hr>

what i acctual needed was that some one has to clickthe table content ie the link below "jimm" so as to make the next button clickable 


<table border="0" width="100%" cellpadding="0">
<tr>
    <td valign="top"> 
<a href="#">jimm<a/>
<td/>
<tr/>
<table/>
<br>
<input type=button name="butto" value=Next>

    
</form>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Untitled Document</title>
<style>
</style>
<script>
	toggleProp=
	/*b.b Troy III p.a.e*/
	function(e,p,v){e[p]==v?e[p]=e.b:(e.b=e[p],e[p]=v)}
</script>
</head>

<body>
what i acctual needed was that some one has to clickthe table content ie the link below "jimm" so as to make the next button 

clickable 

<table>
 <tr>
  <td><a href="javascript:toggleProp(document.forms[0].butto,'disabled',0)">jimm</a></td>
 </tr>
</table>
<br>
<form>
 <input type=button name=butto value=Next onclick="yourFunction()" disabled>
</form>
</body>
</html>
Troy III 272 Posting Pro

am having trouble with this small java-script problem

how can i make a link button clickable after an event lets say clicking a check-box or another button ...example when you want to install a software you see the next button but can not click it until you check the check-box of accepting terms and getme!!! pliz write me the sniplet,,,thanks

<form  autocomplete="off">
	<input type=checkbox onchange="toggleProp(document.forms[0].button,'disabled',0)">
	I accept<br> 
	<input type=button name="button" value=Next onclick="yourFunction()" disabled>
	continue
</form>
<script>
	toggleProp=
	/*b.b Troy III p.a.e*/
	function(e,p,v){e[p]==v?e[p]=e.b:(e.b=e[p],e[p]=v)}
</script>

to make sure it keeps in sync on page refresh bug introduced by "modern browser" idiocy,
-add this function to the script:

onload=function(){document.forms[0].reset()}
Troy III 272 Posting Pro

sorry, cant fix jQuery. And since I don't see or know by hart how is jQuery hacking the existing html code to achieve its functionality, there's not much I can add, except that maybe names and ids used as as a couple are confusing the browser api.

Troy III 272 Posting Pro

Many thanks if you are looking at this.

I have a simple order form that allows users to place an order for an item. The form also allows the user to add more items, calling a javascript function that utilizes innerhtml.

Included in each order form, are dates. I am using a jquery calendar to populate the dates.

When the original form is loaded, the calendar works fine, but when I call the function to add items via the innerhtml, the calendar does not work, either on the original form text fields, or the form text fields added by the innerhtml function.

When the form loads for the first time I have, wrapped in a div with id=image_details, 2 form fields, below:

<div><label>Collection Date:</label></div>
<div><input type="text" name="1_colct" id="date" class="required"/></div>
<div><label>Delivery Date:</label></div>
<div><input type="text" name="1_dlvr" id="datea" class="required"/></div>
<div><a href='#' onclick='addInput()'>Add Another Parcel</a></div>

When the form text field is clicked it calls the following jquery to display an interactive calendar

$(function() {
$("#date").datepicker({ showOtherMonths: true });
$("#datea").datepicker({ showOtherMonths: true });
$("#date"+newnumber+"").datepicker({ showOtherMonths: true });
$("#datea"+newnumber+"").datepicker({ showOtherMonths: true });
});

every is fine up to this point

If I select Add Another Parcel, this calls javascript function addInput, below (note I'm using the newnumber variable to prefix name and id to create unique values that will be used later).

function addInput() {	
var number=2;
var newnumber = number+fields;
document.getElementById('image_details').innerHTML += "<div><label>Collection Date:</label></div><div><input type='text' name='"+newnumber+"_colct' id='date"+newnumber"' class='required'/></div><div><label>Delivery Date:</label></div><div><input type='text' name='"+newnumber+"_dlvr' id='datea"+newnumber"' class='required'/></div>";
fields += 1;
}

This is where it all goes wrong.
I cannot call …

Troy III 272 Posting Pro

Hy,

I need to get the full path of a file trough JS/Prototype and all i get is the name file.
From what I read on the web this is a security issue and it is not allowed.

But still, is there a way?

The question is "where" "which file" "what context" is it a "current file" "objects file source"
What?

Troy III 272 Posting Pro

Hi all,
I have taken tutorial from net. but i didnt understand one thing correctly
what does this

done:function(f){
            postaction=f || postaction //remember user defined callback functions to be called when images load
        }

and what does || sign mean there.
Thanks for attention!
here is

function preloadimages(arr){
    var newimages=[], loadedimages=0
    var postaction=function(){}
    var arr=(typeof arr!="object")? [arr] : arr
    function imageloadpost(){
        loadedimages++
        if (loadedimages==arr.length){
            postaction(newimages) //call postaction and pass in newimages array as parameter
        }
    }
    for (var i=0; i<arr.length; i++){
        newimages[i]=new Image()
        newimages[i].src=arr[i]
        newimages[i].onload=function(){
            imageloadpost()
        }
        newimages[i].onerror=function(){
            imageloadpost()
        }
    }
    return { //return blank object with done() method
        done:function(f){
            postaction=f || postaction //remember user defined callback functions to be called when images load
        }
    }
}
 
preloadimages(['1.gif', '2.gif', '3.gif']).done(function(images){
 //call back codes, for example:
 alert(images.length) //alerts 3
 alert(images[0].src+" "+images[0].width) //alerts '1.gif 220'
})

some piece of junk you've picked there
yet, this code is using some perverted version of my original "Freeze" variable method. But this is doing something else. (where did you get it from?!)

Its job is to make sure the argument values passed to the function are preserved one way or the other, although in this version they can be altered during recursion steps.

The "||" means (is a js logical) OR

And postaction = f || postaction means: "postaction" to be equal to "f" arg value OR to "postaction" (itself).

Troy III 272 Posting Pro

If you plan to learn scripting any time soon, you should first forget about its wrappers.

var divstoclear = document.getElementsByClassName("subsubmenu"),x;
for(x in divstoclear){divstoclear[x].innerHTML="";

* using innerHTML property here because you don't want empty elements pilling.

Troy III 272 Posting Pro

This code (including the previous one)is authentic HTML5 and it supports video.
So we will be using one.

You will need at least two source files and types. One on mp4 format and the other on flv or whatever flash or shock-wave plugin uses (I wasn't able to find for this demo) so, for a fallback code I've set a completely different file and source, namely from YouTube.

<!doctype html>
<html>
<head>
<title>Fixed Aspect Ratio</title>

    <style>
	#container
	{
	   position: relative;
	   min-width: 300px;
	   max-width: 750px;
	   margin: auto;
	}

	#container img
	{
	   width: 100%;
	   margin: auto;
	   position: relative;
	   display: block;
	}

	.content
	{
	   width: 100%;
	   height: 100%; /*optional in case the poster image has exact aspect ratio*/
	   position: absolute;
	   z-index: 1;
	}
    </style>

</head>
<body>
<div id=container>
   <video class=content controls autobuffer poster=http://i42.tinypic.com/21e18cx.jpg>
     <source src=http://www.kaltura.com/p/243342/sp/24334200/playManifest/entryId/0_c0r624gh/flavorId/0_w3aolq8p/format/url/protocol/http/a.mp4>
     <object class=content>
	<param name=movie value=http://www.youtube.com/v/66TuSJo4dZM?version=3&feature=player_detailpage>
	<param name=allowFullScreen value=true>
      <embed class=content
	src=http://www.youtube.com/v/66TuSJo4dZM?version=3&feature=player_detailpage 
	type="application/x-shockwave-flash" 
	allowfullscreen=true>
     </object>
   </video> <img src=http://i42.tinypic.com/21e18cx.jpg> 
</div>
</body>
</html>

for real old time browsers which don't support the min/max sizing you are using here, -some further tweaks are necessary. But right now there's no need for that.

Troy III 272 Posting Pro

well than you already have the solution waiton there for you to use it:
1. put your swf inside my div #cont; [replace the existing div #cnt with with it]
2. keep the existing id of that div
3. nothing else.

advanced:
Make a capture of some scene from your swf and save it for static display replacing the source of my image with it.
Clients who have flash disabled will at least see the picture of that content. Others will not see a blank box during file load etc.
The rest is cosmetics...

Troy III 272 Posting Pro

why is it so important that this certain DIV preserves aspect ratio, does it hold an image or other type of graphics or other watchable content?
Any adequate solution depends on the content this div holds. So what is it?

Troy III 272 Posting Pro

sorry for my remissness friend.i checked in HTMLPad 2011 for previews.actually your code is working perfect on browsers..thank you very much.

So, what is your problem than?

Troy III 272 Posting Pro

i found a script which works on the image, but i wish instead of image it uses div

<html>
<head>
<title>Image</title>

<script type="text/javascript">

function resizeImage()
{
	var window_height = document.body.clientHeight
	var window_width  = document.body.clientWidth
	var image_width   = document.images[0].width
	var image_height  = document.images[0].height
	var height_ratio  = image_height / window_height
	var width_ratio   = image_width / window_width
	if (height_ratio > width_ratio)
	{
		document.images[0].style.width  = "auto"
		document.images[0].style.height = "100%"
	}
	else
	{
		document.images[0].style.width  = "100%"
		document.images[0].style.height = "auto"
	}
}
</script>

<body onresize="resizeImage()">
<center><img onload="resizeImage()" margin="0" border="0" src="http://www.ozbv.com/uploads/Winnie-the-Pooh.jpg"></center>
</body>


</head>
</html>

I'm not sure as to why that example uses script, but my solution here might just happen to give you the idea.

<!doctype native>
<html>
<head>
<title>Fixed Aspect Ratio</title>

    <style>
	#cont
	{
	   position: relative;
	   width: 80%;
	   margin: auto;
	   background: black;
	}
	#cont img
	{
	   width: 80%;
	   margin: auto;
	   position: relative;
	   display: block;
	 
	}
	#cnt
	{
	   color: white;
	   width: 100%;
	   height: 100%;
	   position: absolute;
	   z-index: 1;
	}
	div p
	{
	   padding:0 15px;
	}
    </style>

</head>
<body>

<div id=cont>
	<div id=cnt><p> content: this behavior doesn't require scripting</div>
	<img src=http://i42.tinypic.com/21e18cx.jpg>
</div>

</body>
</html>
Troy III 272 Posting Pro

We all know that this is not a Chrome Bug-Report list. So, we're not here for arguing whether the water is dry or wet.
We don't [and obviously cant] solve browser bugs. In addition, this forum section is not a place where we solve a went south OS installation(s), or (to use the expression) "reformat OS".
JavaScript cant do that.

We are aware that no one is able to solve an ambivalent problem per se, but we might be able to solve an explicit one -the one that says: uncaught error: Illegal token - in case we see what token caused the error - and narrow down the cause of this (not all), but this explicit case of error.

But beyond all - your signature says: "50% of the solution lies in accurately describing the problem!" whereat this isn't one of them...

Cheer up, (papa smurf).

Troy III 272 Posting Pro

you are not meant "to see CSS" and the wrong is your lack of copy-paste skill probably [!]
the code works perfectly in all browsers including the ones that are to be invented in the future.
and
what do you mean "events are not working as you've coded"? how "else" are they supposed to work? the other way around?

Troy III 272 Posting Pro

I got this error while trying to view my websites on Chrome after reformatting my OS (Windows Vista Ultimate 64bit). I noticed I cant view my adsense ads from my laptop, but I can see them on iPad, so it might have something to do with my Google Chrome browser settings. I already enabled Javascript on chrome, closed browser and opened it again, but still cant see the ads... also tried disabling antivirus while viewing it.

Before I reformatted my laptop, I can still see them fine, so I'm not sure what caused it and how I can fix it. Hope to get some help from here.. will be greatly appreciated.. thanks in advance :)

your problem title says "Uncaught SyntaxError: Unexpected token ILLEGAL"
but instead of sending the code of the error line you are telling a 64 bored bits tale and the 7 bluish smurfs.

Troy III 272 Posting Pro
<!doctype native>
<html>
<head>
</head>
<body>
Font Size: <select id=fontSize>
             <option>10pt</option>
             <option>12pt</option>
             <option>14pt</option>
           </select>

Font Family: <select id=fontFamily>
               <option>Arial</option>
               <option>Verdana</option>
               <option>Georgia</option>
             </select>

<div id=myDiv> some div </div>
<textarea id=myTextArea> some text content </textarea>

<script>

fontSize.onchange=fontFamily.onchange=setTarget;
setTarget=[myDiv,myTextArea/*etc*/];

function setTarget(x){
	for(x in setTarget)
		setTarget[x].style[this.id] = this.value;
	}
</script>
</body>
</html>
Troy III 272 Posting Pro

I am having some trouble with this code. I want have an onclick function on a div and I want to call this function. Only the 'if' section of the code works. If the #about opacity is anything other than 0.47, it still executes the 'if' code, but not the 'else'

function opacityabout() {
		if ($('#about').css("opacity", "0.47")) {
			$('#about').css("opacity", "1");
			$('#home').css("opacity", "0.47");
			$('#right').css("-webkit-transform", "rotate(180deg)");
		}
		else {
			$('#about').css("opacity", "0.47");
			$('#home').css("opacity", "1");
			$('#right').css("-webkit-transform", "rotate(180deg)");
		}
		}

My HTML is set up like this:

<div id="right" onclick="opacityabout()"> </div>

Thanks

Your statement: if ($('#about').css("opacity", "0.47")) { will always return true.
That's because it's a statement not a conditional. It's the same as stating "if(document)"

The "if" clause will only convert your statement into a boolean value, which happens to be true. Therefore your 'else' clause will never execute. You need a get-er, not a set-er, for your conditional.

I never use jQuerry,
so all I can offer is pure JavaScript solution. Which includes my cS reader method:

cS=
/*b.b. Troy III p.a.e.*/
function(e){return getComputedStyle(e,0)||e.currentStyle}

Therein your working conditional would look something like this:

if( cS($('#about')).opacity <= 0.47 ){...
Troy III 272 Posting Pro

of course it is
but you don't want a page yelling at you: "- your caps lock is on !" as soon as it opens, -who cares?! Perhaps you came there by accident or got redirected.

-Not even a standalone application will warn you for "all-caps lock" unless you are feeding its encrypted password field. It's simply annoying!
(and what about users who's pass is deliberately in all caps?)

Don't annoy your clients, the password field should, at least be selected, or focused on, before the warning is shown.
Anyway future browsers are planning to have that feature on inputs of type password by default and IE10 supports it already ... no additional coding needed.

Troy III 272 Posting Pro

You may need to ask yourself: "why would I want to (warn or) alert my client that his 'caps lock is on' as soon as he opens the page -even if he might have no intention of filling anything at all there?"

Anyway,

the plain answer is NO.

Troy III 272 Posting Pro

Try your code with: <!doctype native> instead of whatever doctype you are using currently
and you're a go!

Troy III 272 Posting Pro
function toPower(o,n,i,x){ 
      !n?(n=10,i=1) : i+=1;
      !toPower.x?toPower.x="":0
          if( i <= n ){ toPower[i]=
		"<tr align=right><td>" + i + "<\/td><td>" +
                   Math.pow( i, 2 ) + "<\/td><td>"+
                   Math.pow( i, 3 ) + "<\/td><\/tr>";
	toPower.x += toPower[i];
	return toPower( o,n,i,toPower.x ) }
	else{
	document.write( "<table>" + x + "<\/table>");
	}
   }

toPower(0,15,0)

If any questions just ask.
p.s.:
Using onload=toPower will fallback to 10 rows a table

Troy III 272 Posting Pro

Yeah, that something I overlooked while trying to imose some oreder int the script

var h=[],v=[],o,cl,id,top,left,bottom,right,tv,lv,bv,rv,result;

This is how it should have looked in e completed code

Troy III 272 Posting Pro

I tried with arrays but I get Uncaught SyntaxError: Unexpected token [(look at the comment in code)

for(i = 1; i <= 30; i++){
	var h = new Array();
	var v = new Array();
	var o = $("#v"+i).css("opacity");
	if(o < 1){
	var v[i] = 0;//on this line
	}else{
	var v[i] = 1;
	}
	var o = $("#h"+i).css("opacity");
	if(o < 1){
		var h[i] = 0;
	}else{
		var h[i] = 1;
	}
	var cl = parseInt($("#"+i).attr('class'));
	var id = parseInt($("#"+i).attr('id'));
	var top = cl;
	var left = id;
	var bottom = cl+5;
	var right = id+5;
	var tv = v[top];
	var lv = h[left];
	var bv = v[bottom];
	var rv = h[right];
	var result = tv+lv+bv+rv;
	if(result==4){
		$('#'+i).html("X");
	}
}

The thing is, - I don't understand what you are trying to do.
You should have tried to correct that error instead of escaping from water into the fire.

First thing's first: you don't declare variables inside the loop.

var h,v,o,cl,id,top,left,bottom,right,tv,lv,bv,rv,result;
for(i = 1; i <= 30; i++){
		o = $("#v"+i).css("opacity");
	if(o < 1){ v[i] = 0} else{ v[i] = 1 };
		o = $( "#h" + i ).css( "opacity" );
	if( o < 1 ){ h[i] = 0 } else{ h[i] = 1 };
		cl = parseInt( $( "#" + i ).attr( 'class' ) );
		id = parseInt( $( "#" + i ).attr( 'id' ) );
		top = cl; left = id; bottom = cl + 5; right = id + 5;
		tv = v[top]; lv = h[left]; …
Troy III 272 Posting Pro

But why variables?! Why not a #table or arrays instead?
30+ variables only for vv?!!
That's bloody expensive ...

Why don't you try arrays like:

vv[num] = value

Or even better, try explaining the goal you're after.

Sometimes it's not the code or lack of a sufficient knowledge - its the angle of approaching, and the means we choose and it happens that sometimes we chose the most difficult ones.

Troy III 272 Posting Pro

Hi,

I have a HTML document with form. The form has several radio buttons. I want different elements of HTML (including <input> elements) to appear when each radio button is selected. Also, it is intended to show only those elements for a specific radio button. For example, if i select RB1, it shows me element div 1 and hides all others. If i select RB2, it hides element div 1 and shows element div 2, et cetera. So far it works fine with .style.visibility = 'hidden' and 'block'. Now, here comes the problem - each element appears below the previous element, they appear as they are in the HTML, no matter if i show the previous one. It looks pretty bad, because element positions are jumping as i select different radio buttons. How do i keep them in the same level, at the same position?

Regards

It's because you are using visibiliy instead of display property.

You only need to correct your code from ".style.visibility = 'hidden'and 'block'- [which is a 'css error' by the way]" with a display property: .style.display = 'none'; and/or .style.display = 'block'; correspondingly, and it will go away.

Troy III 272 Posting Pro

Easy Troy, Ajax is defined inside the prototype library.

I don't know, I haven't seen it. Did you. What if prototype.js is empty, or if there is no Ajax object defined there at all?

If I had to guess, his own ajax.js is executing before prototype has finished its business. Try wrapping the stuff in ajax.js in a function that is called by the onload event of the body. Its also possible that prototype hasn't loaded at all, in which case just make sure you have the correct path to the file specified.

That's what I've said.
He/she is trying to prototype from object named Ajax, which simply isn't there!
To make sure it's something else - we'll have to see the source first.

Troy III 272 Posting Pro

"Ajax is not defined" - says it all.
Meaning ther is no 'Ajax' object. Not even in jour js file. Otherways, the syntax "new Ajax " would be correct.

gstephas commented: Troy is kind of being a dick and not helping solve the problem. +0
Troy III 272 Posting Pro

Uncaught ReferenceError: Ajax is not defined scripts/ajax.js:1
Any thoughts?

yes, you can't prototype from a nonexisting object!

Troy III 272 Posting Pro

Hey, so the file was in /cgi-bin but for some reason the html file didn't link to it...so I just created a new folder scripts/SpryMenuBar and updated all the links....now it works!

Thank You!!

I know, that's why i told you to move it.
p.s.
you should mark the threat solved

Troy III 272 Posting Pro

i have a javascript code i'm using ajax i'm new on this i want to clear all the input fields after submitting

<script type="text/javascript" src="js/mootools.js"></script>
	<script type="text/javascript">
		window.addEvent('domready', function(){
	                $('registerForm').addEvent('submit', function(e) {
	                    new Event(e).stop();
	                    var log = $('log_res').empty().addClass('ajax-loading');
	                    this.send({
	                        update: log,
	                        onComplete: function() {
	                            log.removeClass('ajax-loading');
	                        }
	                    });
	                });
	            });
	</script>

my php code register.php

<?php
include('functions.php');
$con = mysql_connect("localhost","root","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 
mysql_select_db("reservation", $con);


$user = $_POST['Username'];

$query1 = mysql_query("SELECT * FROM registered_members where username = '$user'");
$result = mysql_num_rows($query1);
	
	if ($_POST['First_name']=='' || strlen($_POST['First_name'])<3)
	{
		$errors[] = 'First name is required and must contain 3 characters or more';
	}

	if ($_POST['Last_name']=='' || strlen($_POST['Last_name'])<3)
	{
		$errors[] = 'Last name is required and must contain 3 characters or more';
	}

	if ($_POST['Username']=='' || alpha_numeric($_POST['Username'])==FALSE)
	{
		$errors[] = 'Username is required and must be alpha-numeric';
	}

	if ($_POST['Password']=='' || alpha_numeric($_POST['Password'])==FALSE)
	{
		$errors[] = 'A password is required and must be alpha-numeric';
	}

	if ($_POST['Password']!=$_POST['re_Password'])
	{
		$errors[] = 'The two passwords must match';
	}

	if (valid_email($_POST['Email'])==FALSE)
	{
		$errors[] = 'Please supply a valid email address';
	}
	if ($_POST['contactno']=='')
	{
		$errors[] = 'Contact Number is required.';
	}
	if ($_POST['country']=='')
	{
		$errors[] = 'Country is required.';
	}
	
	if ($result)
	{
		$errors[] = 'Username is Already Taken';
	}

	if(isset($errors))
	{
		echo '<p class="error"><b>The following errors occured</b></p>';
		while (list($key,$value) = each($errors))
		{

			echo '<span class="error">'.$value.'</span><br />';
		}
	}
	else {
		
		//do something here----store to db, send email

[B]echo '<script type="text/javascript">document.forms[0].reset()</script>'[/B]
         
  
		echo '<p><b>Success!</b></p>';
		echo 'Your registration was successfully processed. You may login and …
Troy III 272 Posting Pro

Hi, I recently created a website with a spry dropdown navigation bar. On preview from Dreamweaver CS4, in Firefox, IE, Opera, Chrome, all elements work properly and the dropdown menus work as well. However, when I upload it to my server at the domain http://www.kcsslibrary.com, the dropdown menus do not show up on rollover. I don't know what is going on. The .js file and .css file are both appropriately linked to the root folders as well.

The dropdowns are supposed to be displayed under 'online resources' and 'citing your work'

All help appreciated! Thank You.

Your Spry script is not loading!
Check the location of your spry lib., and/or move it from the cgi-bin folder if its really there.
and update / correct your source location on your code.

<script src="cgi-bin/SpryMenuBar.js" type="text/javascript"></script>
Troy III 272 Posting Pro

its the other way around

Troy III 272 Posting Pro

Doc-type has absolutely nothing to do with SEO!
You have to understand that DTD, - specified or omitted - can't affect SEs in any possible way; As web designers - we don't, and we cant optimize search engines, - SEO engineers do that!!!

Your doc-type, type of thing is completely irrelevant piece of junk when it comes to SE performance and efficiency, and while at it, -has no effect at all.

When it comes to accessibility;
Accessibility regulations are completely out of DTD scope, and there is no DTA(ccessible) Definition defined up to this day, and there wont be one in the future either. Because it is done within the code, and considering less than few existing accessibility features provided by actual html standard, it completely depends on the designers intellect and awareness; like when implementing nested menus; image based texts; links with no description; unnecessary image objects instead of background images as means to form their design etc,. which are all nothing but spoilers of the core reason, that the page was actually designed for - which is its content - its availability and accessibility by everyone, including blind deaf ill and in any other way, incapable people.

DTD tells your browser in what W3C mode to render your page- nothing else. And that's completely irrelevant to any other party except for W3C web development hegemony and dictatorship.

Troy III 272 Posting Pro

Who tole you that rubbish? Search Engines go into Quirks Mode and I am willing to bet you on that. Obviously you no nothing of coding. I've been a web developer for 9 years how long have you...? Google it if you don't believe me. Also whats your problem?

Well sun, I don't mean to argue with you by stating that I code since summer 1996, but since you've asked, you do the math.

Let Search Engines go into text only-mode if you like, that's even better for you, since it would only speed things up, -but that has nothing to do with our concern here and our main concern is our client, clients!

The only thing that matters is the welllformed structure under the <html> opener until it is closed - everything else is an overhead and a potentially higher chance of causing a mess.

Rergards.

Troy III 272 Posting Pro

I'm simply letting him know that its bad for your web site thats all. No Doctype will make search engines go into "Quirks Mode" which will effect the site in general. I'm NOT insisting he uses it I am giving him some friendly advice to help him and his web site out.

Why, do you think I am wrong giving him some advice...?

Because you are wrong!
"make search engines go into "Quirks Mode" "
Search engines dont go into any kind of mode, and even if they do, who cares?!
And what's so notoriuosele bad about "quirks mode?
[It gives you more coding options than W3C ever will = qiurks means FREEDOM]

I've asked you that;
Because: html doesn't need any of what you are demanding - the Document Extension will suffice!
I remember the time when you were not allowed to write anything ( meaning nothing ) before the <HTML> tag, 'cause it would cause errors on the parser, or render as unformated as if it was a part of your page content, but more often confuse early days Servers sending a bunch of uninteligibile crap to your clients.

Watch this:
this is Google!

<!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title><script>window.google={kEI:"3UH4Ssy6Np-TjAfZx6iuDg",kEXPI:"
....

and this is Google /Firefox

<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mozilla Firefox Start Page</title><style>body,td,a,p,.h{font-family:arial...

this is firefox official

<!DOCTYPE HTML>
<html xml:lang="en-US" lang="en-US" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Mozilla | Firefox web browser &amp; Thunderbird …
Troy III 272 Posting Pro

Do you realise that if you don't use DOCTYPE's its bad for your website...?

Do you mind if I ask why you don't want to use them...?

Do you mind if I ask you:
Why do you Insist on him that he should use them anyway???

Troy III 272 Posting Pro

Hello unthankfull.
- Why don't you mark the thread "solved"?
p.s.:
(by the way: Its something that we all can see, right from your site!)

Troy III 272 Posting Pro

you should mark "this thread solved" than.

Troy III 272 Posting Pro

is not exactly like that, more like:
<a href="" onfocus="some_function">link1</a>
the only problem with this is that onfocus occurs when onclick(when you click) occurs, you usualy use onfocus when you are using <input type=text> or something similar

No..., its exactly like that.
Inline scripts are, 'a bad coding practice' everybody agrees upon. Me to.
The onfocus event gets fired when element receives focus. That's all you need to know. And there are many ways to send focus to element. You can even do it by script.
ie someLink.focus() will suffice.

Link focus is implemented for accessibility reasons and especially for keyboard navigation ability.

Troy III 272 Posting Pro

Hi
I am using Expression Web 2 and need to alter an existing website so as to display nicely on what I regard as a standard display size of 1024 x 768. It would have been better to start from scratch but it's a bit late for that now. I have an error "td tag not closed before this body tag closed". I couldn't find any open tags and decided to sumbit the page to the HTML validator. To cut a long story short it didn't accept the Doctype statement throwing 9 errors.

Just out of curiousity I decided to enter www.microsoft.com into the validator. Is this a record? The validator threw up 296 errors and 31 warnings!

Microsoft seem to be doing all right so why bother should we bother with the HTML validator?

Geoff

The HTML online validator can't tell where the arror ocurred exactly. Tries to narrow the posibility by selecting the first element the error triggered and the last one suffering it. In this case, the closing tag of the body element. This means that the error has safetly passed from element to another without causing a chain error reaction until it reached the end of the document. Therefore logically you should look from the head-tail direction to try and trace it. In fact it is most probably nothing, not even a missing closing tag, It migt be some mismatched quote or accidentaly deleted or forgoten qoute in some value most probably at …

ggeoff commented: A very useful post +3
Troy III 272 Posting Pro

The document flow must always follow the visual flow therefore the obvious is to order the alements according to that flow...

HTML:

<div id="header">
<img class="logo" src="image/dcfc_logo.jpg" alt="DCFC Logo" width="120" height="120" /> 
        <h1>Derby County Football Club</h1>
        <h2>Index Page</h2>
      </div>

Therefore (for it to Function) you should make (the hilighted) adequate change to your stuctural code too. You should remove that "position:relative" if you Iike to preserve the integrity of your boxes too! Thought you knew that - and don't forget to remove the right alignement of your headers also, - it looks better left-aligned, right by the image logo, to my taste ofcourse.
Regards

Troy III 272 Posting Pro

hi guys, just want to ask if it is possible to check which link on the page receives a focus? For example, i got Links name A1, A2, A3, A4 and A5. How to check which link is currently receiving the focus? is it possible to do? thanks ...

someLink.onfocus=doYourThing

Where "doYourThing" is the function you want to invoke when that paricular link has recieved focus.