Troy III 272 Posting Pro

In my browser(opera), my background image takes up the full height off the screen, but on my friends(firefox) there appears a large black banner beneath it (black because that is the bgcolor)

I give you the css hopefully you guys can help me.

body {
color:#C00;
background-color:#000;
background-image:url('../background.jpg');
background-repeat:no-repeat;
background-position:top;
height:100%;
}

this will make your background image to fill the available space of the document, in Opera Safari and IE5.5 and up...,but I can't help you with firefox. You'll need to hack it.

html, body {
  height: 100%; Width: 100%;
  margin: 0;  padding: 0;  border: 0;
  background-image: url(background.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -o-background-size: 100% 100%;
  -webkit-background-size: 100%;
  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background.png',sizingMethod='scale');
}
Troy III 272 Posting Pro

Troy's prior answer, absolutely correct

short expl.
width:100 would work as width:100% defaults as pixels if no unit is set

Yes , and this is the main factor causing his menu items to drop as new lines since it defaults to 100px width. And the width of 100px is not even enough to accomodate them individualy.

float:left; is non-functional for a div that occupies the full width

Moreover he has positioned the menu wrapper element absolutely. Therefore it is ancored, so the float property will have no effect at all.

<strong> is a html enhancement that does nothing in css

Also causes the drop of css background statements involved erronuosly. And may rise some other unpredictable effects iin the document structure and layout rendering as a whole.

Regards

Troy III 272 Posting Pro

Is there anyway to get images to be the "correct" size - i.e. fit the width of the text?

This is what currently happens:
http://engineeringnotes.net/personal/pictures.shtml

Thanks,

Dave

So you want them to be looking something like this (see attachment image)?
Add this line in your
CSS

#main img {width:100%}
Troy III 272 Posting Pro

hi my navigaion keeps on moving onto a new line and i cant seem to stop it. i have tried all that i can think of.

thanks

body{
height:100%;
width: 150%;
margin:0;
}
  
  #nav{
  clear:both;
  font-weight:bold;
  color:black;
  margin-left:4px;
  float:left;
  list-style-type:none;	
  background:url(navshadow.gif) no-repeat 8px 100% #fff;
  width:100;
  padding-bottom:21px;
  position:absolute;
  left:15%;

}
html>body #nav{
  margin-left:8px;
  background:url(navshadow.gif) no-repeat <strong>4px</strong> 100% #fff;
}
#nav li{
  list-style-type:none;
  float:left;
  margin:0 0 0 4px;
  padding:0 0 0 10px ;
  border-bottom:1px solid #999;
  background:url(tabgrey.png) #c0c0c0 top left no-repeat;
  
}
#nav li a{
  color:black;	
  background:url(tabgrey.png) transparent top right no-repeat;
  display:block;
  padding:0 10px 0 0;
  float:left;
  
}
#nav li.cur,
#nav li.over,
#nav li:hover
{
  background:url(tabblue.gif) #3c785c top left no-repeat;
  border-bottom:1px solid #2c6b2c;
}

#nav li strong,
ul#nav li.cur a,
ul#nav li.over a,
ul#nav li:hover a
{
  display:block;
  color:#fff;
  padding:0 10px 0 0;
  text-decoration:none;
  background:url(tabblue.png) transparent top right no-repeat;
}

  
  


  </style>
  <script type="text/javascript">
/*<![CDATA[*//*---->*/

function rollover()
{
  if(!document.getElementById || !document.createTextNode){return;}
  var n=document.getElementById('nav');
  if(!n){return;}
  var lis=n.getElementsByTagName('li');
  for (var i=0;i<lis.length;i++)
  {
    lis[i].onmouseover=function()
    {
      this.className=this.className?'cur':'over';
    }
    lis[i].onmouseout=function()
    {
       this.className=this.className=='cur'?'cur':'';
    }
  }
}
window.onload=rollover;

/*--*//*]]>*/
</script>
  
  
 </head>
 <body>
 
 <img src="logo.jpg" width="40%" />

 
 
<ul id="nav">
	<li class="cur"><strong>About jjjjjjjjjjjjjjjjjUs</strong></li>
  <li><a href="index.html">Garden Centre</a></li>
  <li><a href="step2.html">Dahlias Kitchen</a></li>
  <li><a href="step3.html">Kool Kamping</a></li>
  <li><a href="step4.html"></a>Pets Corner</li>
  <li><a href="step4.html"></a>Suttons Buildings</li>
</ul>

Delete everything marked RED

Troy III 272 Posting Pro

I have an issue with my css ul menu bar not displaying AT ALL in IE 7. Works perfectly in FF, IE 8 and Safari 4. Displays but not correctly in Safari 2. Can someone take a look at the code and give me the necessary fixes?

These are only some of structural errors found in your html code.

