PDA

Click to See Complete Forum and Search --> : Javascript and (div) help


zippa
Feb 5th, 2001, 05:50 PM
I have 2 scripts like this:
<script language="JavaScript">
function openWindow (url) {
popUpWin = window.open(url,'blah','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable =0,width=510,height=520');

if (navigator.appName == 'Netscape') {
popUpWin.focus() ;
}
}
</script>
<a
href="javascript:openWindow('httpL//whatever')">
Eric</a><br>

on one page. The width and height are different, but when clicked, they are the same size. Any ideas?

Also: I have 2 <div> tags, and I want them side by side. But one always appears below the other. How can I fix this?

Thanks.

Mark Sreeves
Feb 6th, 2001, 02:31 AM
the width and height may be different but 510 and 520 are pretty close to each other.

What do you mean by "when clicked, they are the same size"?


as for you DIV problem, post what you've got so far and we'll sort it out for you.

zippa
Feb 6th, 2001, 07:47 PM
I mean that, I have 2 of that JavaScript code on 1 page. The width and height are totally different for each seperate one. But, when I click one, it comes up as the size of the 2nd code chunk.
I don't get it...

zippa
Feb 6th, 2001, 07:56 PM
<div style="background: blue; width: 150px;">
<font color=white><b>blah</b></div>
<div style="background: white; border: 1px solid black; width: 150px; position: absolute;">
blah
<div style="background: white; border: 1px solid black; width: 150px; position: absolute;">
blah
</div>
</div>

The appear above each other, like:
<div1here>
<div2here>
<div3here>

I want:

<div1here>
<div2here><div3here>

Mark Sreeves
Feb 7th, 2001, 05:30 AM
you just need to include left atributes to position them



<html>

<body>

<div style="background: blue; width: 150px;height:100;">
<font color=white><b>blah</b>
</div>

<div style="background: white; border: 1px solid black; width:150px;height:100; position: absolute;">
blah
</div>

<div style="background: green; border: 1px solid black; width:150px;height:100; position: absolute; left=160">
blah
</div>


</body>
</html>