It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Partner Sites
Board index Programming JavaScript Forum

anchor using javascript

anchor using javascript

Postby john_zakaria on Mon Feb 09, 2009 8:25 am

i am making a javascipt function to make show and hide, but i have a problem that i cant use this function by anchors.

<div id="show2" class="show_span" style="cursor:pointer; display:inline;" onclick="showhidefn('doc2','show2');location.href='#1' " >


i need to make it using anchors. but the anchor is not working well wiz me using js.
can anyone help me to make the anchor using js?
john_zakaria
 
Posts: 29
Joined: Sun Feb 08, 2009 8:29 am

Re: anchor using javascript

Postby john_zakaria on Wed Feb 11, 2009 7:39 am

knew why i have this problem but till now u can not solve it

i am using a function for show/hide.. the data is hidden when page is loaded so there is a small data shown on the page (only titles) so when i press on any title to go to this anchor it did not work well bcoz of the existance of small data..
but when i made the hidden data block i found that the anchor is working well..

i need the data to be hidden and also i need to use the anchor.. how i can solve it????


thnx alot
john_zakaria
 
Posts: 29
Joined: Sun Feb 08, 2009 8:29 am

Re: anchor using javascript

Postby rangana on Wed Feb 11, 2009 10:14 am

Try to check in your code if there are cancelling of the "onclick" event.

It should direct you to the desired anchor.

Alternatively, please show us your code so we could have something to play with.
~ Get me some work, I do freelancing ~
User avatar
rangana
500+ Club
 
Posts: 929
Joined: Wed Feb 27, 2008 6:14 am
Location: Cebu City Philippines


Return to JavaScript Forum

Who is online

Users browsing this forum: No registered users and 5 guests