Validation Output: 21 Errors
# Error Line 46, Column 8: XML Parsing Error: Opening and ending tag mismatch: p line 33 and div
</div>
# Error Line 67, Column 7: XML Parsing Error: Opening and ending tag mismatch: div line 20 and body
</body>
# Error Line 70, Column 7: XML Parsing Error: Opening and ending tag mismatch: body line 18 and html
</html>
# Error Line 70, Column 7: XML Parsing Error: Premature end of data in tag div line 4
</html>
# Error Line 70, Column 7: XML Parsing Error: Premature end of data in tag html line 2
</html>
You should correct these before anybody tries to help you. Perhaps, the problem will go away by itself after you've done this. check out with the minimum height auto value firefox doesn't like that either. Try some other value or clear it altogether, its just sitting there.
Fast solution sugestion:

#content {
	width:900px;
	background-image: url(images/bkgd_tan_tan900px.gif);	background-repeat: repeat-y;	
	position: absolute;	
	top: 143px;
	min-height: auto;/*
 	height: auto;

delete both reds!

Troy III 272 Posting Pro

I want to convert wav file into bytes and then read it..plz can you help me to implement this using C#..i would be very thankful for your cooperation..I'l be presenting my proj in few days so i need to implement this as soon as possible.

Well...
I'm sorry to have to say this to you, but HTML and CSS are not capable of doing much of anything with your wav files except playing them, and what I really meant to say is that you are in the wrong section of the forum.

Troy III 272 Posting Pro

Hi, Troy III
this my old script that before i posted
i tested both your script and this old script

<html>
<head>
	<title>A More Effective Rollover</title>
	<script> 
 window.onload = rolloverInit;
 function rolloverInit() {
	for (var i=0; i<document.images.length; i++) {
		if (document.images[i].parentNode.tagName == "A") {
			setupRollover(document.images[i]);

		}
	}
}
 function setupRollover(thisImage) {
	thisImage.outImage = new Image();
	thisImage.outImage.src = thisImage.src;
	thisImage.onmouseout = rollOut;
 thisImage.overImage = new Image();
	thisImage.overImage.src = "images/" + thisImage.id + "_on.gif";
	thisImage.onmouseover = rollOver;	
}
 function rollOut() {
	this.src = this.outImage.src;
}
 function rollOver() {
	this.src = this.overImage.src;
}
 </script>
	<style > 
body {
	background-color: white;
}
img {
	border-width: 0;
}
</style>
</head>
<body>
	<a href="next1.html"><img src="images/button1_off.gif" width="113" height="33" alt="button1" id="button1"/></a>&nbsp;&nbsp;
	<a href="next2.html"><table><tr><td><img src="images/button2_off.gif" width="113" height="33" alt="button2" id="button2" /></td></tr></table></a>
	
</body>
</html>

i changed the code

if (document.images[i].parentNode.tagName == "A")

to

if (document.images[i])

after then il also works
what does it mean to write code just like so

if (document.images[i].parentNode.tagName == "A")

i know A tag is parent tag of img tag but i dont understand for what reason i must declare that this is Parent node of img tag.
does it necessary to write it
thanks for attention

Yes!
In that classic approach to the problem - it is absolutely necessary.
Because there is no other way to know that you are changing only the images that should hover.

Because with that script if you don't test if the current image is e child of A lement the script will add the hover functionality even …

Troy III 272 Posting Pro

that look great.
but can you tell me where to set it in?
shall it all go to body or???

The topmost code is hard coded html meaning it is html;
the second one is a scripting syntax meaning it has to go inside the <script> tag.
That line will store reference to the player object in the variable named obj there.
Now obj is the public name of the player - from now one you call it "obj" and it will respond.

The rest is scripting handles that you can use to manipulate your player.
the most important one is: [your player].URL part. With it you specify the file to play.
declaring: obj.URL = "myvideo.wmv" will switch from previous to playing myvideow.wmv file.

etc etc

Troy III 272 Posting Pro

I get an error (Object doesn't support this property or method) on 56. In Internet Explorer and I would like to try to keep it cross browser compatible.


This is the source of the function:

SM.Util.prototype.constructor.Notify = function(txt) {
chat = document.getElementById('chat'); //this is line 56 and chat is a img
notify = document.getElementById('notify');
notify.style.left = leftValue;
notify.style.visibility = "visible";
notify.innerHTML = txt;
setTimeout("SM.Util.Notify.Clear()",5000);
}

There's nothing wrong with the line you refer to as being 56th; (that is: the one causing the error). Because it can't!
You didn't declare your "chat" variable before using but that's not gona cause errors.

If you are using linked content and scripts on that page, IE will report wrong line of error. Or the correct one but-referring to what document -I don't know.

Troy III 272 Posting Pro

to my point of view. There is absolutely no need or logic in creating and destroying multi-purpose structural objects of the document body just so you can play another content.

Do you buy yourself an new player for each disk you want to play or you simply change the disk?
Than you can simply change the source on the current object.

var player = document.getElementById("RandomNumbers")
player.URL = "new BlahBlah.mp3"
Troy III 272 Posting Pro

you've placed heavy block elements inside inline tags -that is: links!
You say your code is validated - but seeing this I don't quite believe that.
+
-Are you hosting advertisements in your pages through iframes and similar?

Troy III 272 Posting Pro
<OBJECT id="VIDEO" width="320" height="240" 
	style="position:absolute; left:0;top:0;"
	CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
	type="application/x-oleobject">
	
	<PARAM NAME="URL" VALUE="your file or url">
	<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
	<PARAM NAME="AutoStart" VALUE="True">
	<PARAM name="uiMode" value="none">
	<PARAM name="PlayCount" value="9999">
</OBJECT>
obj = document.getElementById("VIDEO");

SCRIPTING control Code Parameters Description
obj.Settings.autoStart true Specifies or retrieves a value indicating whether the current media item begins playing automatically.
obj.Settings.baseURL Specifies the base URL used for relative path resolution with URL script commands that are embedded in media items.
ClosedCaption.captioningID 0 Specifies the name of the element displaying the captioning.
obj.Controls.currentMarker 0 Specifies the current marker number.
obj.Controls.currentPosition 0 Specifies the current position in the media item in seconds.
obj.Settings.defaultFrame - Specifies the name of the frame used to display a URL.
obj.enableContextMenu true Specifies a value indicating whether to enable the context menu, which appears when the right mouse button is clicked.
obj.enabled false Specifies whether the Windows Media Player control is enabled.
obj.fullScreen false Specifies whether video content is played back in full-screen mode.
obj.Settings.invokeURLs true Specifies a value indicating whether URL events should launch a Web browser.
obj.Settings.mute false Specifies if audio is muted.
obj.Settings.PlayCount 1 Specifies the number of times a media item will play. Minimum value of one.
obj.Settings.rate 1.0 Specifies the playback rate.
0.5 equates to half the normal playback speed, 2 equates to twice.
obj.stretchToFit false Specifies whether video displayed by the control automatically sizes to fit the video window, when the video window is larger than the dimensions of the video image.
obj.uiMode full Specifies which controls …

Troy III 272 Posting Pro

We have already put overflow:auto in the body tag. The problem is it is appearing in some IE7's and in firefox. In some other IE7's it is not appearing. Please help :(

You need to either post the complete code here or the link to the page.

but I suggest you validate your html first, and make sure it is error free.

Troy III 272 Posting Pro

need to read and write to xls (excel sheet) using javascript
read and write should be to specific cell in that sheet
if its possible , please help do it
thanx .

you will need Exel activeX object for this.

This is a demo code from MSDN:

var ExcelApp = new ActiveXObject("Excel.Application");
var ExcelSheet = new ActiveXObject("Excel.Sheet");
// Make Excel visible through the Application object.
ExcelSheet.Application.Visible = true;
// Place some text in the first cell of the sheet.
ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";
// Save the sheet.
ExcelSheet.SaveAs("C:\\TEST.XLS");
// Close Excel with the Quit method on the Application object.
ExcelSheet.Application.Quit();
Troy III 272 Posting Pro

<script type="text/javascript">
function deleteObject(id) {
var/obj = document.getElementById(id);
obj.parentNode.removeChild(obj);
}
</script>

This is throwing errors before its even called?
Am I missing something simple?

"errors"? :')
yeah, of course it is throwing errors... - What's the thing in red doing up there?!!

I'm sure I instructed you to:

continue that line with...:

function deleteObject(id){
      id.parentNode.removeChild(id);
}

and you're done.

and that in case you haven't done something like: var id = document.getElementById("elementId") to be able to call the function in short: deleteObject(Id) earlier in your script; you can invoke this same function with the following syntax: deleteObject(document.getElementById("elementId")) wrapping it on clean now:

<script type="text/javascript">
	function deleteObject(id) {
		id.parentNode.removeChild(id);
	}

		var marked4Deletion = 
		document.getElementById( "RandomNumbers" );

	deleteObject( marked4Deletion );
</script>

I've presumed that you are targeting the object with id = "RandomNumbers" for deletion.

---
If you have further questions, please don't hesitate to ask.

Troy III 272 Posting Pro

Hi,

We are developing the websites. In some of the website we are facing the problem like vertical scroll bar is not appearing in some of the versins of IE7 (Ex : IE7.0.6001.18000). This might be a problem in the css but exactly we dont know what is the problem in that.

We are using css for designs.

can some help please?

Regards,
sneha

yes, remove the overflow: hidden properties from HTML and the BODY element.

Troy III 272 Posting Pro

function deleteObject(id)

continue that line with this:

{
id.parentNode.removeChild(id);
}

and you're done. (assuming you've already stored the targeted element in your "id" var globally),
otherwise you should invoke your function this way: deleteObject(document.getElementById("elementId"))

Troy III 272 Posting Pro

Hai Friends,

I am designing a CSS based website, Well in that I need to adjust 3 div inside a main div as in the form of a table cell. Like this

====== Parent Div ===================
|||Child Div1 |||--|||Child Div2 |||--|||Child Div3|||
==================================

I had the code like this

CSS

#parent_div{
display:block;
width:900px;
height:200px;
}

#child_div1{
display:inline;
width:300px;
height:200px;
background:url(one.gif) left no-repeat;
}

#child_div2{
display:inline;
width:300px;
height:200px;
background:url(two.gif) left no-repeat;
}

#child_div3{
display:inline;
width:300px;
height:200px;
background:url(three.gif) left no-repeat;
}

html code

<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>

<body>
<div id="parent_div">
<div id="child_div1"></div>
<div id="child_div2"></div>
<div id="child_div3"></div>
</div>
</body>
</html>

I tried this code but it doesn't showing anything. Please give me a little help about this issue.

Thanks
Rajeesh

This shall work in Explorer but will not work in firefox. And if you fix it in firefox you will break it on IE. Try using IE conditional css to hide it from firefox and change your display property from inline to inline-block in FX
than remove any whitespace beteween divs in your html so you could eliminate the anoying whitespace added by fx for some irrational reason that I can't understand or explain.

Troy III 272 Posting Pro
Troy III 272 Posting Pro

FINALLY found the answer after an hour of searching Google. For anyone else that wants to achieve what I was trying to do but doesn't know much of anything about Javascript, I added THIS to my existing onClick for the element that I wanted to stop its mouseout:

this.onmouseover=function(){}; this.onmouseout=function(){}

I don't know what that is, but I think it somehow "clears" previous javascript for that element. It worked!

Thats nice - but what to do when you click some other image after this one how do you return its hover functionality?

Troy III 272 Posting Pro

The thing is, they use a specific pdf converter that is installed on their servers and works with their whole system. The thing won't accept any CSS at all so that's where it becomes, shall we say, challenging? I find myself doing all kinds of stuff using tables and such that a few simple div tags could handle. They are converting to a PDF system that accepts CSS but it's not ready for prime time quite yet.

You've asked about old school code, here it is. Atop of it, I even took my time and tested it against a good online converter and gave you other (to this forum section unrelated) information on where can you get your html converted into a correct pdf format. Almostbob, assured you that not only can it convert old time code correctly but xhtml strict using CSS3 too.

So I must add: there is one thing I can't do from here - I can't choose nor install a correct pdf converter on your system from here.

Regards.

Troy III 272 Posting Pro

Hi, Troy III
i did step by step as you posted. but it again returned nothink
i guess this function can't find images source.
...
if it is not touble for you pls help me
thank you for attention an

QWeel there's no need to do anything step by step, here cause a singe copy-paste step will do.

Are you sure you really have those images in your folder???
It is one thing if the image doesn't change hovering your mouse pointer over them and totally different if there are no images at all.

And obviously there are no images showing on your page at all. Meaning you don't have them!

Please create your needed two state images and put them in the folder you are pointing too in your image tags.

Troy III 272 Posting Pro

I was still in sort of testing mode but here's the look that I going after...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>sample</title>
</head>
<body>
<table style="width:1000px;text-align:center" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td style="background-color:#547741;height:145px;width:1000px" align="center"><div style="position:absolute"><img src="triangle.gif" alt="" width="1000" height="145" /></div>
<table cellpadding="0" cellspacing="0" border="0">
<tr><td style="background-color:#741F18;width:1000px;height:20px"></td></tr>
<tr><td style="background-color:#E0C039;width:1000px;height:30px"></td></tr>
<tr><td style="background-color:#547741;width:1000px;height:95px"><div style="font-family:Arial, Helvetica, sans-serif;font-size:20px;color:#ffffff;text-align:center">Engagement 78.1</div></td></tr>
</table>
</td>		
</tr>
</table>
</body>
</html>

Here

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>sample</title>
</head>
      <body>
      <table width="1000" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
   <td bgcolor="#547741" height="145" width="1000" align="center"><div style="position:absolute"><img src="triangle.gif" alt="" width="1000" height="145" /></div>
   <table cellpadding="0" cellspacing="0" border="0">
   <tr><td bgcolor="#741F18" width="1000" height="20"></td></tr>
   <tr><td bgcolor="#E0C039" width="1000" height="30px"></td></tr>
   <tr><td bgcolor="#547741" width="1000" height="95"><div color="#ffffff" align="center"><font face="Arial, Helvetica, sans-serif" color="white" size="4" onclick="alert(window.getComputedStyle(this,null).fontSize)">Engagement 78.1</font></div></td></tr>
</table>
 </td>
  </tr>
</table>
</body>
</html>

this code is as primitive as it can get. I can't think of an absolute positioning emulator back than, so the overlaying of the image is impossible without style...

But!

I've just tested this code in this html to pdf creator and IT WORKS.
The only problem is the width you've given 1000px to it, and happen to use use a page format that is not wider than 800px.
check it out!

Troy III 272 Posting Pro

hello,

i echo this

echo "<td ALIGN='center'><div class='rollover'><a href='http://www.tsfdgdg.com/search.php?search=$stackname' style='text-decoration: none';>
            <table border='0' celpadding='0' cellspacing='0' id=\"point\">
<tr>
<td width='100px' height='101px' ALIGN='center'>
<font size=3 font face=Arial font color=white><b>$stackname</font><br><font color=orange font size=2>$posted</font></b>
</td>

</tr>

</table></a></div>
</td>";

here is the css code

<style type="text/css">
.rollover a {
float: left;


width: 101px;
height: 101px;


background: url("http://www.fdsgss.com/template.jpg");
text-decoration: none;
}
.rollover a:hover {

background: url("http://www.gdsgsgs.com/template2.jpg");

}

</style>

it works perfect in google chrome but in firefox the text moves out of the background... this is really annoying.. any help?

You might wanna discard the values of attributes marked in red and see what happens. Or at least the 'width' part of it. And set the "display: block" to your A selector instead.


______________
p.s.:
sorry but your table nesting is in total mess - you should do something about it!

Troy III 272 Posting Pro

I need to recreate the attached image in HTML so that it can be converted into a PDF dymanically using software that the client has.

I created a gif with a triangle-shaped transparency which lets the varying sizes of green, yellow, and red bars show through underneath. The bars vary in size based on survey results.

This technique worked great when using CSS to easily position the image layer on top of the three color rows but alas, I've been told this has to be done strictly in old school HTML (no CSS) because the PDF rendering software cannot handle CSS.

So, I finally get to my question...Is there any way to layer the transparent gif over the three rows using HTML with no CSS? The rows need to be table rows filled with color because they must change in height depending on the scores so I can't just create a single image out of them and stick them in the backround.

Any suggestions (that don't involve my mother and farm animals) are welcome.

Thanks!

Can you post your existing page code so we can judge if there is a possibility to emulate it?

Troy III 272 Posting Pro

on firefox its working.

on ie it gives me error on page..


how to solve it?

If you are talking about "window.onload" I assure you -that's impossible!
You have problems with your function assigned to it somewhere else, but not with the "window.onload" event.

-check the function!

Troy III 272 Posting Pro

I tried but i got nothink
here is the code you posted
..code..
if there is any erros pls correct it full DHTML format so I find erros
Thanks very much

Yes, one is mine, others are yours. I forgot to delete the onoad event after I took effort to make the function reusable forgetting that I cant pass args to the function being assigned. Anyway, this script belongs to the document body not to the document header.

<html>
<head>

<title>A More Effective Rollover</title>

<style > 
	body {
	background-color: white;
	}
	img {
	border-width: 0;
	}
</style>
</head>

<body>
	<a href="next1.html"><img class="roller" src="image1.jpg" alt="button1"></a>&nbsp;&nbsp;
	<a href="next2.html"><img class="roller" src="image2.jpg" alt="button2"></a>

<script>
function rollover(r){
		var ic=document.images;
  for(var i=0; i<ic.length; i++){
	if(ic[i].className==r){
		var A=B=L=ic[i].src;
			L=L.substring(L.lastIndexOf("/")+1,0 );
			B=L+"on"+B.substring(B.lastIndexOf("/")+1);
				ic[i].over=new Image();
				ic[i].over.src=B;
		ic[i].onmouseover=function(){this.src=B}
		ic[i].onmouseout=function(){this.src=A }
} }	}
rollover('roller');
</script>

</body>
</html>

Don't forget to name the test images as stated in actual html code:

"image1.jpg" & "onimage1.jpg"
"image2.jpg" & "onimage2.jpg"

The script will take care of the rest.

--------------
p.s.:
If you are eager to put it on the document header - you'll need a function itermediator to hide it from executing during parse time like this

onload = function(){ rollover('roller'); /*any other functions you need to execute during onload cna be placed hereafter */ }

