Connecting Tech Pros Worldwide Forums | Help | Site Map

how to set document stable in a same place

balakrishnan.dinesh@gmail.com
Guest
 
Posts: n/a
#1: Aug 17 '06
hi Frnds,

My senario is this,
~ Im having a html page which have a content of more than one
page, so obivously scroll will be present in my page.
~ In the bottom of my page , Im having some 10 checkbox for some
option.
to select all checkboxes, im having link called selectAll ,

~ The problem is -
When i click the selectAll link, all checkboxes were checked,
but the page going to the top , eventhough the focus is still in the
selectAll link .

~ I dont why the page is going top, can u tell me the reason, And
tell me to be stay there in the same position after clicking the link.

Thank u

Rgrds...
Dinesh


RobG
Guest
 
Posts: n/a
#2: Aug 18 '06

re: how to set document stable in a same place



balakrishnan.dinesh@gmail.com wrote:
Quote:
hi Frnds,
>
My senario is this,
~ Im having a html page which have a content of more than one
page, so obivously scroll will be present in my page.
~ In the bottom of my page , Im having some 10 checkbox for some
option.
to select all checkboxes, im having link called selectAll ,
>
~ The problem is -
When i click the selectAll link, all checkboxes were checked,
but the page going to the top , eventhough the focus is still in the
selectAll link .
>
~ I dont why the page is going top, can u tell me the reason, And
tell me to be stay there in the same position after clicking the link.
Have the href attribute of the link do something useful (like request a
page from the server with the checkboxes checked). Have the onclick
handler return the exit status of the function it calls. Have the
function return false if the script runs successfully, e.g.:

<a href="allChecked.html" onclick="return checkAll();">Check all</a>

<script type="text/javascript">

function checkAll()
{
/* code to check all checkboxes */

if ( /* everything is OK */ ) return false;

}
</script>


--
Rob

balakrishnan.dinesh@gmail.com
Guest
 
Posts: n/a
#3: Aug 21 '06

re: how to set document stable in a same place


Thanks for ur suggestion , its working fine

Closed Thread


Similar JavaScript / Ajax / DHTML bytes