Traevel 216 Light Poster

document.getElementById('txtMenuInfo').innerHTML=txt; and <div id="textMenuInfo"></div>
are not the same element, change one or the other

t="<td>"</td>";
should not contain the middle "
t="<td></td>";

var text,x,xx,i; should be var txt,x,xx,i;
and
txt=text+ "</tr>"; should be txt=txt+ "</tr>";

for(i=o;i<x.length;i++) should be a 0 so for(i=0;i<x.length;i++)

x=xmlhttp.responseXML.documentElement.getElementsbyTagName("food");
should have a capital B in getElementsByTagName
x=xmlhttp.responseXML.documentElement.getElementsByTagName("food");

xmlhttp.open("GET",url,true); and xmlhttp.send(); both need to be placed outside of the function xmlhttp.onreadystatechange=function()

so

xmlhttp.onreadystatechange=function(){
    //bla
}
//xmlhttp.open("GET",url,true);
//xmlhttp.send();

If it's still not working then make sure you're running it from a server (localhost).

Traevel 216 Light Poster

Well at first glance, in insert into deals (dealname,productid) you are using dealname and not deal_name. Also, where you are using SELECT productid FROM products WHERE productid = '".$id."'"); you are twice referring to a column productid while the table products only has id, according to your description of the table layout.

Also, it could be that you are passing $productid as text and not as a number because of the single quotes. Similar problem with $id and $idd (which you are also comparing to id instead of Id by the way).

You could try printing the results of mysql_query to see whether the query fails or not. If you have access to the database itself via a console or phpmyadmin for instance you could test the queries using some default values. That way you'll be sure the queries themselves are valid, and whether or not the column/table names are indeed correct, before debugging the code.

Traevel 216 Light Poster

Hi,

You are referring to a jquery-1.11.0 folder in your script tag but in the zip file you provided there is only a jquery-ui-1.11.0 folder. Using your code snippet, and the zip you provided (after removing the "- copy" part from the folder name) changing

<script type="text/javascript" src='js/jquery-1.11.0/external/jquery/jquery.js'></script>

to

<script type="text/javascript" src='js/jquery-ui-1.11.0/external/jquery/jquery.js'></script>

made your example work for me.

Traevel 216 Light Poster

Hi,

It's actually just an extension to your new queue length print. If the current line length is bigger than the current max it becomes the new max. Once all the customers are done you print it where you already are printing it; outside the loop.

Traevel 216 Light Poster

Hi,

I take it this is some sort of assignment, in which case my bet would be that they want you to find the url's using BFS and DFS and not simply dumping all link elements in an array. You could traverse the DOM in search for links with BFS or DFS, but a list of links needs no traversels. The page with all the books is your data I presume, in which case you could search (all) the elements of the page for link elements in a structured traversel. Page elements could be seen as nodes in a (DOM) tree. You have sibblings and children, so with breadth first you would start by visiting sibblings first whereas with depth first you would start by going through the child nodes first.

Take a look at the structure of a web page, draw a simple one out on paper (note how it can be made to look like a tree), then figure out the steps you would have to take to traverse through that structure in search for links with both methods. Once you find a link you could put it in a list, like you had the foreach loop do.

breadth first > http://upload.wikimedia.org/wikipedia/commons/3/33/Breadth-first-tree.svg
depth first > http://upload.wikimedia.org/wikipedia/commons/1/1f/Depth-first-tree.svg

Storing wise, if you are looking for a specific link you would need something different than if you were looking for all links, but the general searching for <a> elements would be the same.

Traevel

Traevel 216 Light Poster

remove the } that's on line 27 of the code you posted.. if I make a dummy text file with a camera name it's working on this end

oh and you might as well remove (cameraImage == "sony_r1.jpg") in the last else statement, it's not doing anything

Traevel 216 Light Poster

You are getting the camera image paths from a text file, are they the same as the path names you are comparing with? In other words, is there a $data[5] in the same format as for example Fuji_s3Pro.jpg.

Since the last condition you have is an else, it's not comparing anymore, but just the default end state for your function if all the other checks fail. So the (cameraImage == "sony_r1.jpg") is not applicable in the last else.