Troy III 272 Posting Pro

to say true
i didn't understand
i need to write this script in a understandable format
that script which i have posted is too long
thanks for advises

OK, here is a shorter one:

function rollover(r){
		var ic=document.images;
  for(var i=0; i<ic.length; i++){
	if(ic[i].className==r){
		var A=B=L=ic[i].src;
			L=L.substring(L.lastIndexOf("/")+1,0 );		
			B=L+"on"+B.substring(B.lastIndexOf("/")+1);
				ic[i].over=new Image();
				ic[i].over.src=B;
		ic[i].onmouseover=function(){ this.src=B }
		ic[i].onmouseout=function(){ this.src=A } 
} }	}
onload=rollover("roller")

Instructions:
1. Hover images should be named like: "defaultImage.gif" and "ondefaultImage.gif" respectively.

2. Images to be hovered should be given the same class-name f.i.: "roller" in the html document <img class="roller" src="... >

3. If you use some other classname, don't forget to update the function call with the new classname:
rollover("myNewRollerClassName");
and don't forget the quotation marks!

Troy III 272 Posting Pro

the explanation of the desired function of the script is correct.
but
the script will not work as expected
rollover images are not preloaded

Sorry, but I have to disagree, since the script in discussion takes care of preloading too.
You should read the code more carefully...

