DIV help
- Started
- Last post
- 5 Responses
- skelly
I know this has been covered but I can't find the thread I was looking for.
I want a block of designated information to change when the user clicks a button outside of that area (ie. views 1, 2, 3 & 4 of a project). I only know how to do this using iframes (yuck).
How do I do it using divs? Any helpful links or code would be appreciated. Thanks.
- heavyt0
i would use JS.
in that case, you change the innerHTML of that div.eg.
document.getElementById('divIdHe... = 'whatever you want it to equal now';TR1
- heavyt0
i am using that on my current portfolio site to avoid postbacks when you select each project.
TR1
- skelly0
wow, worked first try. is there a way to run the script at the link instead of at in a function?
right now I have an onClick running it, but I have to have the html link as "#" which refreshes the page (no good).
- heavyt0
you can always just use
a href="javascript: functionname(args);"TR1
- skelly0
yeah, I just ended up making a function anyway. thanks for the help!