Traevel 216 Light Poster

Hi,

In the if-conditions you are comparing an empty variable cameraImage to the camera names, try changing the lines that say:

if(cameraImage == "Canon_20d.jpg")

to

if(imageFileName == "Canon_20d.jpg")

assuming you are passing the same camera image names in function showImage(imageFileName).

Traevel

Traevel 216 Light Poster

Hi,

If what you mean is how you can dynamically change the image size with javascript, try something like this:

function changeImgSize(id,width,height){
    var em = document.getElementById(id);
    if (em && em.style){
        em.style.width=width;
        em.style.height=height;
    }
}

Which you would call with something like changeImgSize('imgID,400,400').

Traevel

ratanji commented: thanx alot Traevel +1
Traevel 216 Light Poster

Hi,

According to http://php.net/manual/en/function.md5.php

Returns the hash as a 32-character hexadecimal number.

The number in the confirmation e-mail is 32 characters, the number above it is not, so I'm guessing the correct one is in the e-mail and the code you have circled is not.

I was reading up on this more out of interest since I'm a bit unfamiliar with password verification, but it seems to me the error could be in a different part of the code, like the storing or the verification parts.

Not much help I'm afraid,

Traevel

Traevel 216 Light Poster

Hi,

Correct me if I'm wrong but from what I understand the problem only occurs in showFullSize(), and not the nextPic() or prevPic() function. My first hunch would be a variable scope issue. You used the name imgNum for your global variable to keep track of the current image, but you also used it as a local variable in function showFullSize(imgNum). So when you update imgNum in the function showFullSize(imgNum) you are not updating the global variable imgNum but the local variable imgNum which only lasts while the function is running. Try changing it to something else.

function showFullSize(imageNumber){
    switch(imageNumber){

    //rest of the code

    }
}

That way when you have showFullSize() update imgNum there is no question as to which imgNum variable it's updating.

Traevel

Traevel 216 Light Poster

href="1hot.php"?pg= "2">'

try changing that to href="1hot.php?pg=2" or escape the quotation marks if you don't want to use POST

Traevel 216 Light Poster

Hi,

If I am understanding it correctly you only want the ordered products to show up in your shoppingBox. However, by hard coding all the products, names and print results referring to them will be cumbersome.

Firstly, your array quant misses the first element (0) and has an eleventh element (10) instead. This will cause your loops to fail at finding the first element because you start the iterator at 0 (which is correct).

So rewriting the first array as such will solve that issue, and fix the array so that there are no empty elements.

var quant = new Array (10);
    quant[0] = Number(getInput("prodA"));
    quant[1] = Number(getInput("prodB"));
    quant[2] = Number(getInput("prodC"));
    quant[3] = Number(getInput("prodD"));
    quant[4] = Number(getInput("prodE"));
    quant[5] = Number(getInput("prodF"));
    quant[6] = Number(getInput("prodG"));
    quant[7] = Number(getInput("prodH"));
    quant[8] = Number(getInput("prodI"));
    quant[9] = Number(getInput("prodJ"));

Secondly, your name array is unused and instead you added hardcoded names. So rewrite:

var nameArray = new Array (name1, name2, name3, name4, name5, name6, name7, name8, name9, name10);
var name1 = 'prodA';
var name2 = 'prodB';
var name3 = 'prodC';
var name4 = 'prodD';
var name5 = 'prodE';
var name6 = 'prodFi';
var name7 = 'prodG';
var name8 = 'prodH';
var name9 = 'prodI';
var name10 = 'prodJ';

To:

var nameArray = new Array ('prodA', 'prodB', 'prodC', 'prodD', 'prodE', 'prodF', 'prodG', 'prodH', 'prodI', 'prodJ');

The for loop is correct, but you could rewrite it to a for ... in ... loop. That way you won't have to change the code if …

kat* commented: brilliant! +0
Traevel 216 Light Poster

If building X is east of building Y it means that building Y is to the west of building X. nextdoor(X,Y) :- west(X,Y) ; west(Y,X).

Traevel 216 Light Poster

The CSS equivalent to the wrap attribute would be white-space . My guess for wrap="hard" would be white-space:pre-line; .

Traevel 216 Light Poster

Hi there,

You're on the right track, but you'll have to add a variable to the sky clause in order to receive a correct result.

sky(blue):-weather(Day,fair).

...should be written as

sky(Day,blue):-weather(Day,fair).

Then you can ask prolog for sky(X,blue). to receive all the days (X) for which the sky color is blue.

This works the same way for the birds.

birdsActive(sunday).
birdsActive(tuesday).
birdsActive(thursday).
birdsHappy(Day):-birdsActive(Day),weather(Day,fair).

By asking birdsHappy(X). you will receive all the days (X) for which the birders are happy.

Hope this helps,

Traevel

Traevel 216 Light Poster

Hi there,

I'm not really sure what you meant, but I think this is what you were looking for.

document.getElementById('banner').style.visibility="hidden";

This doesn't hide the image, but the entire div. If you'd like to hide the background image however, you could change its url to ' '.

document.getElementById('banner').style.backgroundImage="url(' ')";

Hope this helps,

Traevel

Traevel 216 Light Poster

If you initialized net in the declaration it should be able to be updated unless it was made final I ran your code after initializing net and after entering 1 and 15000 received the following result:

Enter your relationship status (1)Single, or (2)Married. 1
Enter your Annual Salary: $15000
Weekly Gross: $288
FICA (Social Security Tax): $17.856
Medicare Tax: $4.176
Excess earnings over wage bracket : $88
Federal Income Tax :$21.6
Net Paycheck: $244.36800000000002

Perhaps it needs rounding, but it's definitely not returning the default value I gave it.

Change line 8 in your code to include a value and it should work.

Good luck,

Traevel

edit: By the way, I forgot to mention that net had a default value of 0 and returned 21.6 in the end.

Traevel 216 Light Poster

Hi there,

I think the script you wrote is being executed before any of the elements are actually created. Perhaps modifying it like this will have a better effect.

window.onload = function(){
	for(var i=0;i<document.all.length;i++) {
		document.all[i].removeAttribute("title");
	}
}

I replaced the document.all with i by the way.

Hope this helps,

Traevel

Traevel 216 Light Poster

Well, you could use <small>(all 3 gyms)</small> and adjust the size with CSS if you want the text to be even smaller. For example <small style="font-size:7pt;">(all 3 gyms)</small> And you might want to remove all but one of those <tr> tags, and add a closing </tr> after the </h4> (which isn't properly nested, but as long as the table looks the way you'd like it to, it probably won't be much of a problem)

Hope this helps,

Traevel

Traevel 216 Light Poster

Hi there,

Just at first glance... your variable net has not been initialized, try assigning a default value to it and see if that fixes the problem. Though, next time try to be a little more specific about the errors you are receiving. "The local variable net may not have been initialized" instead of "line 108 error" would be a lot more helpful, for instance.

Good luck with your assignment,

Traevel

Traevel 216 Light Poster

Hi there,

Perhaps this might get you started.

<html>
<head>
	<title>Multicolor table</title>
	<style type="text/css">
		#sheet{
			width:563px;
			border-collapse:collapse;
			border:1px solid #000000;
		}
		#sheet .title{
			text-transform:uppercase;
			font-size:14pt;
			text-align:center;
		}
		#sheet th{
			padding:5px;
			background-color:#CDCDCD;
			border-top:1px solid #000000;
			border-bottom:1px solid #000000;
			text-align:center;
			font-weight:normal;
			font-size:9pt;
			width:33%;
		}
		#sheet td{
			padding:5px;
			background-color:#FFFFFF;
			text-align:center;
			font-size:9pt;
			width:33%;
		}
	</style>
</head>
<body>
	<table id="sheet">
		<tr>
			<td class="title">Membership</td>
			<td class="title">EFT Withdrawal</td>
			<td class="title">Joining fee</td>
		</tr>
		<tr>
			<th>Individual (all 3 gyms)</th>
			<th>$36</th>
			<th>$25</th>
		</tr>
		<tr>
			<td>Couple (all 3 gyms)</td>
			<td>$50</td>
			<td>$25</td>
		</tr>
		<tr>
			<th>Student / Senior (all 3 gyms)</th>
			<th>$31</th>
			<th>$25</th>
		</tr>
		<tr>
			<td>Midnight Express <br>(Marysville gym, after hours)</td>
			<td>$19</td>
			<td>$25</td>
		</tr>
		<tr>
			<th>Viking Express <br>(Port Huron only, 24/7)</th>
			<th>$19</th>
			<th>$25</th>
		</tr>
	</table>
</body>
</html>

Use <th>text here</th> for gray and <td>text here</td> for white colored backgrounds.

Good luck,

Traevel

Traevel 216 Light Poster

Hi there,

If you had scrolled down a little further on the w3schools page you probably would have noticed the full example which shows you exactly that. :D

Try using <form action="validate.php" onsubmit="validate(this)" method="post"> Good luck,

Traevel

Traevel 216 Light Poster

Hi there,

Apart from the issues Cragdo mentioned above, line 463 has an unnecessary <p> tag.

To answer your question: the "white space" is being caused in line 456 <div class="luke" style="position: relative; top: -929px; It could be because of the png-image (IE doesn't really like them) but a quick fix might be <div class="luke" style="position: absolute; top: 220px; By the way, the layout only seems to work at a screen-width of 1280 pixels. :icon_eek:
You might want to look into that. :D

Good luck,

Traevel

Traevel 216 Light Poster

Hi there, onChange cannot be used in <a> . Neither can checked . Try using <a onClick=""> instead. Or make it a checkbox, of course.

Traevel

Traevel 216 Light Poster

Hi there,

Try something like this...

<html>
<head>
<style type="text/css">
.main{
	_position:relative;
	display:table;
	width:300px;
	height:300px;
	background-color:#FF0000;
}
.content{
	_position:absolute;
	_top:50%;
	width:300px;
	height:300px;
	display:table-cell;
	vertical-align:middle;
	text-align:center;
}
</style>
</head>
<body>
<div class="main">
	<div class="content">
		Some Text
	</div>
</div>
</body>
</html>

It should work in IE and FF.

Hope that helps,

Traevel

Traevel 216 Light Poster

Hi there,

Replacing...

function init(){
	var ep = 1289257200;;
	var ct=Math.round(new Date().getTime()/1000);
	var width = getWidth();
	var height = getHeight();
	if(ep>ct){
		var opts = {};
		opts.id = 'page';
		opts.width = width;
		opts.height = height;
		opts.scriptable = 'true';
		opts.allowScriptAccess = 'sameDomain';
		opts.loop = 'false';
		opts.quality = 'high';
		opts.bgcolor = '#ffffff';
		opts.scale = 'noscale';
		opts.swliveconnect = 'true';
		opts.flashvars = 'pageURL='+pageURL+'&prepared=true';
		swfembed ('player_all.swf', opts);		
		pd();
	}
	else {
		var html = "<table width='"+width+"' height='"+height+"'><tr>";
		html += "<td align='center' valign='middle' style='color:red;font-family:Arial'><strong>resource has expired.</strong></td>";
		html += "</tr></table>";
		document.write(html);
		pd();
	}
}

with...

function init(){
	var width = getWidth();
	var height = getHeight();
	var opts = {};
	opts.id = 'page';
	opts.width = width;
	opts.height = height;
	opts.scriptable = 'true';
	opts.allowScriptAccess = 'sameDomain';
	opts.loop = 'false';
	opts.quality = 'high';
	opts.bgcolor = '#ffffff';
	opts.scale = 'noscale';
	opts.swliveconnect = 'true';
	opts.flashvars = 'pageURL='+pageURL+'&prepared=true';
	swfembed ('player_all.swf', opts);		
	pd();
}

...should do the trick.

Good luck,

Traevel