Troy III 272 Posting Pro

Thank you very much
I understood everything but i still dont understand where "A" came from. Can I use it without "A".
if possible help me

The "A" is exactly one or any of these "A"s in the Document! The "A" came from here:
<A HREF="next1.html"> <!-- PARENT -->
<IMG SRC="images/button1_off.gif" width="113" height="33" alt="button1" id="button1" /> <!-- Its Child -->
</A> <!-- Parent closure -->

That check makes sure that only the images wrapped in link elements "A" should receive the rollOver functionality leaving other illustrative images alone.

Troy III 272 Posting Pro

1. But! when I try it in the remote server, ...

2. Any idea about what is causing this?

1. Have you tried it against your refrigerator too. What on earth do you mean by "remote server" ?!!

2. Yes. Human mistake, most certainly you!

Troy III 272 Posting Pro

Hi, there.
This is some very old script, rigid and extremely interdependant
This script will stop functioning as soon as file naming convention is broken. Meaning that it relies in things not supposed too.

I will try to comment it line by line for you:

<html>
<head>
	<title>A More Effective Rollover</title>
<!-- there is nothing, not even vaguely effective about this script! -->
	<script> 
 window.onload = rolloverInit; //calling the rollover handler on load event
 function rolloverInit() {//writing the actual rollover function 
	for (var i=0; i<document.images.length; i++) {//walking through document image collection
		if (document.images[i].parentNode.tagName == "A") {
//checking if current image is a child of a link element A - not assigning to it!
			setupRollover(document.images[i]);// calling another function that is not written yet, and passing images as functiona arguments successively. 
		}
	}
}
 function setupRollover(thisImage) {//here "thisImage" will get the passed as argument to this function earlier.
	thisImage.outImage = new Image();//creating e new image element as attribute of current image.
	thisImage.outImage.src = thisImage.src;//seting the source of that image to its existing image source to be able to switch back to default.
	thisImage.onmouseout = rollOut;// assigning the rollOut function on current image mouseout event. 
 thisImage.overImage = new Image();// creating another image as attribute of the current as in previous turn.
	thisImage.overImage.src = "images/" + thisImage.id + "_on.gif"; //now building and setting the hover image source relative path to folder "images" taking the current image id as a part of the hover  image file name and completing it with …
Troy III 272 Posting Pro

This is a sample of a list I would use. The option value is the value that will be stored with the post. I can't hard code the list because each client can have more, less, and other defined terms. The users maintain the lists in a fully relational database.

<select name="disposition">
<option value="A001" SELECTED>Scene</option>
<option value="A002">Interfacility</option>
<option value="A003">PR - Scene</option>
<option value="A004">PR - Interfacility</option>
<option value="A005">Search</option>
<option value="A006">Transport Team</option>
<option value="A007">Maintenance</option>
<option value="A008">Administrative</option>
<option value="A009">Pilot Recurrency</option>
<option value="A010">Crew Training</option>
</select>

I am 99% sure I want a drop-down list - unless there is a better way to allow the end user to select from a list. I thought a drop-down would be the best because I can export/create a list of data from the databases, I just don't know how to take the raw text list and drop it into the HTML code.

The regular application is used for flight dispatch and patient charting for Air Medical helicopters. Our clients want a web front end to do some tasks like scheduling flight requests. With over 130 clients, they each have different ideas of what should be in any given list. The example above is from a list of possible request types.

THanks again in advance for your help.

good.
this would be your HTML

<form name="dropDown" action="" method="" >
<select name="disposition">
<option value="" >Select Scene</option>
</select>
</form>

this would be the string format retrieved from your dB:

var	list = "A001, Scene, A002, Interfacility, A003, PR - …
Troy III 272 Posting Pro

please write your select list and populate it manually as an example so we can have some idea on what you seek, in fact to have something we can refer (to and from) in our possible explanations that might turn up.

Are you sure you want them in a drop-down list?

Troy III 272 Posting Pro

Thanks for trying. That little bit of extra code (type="application/x-mplayer2") in the embed tag actually causes FF to stop showing the file. I don't know why but it does. :(

Something is wrong with your Safari [although I don't have it here] because your previous code [the one working on FX and IE] should have worked in Safari too, 'cause this code is trying to use windows media player v.6.4 edition. But as I've already mentioned safari will also need its WMP plug-in installed same as FX, which already has it.

Troy III 272 Posting Pro

The poster marks the thread solved though admins probably have the ability it's not really their job to do so.

Thanks I appreciate it.
Cheers.

Troy III 272 Posting Pro

How do i stretch my background image?

You can't!

W3C doesn't give you any means to manipulate background image dimensions.

The only browser providing means for this is still IE 5++

Troy III 272 Posting Pro

I think its just a case of placing an index.htm file in a folder called about? Is this corect or am i completely wrong?

As you might have realized from previous explanations...
No! - you are in fact correct! :')
Regards.

Troy III 272 Posting Pro

That's because you are embedding QT instead of WMP!

<html>
	<head>
    <style type="text/css">
<!--
.fontStyle {
	font-family: Verdana, Geneva, sans-serif;
	font-size: small;
	font-weight: bold;
	color: #67A2DC;
}

-->
    </style>
		<script type="text/javascript">			

			window.onload=function(){
				loadVideo();
			}
			
	
			function loadVideo()
			{
				
					if (parseInt(navigator.appVersion)>3)
						{
							if (navigator.appName == "Netscape")
							{
								winW = window.innerWidth;
								winH = window.innerHeight;
							}
					if (navigator.appName.indexOf("Microsoft") != -1)
							{
								winW = document.body.offsetWidth;
								winH = document.body.offsetHeight;
							}
					
			}
				
				var dimW = winW-50;
				var dimH = winH-20;
				var w1 = dimW.toString();
				var h1 = dimH.toString();
				
				
				
				if(document.getElementById("vidEmbed") != null)
				{
					
					document.getElementById("vidEmbed").src = "Welcome_1.wmv";
					document.getElementById("vidEmbed").style.width = w1;
					document.getElementById("vidEmbed").style.height = h1;
				}
				else if(document.getElementById("Player") != null)
				{
					document.getElementById("Player").style.width = w1;
					document.getElementById("Player").style.height = h1;
					document.getElementById("Player").url = "Welcome_1.wmv";
				}
else if(document.getElementById("quickTime") != null)
				{
					document.getElementById("quickTime").style.width = w1;
					document.getElementById("quickTime").style.height = h1;
					document.getElementById("qTime").value = "oracleWelcome_1.wmv";
				}

			}
		</script>

	</head>
<body><div>
<p><span class="fontStyle">Introduction<br>

</span> 
   <object id="Player" width="100%" height="100%" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" style="border:0px;"> 
    
    <param name="autoStart" value="True">
    <param name="uiMode" value="full">
    <param name="volume" value="50">
    <param name="mute" value="false">
<!-- <embed src="" id="vidEmbed" width="100%" height="100%" autostart="true" uimode="full" volume="50" mute="false"></embed> -->
<embed type="application/x-mplayer2" src="" id="vidEmbed" width="100%" height="100%" autostart="true" uimode="full" volume="50"> </embed>  

  </object>
   
   <!-- Safari Code -->
    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" id="quickTime" width="100%" height="100%" codebase="http://www.apple.com/qtactivex/qtplugin.cab"><param name="src" id="qTime" value=""><param name="autoplay" value="true"><param name="controller" value="false"><embed src="" id="qTime" width="100%" height="100%" autoplay="true" controller="false" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>
 <!-- End Safari Code -->
  
</p>

</div>
</body>
</html>

Might work

Troy III 272 Posting Pro

i have html files at C:/Documents and Settings/USER/Application Data/Mozilla/Firefox/Profiles/ksx3y6oy.default/bookmarks.html. the html files is in my hard disk. then how im going to called the html files to be an input in my javascript coding.someone please help me

the quick answer is: "you can't!"
Javascript is not allowed to mess around with your file system. And you can't put documents in javascript vars.

Dukane commented: good answer +3
Troy III 272 Posting Pro

Thanks a lot for the insight and the great examples!
Will work on this ASAP.

I will have to mention this forum in the credits :)

Troy you are right, nothing to do with css classes or whatever, I meant two different elements or levels.

Nice
I'm puzzled though, why is that code using same id on multiple elements?

And I have another puzzle somebody could answer to me: whose responsibility is to mark threads as solved, :: the thread starter or admins? (!please, I really don't know the answer to this, just curious!)

Troy III 272 Posting Pro
<html>
	<head>
    <style type="text/css">
<!--
.fontStyle {
	font-family: Verdana, Geneva, sans-serif;
	font-size: small;
	font-weight: bold;
	color: #67A2DC;
}

-->
    </style>
		<script type="text/javascript">			

			window.onload=function(){
				loadVideo();
			}
			
	
			function loadVideo()
			{
				
					if (parseInt(navigator.appVersion)>3)
						{
							if (navigator.appName == "Netscape")
							{
								winW = window.innerWidth;
								winH = window.innerHeight;
							}
					if (navigator.appName.indexOf("Microsoft") != -1)
							{
								winW = document.body.offsetWidth;
								winH = document.body.offsetHeight;
							}
			}
				
				var dimW = winW-50;
				var dimH = winH-20;
				var w1 = dimW.toString();
				var h1 = dimH.toString();
				
				
				
				if(document.getElementById("vidEmbed") != null)
				{
					
					document.getElementById("vidEmbed").src = "Welcome_1.wmv";
					document.getElementById("vidEmbed").style.width = w1;
					document.getElementById("vidEmbed").style.height = h1;
				}
				else if(document.getElementById("Player") != null)
				{
					document.getElementById("Player").style.width = w1;
					document.getElementById("Player").style.height = h1;
					//document.getElementById("objectSrc").value = "Welcome_1.wmv";
				
document.getElementById("Player").url = "Welcome_1.wmv";}


			}
		</script>

	</head>
<body><div>
<p><span class="fontStyle">Introduction<br>

</span>
  <object id="Player" width="100%" height="100%" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" style="border:0px;"> 
    
    <param name="autoStart" value="True">
    <param name="uiMode" value="full">
    <param name="volume" value="50">
    <param name="mute" value="false">
    <param name="URL" id="objectSrc" value="">
    <embed src="" id="vidEmbed" width="100%" height="100%" autostart="true" uimode="full" volume="50" mute="false"> </embed>
  </object>
</p>
</div>
</body>
</html>

Remove red lines!
Set the <param name="uiMode" value="none"> If you don't want player controls to appear on your media.

Troy III 272 Posting Pro

Hello all.

I have a mootools accordion in the website I'm building that uses two classes: "toggler" for the titles and "element" for the content.

I'm in the need of adding an input field at the bottom of the "element" DIV that the user has opened.

Problem is, every content of every different toggle has the same id="element".

The only difference is that the one opened has the visibility set to "visible".

Is there a way so I can write in that visible DIV from Javascript?

I've underlined some conflicting statements in your problem description, and the clearance on that part might give some strait forward solution.

That is: if explanation stating that elements are using the word "element" as an ID, is just a writing mistake, meaning that the first statement is in fact correct, you could solve your problem by simply adding an unique ID to that element that would enable you to access its properties directly later on.

But if all these elements are really using ID instead of CLASS selector you'll be forced to take another route. And there are lots of them...

And since the visibility property is being set by javascript than javascript will be able to retrieve its value also.
So one of the ways to go, would be to write a function that does this:

function getVisibleEl(){
	var els = document.getElementsByTagName('div');
	for(var i=0; i<els.element.length; i++){
		if(els.element[i].style.visibility=="visible" ){
			//this is our DIV, write to
			els.element[i]
			//your planed input …
Troy III 272 Posting Pro

I have this code to open a new window and pass a div's content into a div in the new window:

<script type="text/javascript">
var changeIt, print_div;
changeIt = function()
{ print_div = document.getElementById("sec_content").innerHTML;
newwindow=window.open( 'targetpage.html', target="_blank" );
setTimeout('newwindow.document.getElementById("print_content").innerHTML=print_div',100)
};
</script>

but for some reason it's not working online (it does open a new window but it doesn't pass the sec_content into print_content) , it only does when I use an alert before the setTimeout, like this:

<script type="text/javascript">
var changeIt, print_div;
changeIt = function()
{ print_div = document.getElementById("sec_content").innerHTML;
newwindow=window.open( 'targetpage.html', target="_blank" );
alert("eeeaaa");
setTimeout('newwindow.document.getElementById("print_content").innerHTML=print_div',100)
};
</script>

Can anyone tell me why please, I really need help with this.

There is a way to avoid relying on uncertainty of timers and methods like that.

Keep this part of your existing code:

<script type="text/javascript">
var changeIt, print_div;
changeIt = function() {
	print_div = document.getElementById("sec_content").innerHTML;
	newwindow=window.open('targetpage.html', target='_blank');
}
changeIt()
</script>

and add this to your target page:

<script type="text/javascript">
document.getElementById("print_content").innerHTML=opener.print_div
</script>
Troy III 272 Posting Pro

First: this is not your code (it says its from Dynamic Drive)!
Second: I don't understand your question!

Troy III 272 Posting Pro

i'm not sure why it's doing that, because my IE is reading it correctly (without adding any negative margin) but i have to add the negative margin in order for FF to read it correctly. I'll just have to trail and error until something is fixed.

thanks so much for your responses!

Can I see your code - It may be possible to fix it for all with one style sheet only.

Do you have it online?

Or can you post (copy- paste [exactly as is]) the HTML code of the, element preceding together with the code of element succeeding the problematic code to make sure it's not one of them profane browser mistakes not handling white-space as expected.

Troy III 272 Posting Pro

Regarding the screen resolution - you will need a bigger screen to see your fixed content. Since your screen is less than 600px of usable height.

'Cause otherwise I'm sure that my suggestion should have already fixed it.
Try to lessen this margin-top value gradually and see at what size does the content come up into view.

And of course - if this isn't the case and you have other elements on that page;
Please do the following:
- Set the z-index of your #topfix element to say 1000.

{
margin-top:600px;
position:fixed;
z-index: 1000;
}
Troy III 272 Posting Pro

interesting, because all other clocks are 480px wide!

you will need to set them all to 432px than...

Troy III 272 Posting Pro

If it works it doesnt matter how old it is or if its done different nowadays, if it still 'works', then thats OK.
Also bear in mind - from first page
I'm not experienced in java and so I find scripts that people post and alter them to my needs.

You gave me the advice.

I changed

<script language='javascript'>

for

<script type='text/javascript'>

And it made no differance at all. Still looks exactly the same, and.. the last clock in the script, is still not centered. The problem is still not solved yet.

And it shouldn't - the "language" attribute of the script tags is still supported wider wider than W3C "type" attribute that does absolutely nothing.

The lemenents you are saying are centered - they arent. Only the text inside of 480px wide containers is centered.
For them to look all equal you will need to make their table containers same width of this interesting interface, or set this one to 480px, you will also need to download the special font used for complete experience which can be found here:
free download

The quick solution is:

//************** DO NOT EDIT BEOND THIS POINT *************//

var t='<table width=480 cellspacing="1" cellpadding="0"....

Troy III 272 Posting Pro

please do not delete this post even though there is a link..
I have been asked to take a look at this site and evaluate whether any programmer could duplicate it .. so I am asking you all to let me know if you could duplicate the magnify functionality of this site without losing any picture quality ...
it is my opinion that if the original is of high enough quality then enlarging it without losing focus should be a breeze .. what do you think.

http://dallascowboys.movadamedia.com/2009catalog/page.aspx?id=10

choose enlarge right pane to see what I mean.

I don't see anything new or interesting about that code there -except excessive use of images and of tables for a simple layout too much code and nothing zooming.

the right page image is about 79KB but the standalone image is over 200KB.

What zoom? What magnify?!! There's nothing of the sort going on there...