| | |
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 calendar captchaformproblem checkbox child close column createrange() css cursor decimal dependent design disablefirebug dom download dropdown editor element embed engine error events explorer ext file form forms google gwt gxt hiddenvalue highlightedword hint html htmlform ie8 iframe images index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jump libcurl listbox math media microsoft mimic mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php player post problem progressbar regex runtime scroll search security select shopping size software sql text textarea unicode w3c web website window windowofwords windowsxp wysiwyg \n





