| | |
want to remove href="#" from JavaScript Function link
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved
![]() |
•
•
Join Date: Oct 2006
Posts: 42
Reputation:
Solved Threads: 0
Hi
I have an Image Gallery on my site. When a user click on thumbnail image, a JavaScript function will load/change image on the imageView area.
Here is the JS function :
Here is the ImageView area code :
Here is the link code :
Now come to my problem :
I wan to remove HREF="#" from the link code, because when anyone click on any link, the goes to top of page, and my Image Gallery is at center position of page.
Is there any way to remove the HREF="#" ? Or disable the page scrool ?
Help me please
Thank you
I have an Image Gallery on my site. When a user click on thumbnail image, a JavaScript function will load/change image on the imageView area.
Here is the JS function :
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<SCRIPT language="JavaScript"> function changeimage(img_name,img_src) { document[img_name].src=img_src; } </SCRIPT>
Here is the ImageView area code :
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<IMG NAME="imageloader" SRC="image_1051.jpg" ALT="Image">
Here is the link code :
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<A HREF="#" onclick="changeimage('imageloader','image1.jpg')" >link</A> <br> <A HREF="#" onclick="changeimage('imageloader','image2.jpg')" >link</A> <br> <A HREF="#" onclick="changeimage('imageloader','image3.jpg')" >link</A>
Now come to my problem :
I wan to remove HREF="#" from the link code, because when anyone click on any link, the goes to top of page, and my Image Gallery is at center position of page.
Is there any way to remove the HREF="#" ? Or disable the page scrool ?
Help me please
Thank you
•
•
Join Date: Oct 2006
Posts: 42
Reputation:
Solved Threads: 0
Hey
The problem is solved
I have changed the link code.
Old Code :
New Code :
The problem is solved

I have changed the link code.
Old Code :
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<A HREF="#" onclick="changeimage('imageloader','image1.jpg')" >link</A>
New Code :
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<A HREF="#" onclick="changeimage('imageloader','image1.jpg'); return false;" >link</A>
![]() |
Similar Threads
- Querystring values not matching with the SQL statement (ASP)
- Firefox Compatibility help with script (JavaScript / DHTML / AJAX)
- Having a bit of trouble figuring out my image upload script (PHP)
- Selectively Printing only Certain Divs (javascript/css question) (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Javascript Bookmarklet - URL Redirect
- Next Thread: HOme Page Pop Up
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser bug captchaformproblem checkbox close codes createrange() css cursor debugger dependent disablefirebug dom download dropdown editor element engine enter error events explorer ext file firefox form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jsp jump listbox maps masterpage math media menu microsoft mp4 object onmouseoutdivproblem onreadystatechange paypal pdf php player position programming progressbar prototype redirect regex runtime safari scale scriptlets search security select size software sql text textarea unicode w3c window windowofwords windowsxp wysiwyg \n