Traevel 216 Light Poster
<script type="text/javascript">
window.onload = function(){
    var now = new Date();
	var hour = now.getHours();
	var vwimg = "";
	if(hour < 19 & hour >= 6){						//Daytime(6h - 19h) 
		vwimg = "day_loader.html";
	}else if(hour <= 24 & hour >= 19){				//Night (19h - 6h) 
		vwimg = "night_loader.html";
	}else if(hour < 6 & hour >=0){
		vwimg = "night_loader.html";
	}
	document.getElementById("linkContainer").innerHTML="<a href='' onClick=\"window.open('" + vwimg + "','Loader','location=yes,resizable=yes,scrollbars=yes');\"><img src='/images/hotel-button-hotelopen.png' alt='"+vwimg+"'></a>";
};
</script>
<div id="linkContainer"></div>
Traevel 216 Light Poster

That should work, yes :P

If the <div causes layout trouble you could always turn it into a <span by the way.

Traevel 216 Light Poster
<script type="text/javascript">
window.onload = function(){
    var now = new Date();
	var hour = now.getHours();
	var vwimg = "";
	if(hour < 19 & hour >= 6){						//Daytime(6h - 19h) 
		vwimg = "day_loader.html";
	}else if(hour <= 24 & hour >= 19){				//Night (19h - 6h) 
		vwimg = "night_loader.html";
	}else if(hour < 6 & hour >=0){
		vwimg = "night_loader.html";
	}
	document.getElementById("linkContainer").innerHTML="<a href='' onClick=\"window.open('" + vwimg + "','Loader','location=yes,resizable=yes,scrollbars=yes');\">Loader</a>";
};
</script>

Add <div id="linkContainer"></div> where you'd like the link to be.

Traevel 216 Light Poster

Change... document.getElementById("linkContainer").innerHTML="<a href='"+vwimg+"'>"+vwimg+"</a>"; into... document.getElementById("linkContainer").innerHTML=vwimg; And I think 'location=yes','resizable=yes','scrollbars=yes' should be 'location=yes,resizable=yes,scrollbars=yes' Although if the attributes of the popup remain the same, you could also place those at the end...

/*snip*/
else if(hour < 6 & hour >=0){
  vwimg = 'site 2';
}
document.getElementById("linkContainer").innerHTML="<A onclick=\"window.open(vwimg, 'Loader','location=yes,resizable=yes,scrollbars=yes');return false;\" href=\"\">Loader</A>";

note: not tested :$ just a quick draft :)

Traevel 216 Light Poster

Hi there,

Perhaps something like this.

<script type="text/javascript">
window.onload = function(){
    var now = new Date();
	var hour = now.getHours();
	var vwimg = "";
	if(hour < 19 & hour >= 6){						//Daytime(6h - 19h) 
		vwimg = "http://www.whatever.com/link1";
	}else if(hour <= 24 & hour >= 19){				//Night (19h - 6h) 
		vwimg = "http://www.whatever.com/link2"; 
	}else if(hour < 6 & hour >=0){
		vwimg = "http://www.whatever.com/link2";
	}
	document.getElementById("linkContainer").innerHTML="<a href='"+vwimg+"'>"+vwimg+"</a>";
}
</script>

Depending on where you'd like the link to appear you'd might want to change the last line (linkContainer) accordingly.

Regards,

Traevel

Traevel 216 Light Poster

I'll give you something to start with...

  • remove all the onkeypress/up/down="if()" etc.
  • if you have a function called totalM() do not name a variable totalM ...it just messes things up
  • check for a NaN to see whether all inputs are filled (just like you did on line 120)
  • complete the code below for your other calculations (this only covers the first table/form)
document.onkeydown = calc;
function calc(e){
	if (!e) var e = window.event;
	(e.keyCode) ? key = e.keyCode : key = e.which;
	if (key == 13){
		totalM();
		//totalF();
		//averageGrade();
	} else {
		document.average.TM.value = "";
	}
}

function totalM(){
	QM1 = parseInt(document.average.QM1.value);
	QM2 = parseInt(document.average.QM2.value);
	LQM = parseInt(document.average.LQM.value);
	AM = parseInt(document.average.AM.value);
	var total = ((QM1+QM2+LQM+AM)/(4));
	if(!isNaN(total)){
		document.average.TM.value = total;
	} else {
		document.average.TM.value = "";
	}
}

Good luck,

Traevel

Traevel 216 Light Poster

Code tags :)

About the general code...

Errors: 12
Warnings: 140

<html>
<head>
  <title></title>
</head>
<body>
  <!--content here -->
</body>
</html>

About the JavaScript...

Like I said, build a condition to check for complete input-fields. It may require to rewrite most of the code and different triggering; you ask for an output change whenever someone deletes a number, but yet the only way to get an output in your current form is when someone fills out the numbers (top to bottom) and presses "enter" halfway down the field (which no one would've figured out unless he/she is browsing through your code).

A few last tips to simplify the code:

  • store document.average.FG.value in a variable
  • same with document.average.GPA.value
  • and document.average.V.value
  • about the conditional, for instance: if (QM1 != "" & QM2 != "" & ... ) etc.

Good luck,

Traevel

Traevel 216 Light Poster

With a height of 587 it's not that weird to run out of image...

Stretching a background image is only supported in CSS3.

Perhaps this might help.

Traevel

Traevel 216 Light Poster

Hi there,

Could his screen perhaps be bigger? :D

You're using background-repeat:no-repeat; so perhaps his background ran out of image and showed the color black instead. :P

If you'd like to repeat the image vertically use background-repeat:repeat-y; If that's not it, could you mention the size of the background image in pixels?

Good luck,

Traevel

Traevel 216 Light Poster

In that case you would need to find a way to check whether all values are actually inserted in the text boxes. For instance:

if (/*all inputs are filled*/){
  // calculate average
} else {
  // update the field values
}

On a side note... it would be a lot easier if you would place your code in code-tags. Now I'll just have to guess the line numbers :P

Change line 5 in: <script type="text/javascript">
Change all the onKeyUp="totalM()" in: onKeyUp="javascript:totalM()" But remember that any key could trigger that, including TAB, which in return would cause errors. A submit button would be the simplest solution, but in order to keep the field updating on key press it would be best to monitor this by using events, instead of this 'ugly' onKeyUp solution.

To clear a field you could simply assign an empty value to the field: document.average.TM.value = "";

To check whether a field is empty, again use something like if(document.average.TM.value=="")

Finally, a few minor changes/remarks...

There are no <body> tags
The <title> should be between <head> tags
On line 126: the <h1> is nested incorrectly and there is an incorrect <table>
Same on line 159.

Hope this helps a little,

Traevel

Traevel 216 Light Poster

Hi there,

Just at first glance, you're calling the function by using onKeyPress . This means that as soon as you press a key the function gets called; there simply isn't a number in the field (yet) at the moment the function is being called. Try changing onKeyPress into onKeyUp for starters, and see if that works.

Good luck with your assignment,

Traevel

Traevel 216 Light Poster

Hi there,

While testing the form you described I found typing with such alterations to be extremely annoying, but here goes :P

var col = 4; //number of 'cells' in a row
var current;
var next;
document.onkeydown = check;
function check(e){
	if (!e) var e = window.event;
		(e.keyCode) ? key = e.keyCode : key = e.which;
	var num = document.getElementById("Table").getElementsByTagName("input").length;
	try{
		switch(key){
			case 37: next = current - 1; break; 		//left
			case 38: next = current - col; break; 		//up
			case 39: next = (1*current) + 1; break; 	//right
			case 40: next = (1*current) + col; break; 	//down
		}
		if (key==37|key==38|key==39|key==40){
			/* Submit etc.*/
			var code=document.forms['Table'].elements['c' + current].value;
			if(code!=""){alert(code);}
			document.forms['Table'].elements['c' + next].focus();
			current = next;
		}		
	}catch(Exception){}
}
function setCurrent(element){
	var string = element.id;
	current = string.slice(1,string.length);
}

With some HTML to test...

<form id="Table" name="Table" onKeyPress="javascript:check">
	<input id="c1" onClick="setCurrent(this);" type="text" value=""/>
	<input id="c2" onClick="setCurrent(this);" type="text" value=""/>
	<input id="c3" onClick="setCurrent(this);" type="text" value=""/>
	<input id="c4" onClick="setCurrent(this);" type="text" value=""/><br>
	<input id="c5" onClick="setCurrent(this);" type="text" value=""/>
	<input id="c6" onClick="setCurrent(this);" type="text" value=""/>
	<input id="c7" onClick="setCurrent(this);" type="text" value=""/>
	<input id="c8" onClick="setCurrent(this);" type="text" value=""/><br>
	<input id="c9" onClick="setCurrent(this);" type="text" value=""/>
	<input id="c10" onClick="setCurrent(this);" type="text" value=""/>
	<input id="c11" onClick="setCurrent(this);" type="text" value=""/>
	<input id="c12" onClick="setCurrent(this);" type="text" value=""/><br>
</form>

I wasn't really sure if something like this is what you meant, but it should work in the latest FF and IE, although I haven't tested it as much as I should have :$. Still, I hope this helps a little.

Good luck,

Traevel

haggis-man commented: Excellent - many thanks +1
Traevel 216 Light Poster

You could use tables, although using too many will clutter the code just like the WYSIWYG and make it far more difficult to make changes later on. Positioning with CSS would be better, but might require some practice. Perhaps a combination of the both might be the easiest answer, use a table to get everything centered and CSS to sort out any spacing/padding issues that might occur.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Innominate - On Our Soul!</title>
</head>
<body>
<center>
<table>
	<tr valign="top">
		<td>
		<div id="apDiv2"><a href="index.html"><img src="../Images/Button-01.png" alt="Overview" width="213" height="110" border="0"/></a></div>
    	<div id="apDiv3"><img src="../Images/Button-2.png" alt="Forum-link" width="213" height="110" border="0"/></div>
    	<div id="apDiv4"><a href="Clickmaster.html"><img src="../Images/Button-3.png" alt="CM-Link" width="213" height="110" border="0"/></a></div>
    	<div id="apDiv5"><a href="Realm.html"><img src="../Images/Button-04.png" alt="Realm" width="213" height="110" border="0"/></a></div>
		<div id="apDiv6"><a href="About.html"><img src="../Images/Button-5.png" alt="About" width="212" height="121" border="0"/></a></div>
		</td>
		<td>
		<div id="apDiv1"><img src="../Images/N-form.png" alt="News form" width="442" height="550" /></div>
		<br><br>
		<div id="apDiv7"><img src="../Images/news-bg-2.png" alt="N-News" width="442" height="550" /></div>
		</td>
	</tr>
</table>
</center>
</body>
</html>

The code above might give you an idea of what I'm trying to say. If it doesn't, let me know and I'll try to explain it with more detail. :)

Good luck,

Traevel

Traevel 216 Light Poster

In that case I'm afraid I misunderstood the problem. :P

I looked at the code you provided and it does seem that everything is absolute and certainly not that easy to center.

The best thing now would be to rewrite the code, which might not be as hard as you think, the overall layout isn't that complicated.

The easiest thing you can do, however, to repair the layout isn't a pretty one (I'll probably be cursed by many for even suggesting it :D), but you could write a new page with a centered iframe and give it a width of 1280 (1024 would be better, though). That way the content will be displayed through the iframe and be centered on even the widest of screens; it will never be wider than 1280/1024.

