move page elements with vbscript?

E

Eugene

Hi,

I have something like this on my page:

<body>
<div id="p1" style="position: absolute; width: 40px; height: 40px; z-index:
1">TEST</div>
</body>

The question is: how do I move it from its position, let's say, 15 pixels
right and 30 pixels down?

I'm using vbscript.

Thanks,
Eugene
 
S

Stefan B Rusynko

Change it to
<div id="p1" style="position: absolute; width: 40px; height: 40px; z-index: 1; left:15px; top:30px">TEST</div>
or just drag it on the design view
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Hi,
|
| I have something like this on my page:
|
| <body>
| <div id="p1" style="position: absolute; width: 40px; height: 40px; z-index:
| 1">TEST</div>
| </body>
|
| The question is: how do I move it from its position, let's say, 15 pixels
| right and 30 pixels down?
|
| I'm using vbscript.
|
| Thanks,
| Eugene
 
E

Eugene

Well, I know how to position this on the page.
But how to move it from its position to whatever I want, using vbscript?
These things didn't help me:

1) document.getElementByID("p1").offsetleft = 15
2) document.getElementByID("p1").currentstyle.left =
document.getElementByID("p1").currentstyle.left + 15

thanks in advance,
Eugene
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top