Go Back   Computer Forums > Welcome To Computer Forums .org > Social Lounge | Off Topic
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 07-19-2009, 02:53 PM   #1
Daemon Poster
 
Ronspc's Avatar
 
Join Date: Oct 2008
Posts: 688
Send a message via AIM to Ronspc
Default Need Help Immediately. Chance for REP!

I am building a website pretty much like this:

http://www.pugetsystems.com/configur...e=g&sys_type=n

I have the radio buttons and all that crap looks great. But what I need help with is. You see on the link I provided how when you select an option it changes the specific picture of the item. I hope i explained that well enough. I want to add that.

I am using Dreamweaver CS4.

If I didn't explain thoroughly enough ugh Im sorry.
__________________

__________________
Dell motherboard, 2 hard drives 8600GT AMD Athlon

WWW.INSANITECHPC.COM
Ronspc is offline   Reply With Quote
Old 07-19-2009, 03:34 PM   #2
Daemon Poster
 
dudelewis1's Avatar
 
Join Date: Jun 2009
Posts: 765
Default Re: Need Help Immediately. Chance for REP!



Don't know more than basic html, but I would start by looking in here.
__________________

__________________
Athlon II x2 255 @ 3.1ghz | 4 gb ddr3 ram| 500+80 gb wd hd | Sapphire 5450 | Win7 | Hanns G 20"

Toshiba Satellite | Core2Duo @ 2.0 ghz | 3gb ram | 250 gb hd | lolintelgma | Ubuntu 10.04
dudelewis1 is offline   Reply With Quote
Old 07-19-2009, 03:36 PM   #3
Daemon Poster
 
Ronspc's Avatar
 
Join Date: Oct 2008
Posts: 688
Send a message via AIM to Ronspc
Default Re: Need Help Immediately. Chance for REP!

I did that. Couldnt find anything.
__________________
Dell motherboard, 2 hard drives 8600GT AMD Athlon

WWW.INSANITECHPC.COM
Ronspc is offline   Reply With Quote
Old 07-19-2009, 04:19 PM   #4
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Need Help Immediately. Chance for REP!

In your radio button, you'd have an onclick attribute that'd specify a javascript function. This function would then change the source of an element on the page so it pointed to a different picture.

So say this was one of your radio buttons:
<input type="radio" name="foo" value ="1" onclick="changeImage("image.png")"/>

And this was your image:
<img name="image" src="original.png">

This would be your function that was called to change the image:
<script language="JavaScript">
function changeImage(var) {
document.image.src=var;
}
</script>

Untested code, may not be quite right because my HTML / javascript is very rusty, but that should be the gist of it
berry120 is offline   Reply With Quote
Old 07-19-2009, 05:18 PM   #5
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default Re: Need Help Immediately. Chance for REP!

Quote:
Originally Posted by berry120 View Post
In your radio button, you'd have an onclick attribute that'd specify a javascript function. This function would then change the source of an element on the page so it pointed to a different picture.

So say this was one of your radio buttons:
<input type="radio" name="foo" value ="1" onclick="changeImage("image.png")"/>

And this was your image:
<img name="image" src="original.png">

This would be your function that was called to change the image:
<script language="JavaScript">
function changeImage(var) {
document.image.src=var;
}
</script>

Untested code, may not be quite right because my HTML / javascript is very rusty, but that should be the gist of it
You'd need to use document.getElementById, so

<img id="image" src="original.png">

This would be your function that was called to change the image:
<script language="JavaScript">
function changeImage(var) {
document.getElementById('image').src=var;
}
</script>
__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 07-19-2009, 07:09 PM   #6
Daemon Poster
 
Ronspc's Avatar
 
Join Date: Oct 2008
Posts: 688
Send a message via AIM to Ronspc
Default Re: Need Help Immediately. Chance for REP!

oh dear lord. Im using Dreamweaver CS4 not very good wit HTML. But thanks guys, any other suggestions on makin it easier
__________________
Dell motherboard, 2 hard drives 8600GT AMD Athlon

WWW.INSANITECHPC.COM
Ronspc is offline   Reply With Quote
Old 07-20-2009, 10:00 AM   #7
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,004
Default Re: Need Help Immediately. Chance for REP!

unfortunately no.
if you want to make a page that has dynamic elements then you'll need to do a little bit of scripting...
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 12:21 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0