Reference

Like I said, not pretty, but I doubt you'd be wanting to start all over again. Anyway, if you can't get it to work one way or the other, don't hesitate to post back :)

Traevel

Traevel 216 Light Poster

Hi there,

If centering the text would solve the problem for you, perhaps you could center an element and use text-align:left; on that element to prevent the text from centering as well.

#div{
	width:50%;
	text-align:left;
	margin: 0 auto;
}

This way the element will center on the page and the text will remain aligned to the left.

Good luck,

Traevel

Traevel 216 Light Poster

Hi there,

At first glance I notice the original function is function LoadGallery(pictureName,imageFile,titleCaption,captionText) while yours is function LoadGallery(pictureName,imageFile) . Yet on line 88 you call the LoadGallery function with 4 parameters <a href="#_self" onclick="LoadGallery('showreel','$image','showcaption','$caption')"> .

The JavaScript errors you keep getting on your site do mention the lack of a 'titleCaption' variable so perhaps it's a quick fix.

Again, try replacing

function LoadGallery(pictureName,imageFile)

with

function LoadGallery(pictureName,imageFile,titleCaption,captionText)

Hope that helps.

Good luck,

Traevel

Traevel 216 Light Poster

Hi there,

I'm not really sure what you mean, but if it's the total number of rows (and thus number of textboxes) you're looking for, you could try something like getElementsByTagName() to count the number of inputs.
Reference

