...

View Full Version : problem about style.pixelTop



asert
08-30-2006, 02:02 PM
I want to make a "upload multi files" component like gmail,but encounter a serious problem,the "real" browser button can't cover with the button named "upload a attachment" when mouse on it,but it only happen when the component be surrounded by <table> tag;

thanks for your help!



<html>
<br><br><br>
<table> <!-- it works very well if delete the table tag-->
<input type="button" name="selbtn" size="30" value="upload a attachment"
onmousemove="form1.file1.style.pixelLeft=event.x;form1.file1.style.pixelTop=this.offsetTop;"/>
<form enctype="multipart/form-data" method="POST" name="form1">
<input type="file" name="file1" style="position:absolute;width:0px" />
</form>
</table>
</html>

Kor
08-30-2006, 03:36 PM
Yes I know. As far as I know there is no workaround about this. There is no way to change the "real" button's size. In Mozilla nor you can change the whole input's size at all.

asert
08-30-2006, 04:10 PM
there is just "form1.file1.style.pixelTop=this.offsetTop;" has a problem,the "form1.file1.style.pixelTop" actually always on top edge on web browser's window,not the "upload a attachment" button's offsetTop;

is there a good idea to help me to fix the problem? or give me some other example code to show upload multi files like gmail that could be encapsulated into component easliy ;

thanks a lot

Kor
08-30-2006, 04:15 PM
A recent one (pages are still under construction)

http://www.mc.ro/client/zdi/contnou-agentie.php

The Browse button... This is what you want?

asert
08-30-2006, 04:22 PM
A recent one (pages are still under construction)

http://www.mc.ro/client/zdi/contnou-agentie.php

The Browse button... This is what you want?

yes,but...the "real" browser button seem to small,so if I click the "pseudo" browser button anear left edge,the "real" browser button would not be clicked;

Kor
08-30-2006, 04:24 PM
as I said, as far as I know, there is no way (or I have not found it yet) to modify the button's size or the distance between the input file box and it's button.

asert
08-30-2006, 04:30 PM
as I said, as far as I know, there is no way (or I have not found it yet) to modify the button's size or the distance between the input file box and it's button.
and I posted code can't be fixed?

Kor
08-30-2006, 04:34 PM
I don't know. Post here your code, maybe someone else has a solution.

asert
08-30-2006, 04:41 PM
I don't know. Post here your code, maybe someone else has a solution.
hi,thanks for your help,I just modified a little code,and it works not bad;
modified code snippet:


onmousemove="form1.file1.style.pixelLeft=event.offsetX;form1.file1.style.pixelTop=event.y-10;"


entire code:


<html>
<br><br><br>
<table> <!-- it works very well if delete the table tag-->
<input type="button" name="selbtn" size="30" value="upload a attachment"
onmousemove="form1.file1.style.pixelLeft=event.offsetX;form1.file1.style.pixelTop=event.y-10;"/>
<form enctype="multipart/form-data" method="POST" name="form1">
<input type="file" name="file1" style="position:absolute;width:0px" />
</form>
</table>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum