User Profile

Collapse

Profile Sidebar

Collapse
sunfun
sunfun
Last Activity: Sep 17 '10, 09:21 PM
Joined: Sep 9 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sunfun
    replied to Switch IMG Src using JavaScript
    I took the above suggestions and was able to move it to a function as shown below. I also made a few improvements for reusability sake. I still have 2 problems.

    1) the image still doesn't swap.
    2) the page refreshes. I was under the impression that if I returned false from the function, that it would not refresh the page. Am I mistaken??

    TIA

    Code:
    <SCRIPT LANGUAGE="javascript">
    ...
    See more | Go to post

    Leave a comment:


  • sunfun
    replied to Switch IMG Src using JavaScript
    For the purposes of what I am trying to do it isn't possible to put it in a separate function.
    See more | Go to post

    Leave a comment:


  • sunfun
    started a topic Switch IMG Src using JavaScript

    Switch IMG Src using JavaScript

    I am trying to swap the source of the image in the image tag when the onclick event of the A HREF fires off. I know I should have this as a separate function as opposed to trying to do it inline, but that isn't a possibility for what I am doing. If I take out the image swap if, it fires correctly, but with it in, it isn't firing.

    Here is the source:

    Code:
    <table border=1 bordercolor="dddddd" cellspacing=0
    ...
    See more | Go to post
No activity results to display
Show More
Working...