Again, if it's not the answer you were looking for, please explain the issue a little further.

Traevel

Traevel 216 Light Poster

Hi there,

If you only want to use CSS to get the background image to fit the entire screen, you could try something like this.

#img {
width:100%;   
height:auto;
max-width:999px;   
max-height:999px;    
}

Changing the 999's into the width and height of the original picture accordingly.

What I do not quite understand; you "need the picture to be the same size" on any resolution? Do you mean full screen or a certain percentage of the screen?

Traevel

Traevel 216 Light Poster

Would those tags happen to be in between the <ul> tags? In that case they would still create a whitespace above your header. The suggestions almostbob made should help in removing all the margins for ul and li tags, and they certainly remove the whitespace in Firefox with the code you provided. If you're only interested in removing the top margin, you could also use

ul{margin-top:0;}

If the whitespace keeps returning with different tags just add the line tag{margin-top:0;} or tag{margin:0;} for the specific tag(s) as well.

Hope that helps, good luck.

Traevel

Traevel 216 Light Poster

Hi there,

This might not solve your problem right away, but it might prevent some issues in the future (especially if you're copying your code over and over).

On lines 11 and 18 of your HTML code you are using cellpadding and cellspacing, but neither one is a valid CSS property. Instead you could place them outside the style tag to get the desired effect.

<table cellpadding="0" cellspacing="0" style="width: 780px; margin-top: 40px; border: 1px solid;">

Furthermore, it is best not to place properties like height, width, margin etc. in the element itself, but in a box model. Perhaps this page might be of some help.

At first I thought your problem had something to do with the differences between IE and FF, but after reading again I noticed you mentioned differences between identical pages within the same browser. Personally, I haven't spotted any errors in layout in IE or FF with your code, other than the absence of the images of course. Perhaps the following changes in the code might solve it, although I'm not exactly sure.

The new HTML now uses a div as "container" instead of the entire body. The CSS has been changed to maintain layout. One last note: since your code did not handle the "cellpadding" and "cellspacing" correctly, you might see some differences in table-layout. Just remove them if you'd wish to return to the previous look.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> …
mr_scooby commented: awesome feedback +2
Traevel 216 Light Poster

Hi there,

Basically, all you have to do is draw all the possible transitions between the different states. So, for example, begin at start, then to a state with one coin inserted, one with B-button pushed, the corresponding output, and from there back to start. (start) -> (p) -> (B:dispense beer) -> (start) Then from the single coin state draw another transition to a state for two coins and from there to water & output and back to start. (p) -> (p2) -> (W:dispense water) -> (start) Perhaps to clarify some of the drawing: a stamp dispenser.

Once you have a drawing it will be much easier to translate those transitions into some workable code (for example, something like Prolog).

Hope this helps, good luck! :)

Traevel 216 Light Poster

It seems that there are a lot of <BR /> tags in between your table headers (269 to be exact :-O ) starting from line 756. Deleting those tags should remove the large number of line breaks.

itsjareds commented: Good support in forums +1
Traevel 216 Light Poster

Try switching languages by clicking on Tools > Preferences > General > Details. (or whichever foreign words seem to resemble the most :-/ ) If Japanese isn't listed, you can download the necessary language files here.

Otherwise try Googling some words to figure out what language it actually is, that might make it easier to translate.

Good luck! :)