Click here to Skip to main content
15,886,565 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 10:47
thebiostyle23-Jan-10 10:47 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 11:00
fly90423-Jan-10 11:00 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 11:18
thebiostyle23-Jan-10 11:18 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 11:29
fly90423-Jan-10 11:29 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 11:23
fly90423-Jan-10 11:23 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 11:48
thebiostyle23-Jan-10 11:48 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle24-Jan-10 7:07
thebiostyle24-Jan-10 7:07 
AnswerRe: PHP Member Pages... Need major help... Pin
Graham Breach24-Jan-10 7:57
Graham Breach24-Jan-10 7:57 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle24-Jan-10 8:34
thebiostyle24-Jan-10 8:34 
QuestionAdd two difference items to shopping card-Paypal Pin
tktuan28-Dec-09 16:08
tktuan28-Dec-09 16:08 
AnswerRe: Add two difference items to shopping card-Paypal Pin
cjoki29-Dec-09 4:40
cjoki29-Dec-09 4:40 
GeneralRe: Add two difference items to shopping card-Paypal Pin
tktuan29-Dec-09 15:05
tktuan29-Dec-09 15:05 
GeneralRe: Add two difference items to shopping card-Paypal Pin
cjoki30-Dec-09 4:42
cjoki30-Dec-09 4:42 
GeneralRe: Add two difference items to shopping card-Paypal [modified] Pin
tktuan30-Dec-09 15:20
tktuan30-Dec-09 15:20 
AnswerRe: Add two difference items to shopping card-Paypal Pin
vorotnik27-Jan-10 6:58
vorotnik27-Jan-10 6:58 
QuestionPython in Corpus Analysis Pin
ahmedshamim24-Dec-09 14:29
ahmedshamim24-Dec-09 14:29 
QuestionRadio Buttons Pin
thebiostyle24-Dec-09 8:56
thebiostyle24-Dec-09 8:56 
AnswerRe: Radio Buttons Pin
abushahin28-Dec-09 7:47
abushahin28-Dec-09 7:47 
GeneralRe: Radio Buttons Pin
thebiostyle28-Dec-09 10:34
thebiostyle28-Dec-09 10:34 
GeneralRe: Radio Buttons Pin
cjoki29-Dec-09 4:32
cjoki29-Dec-09 4:32 
GeneralRe: Radio Buttons Pin
abushahin31-Dec-09 7:45
abushahin31-Dec-09 7:45 
AnswerRe: Radio Buttons (long answer) Pin
enhzflep29-Dec-09 14:14
enhzflep29-Dec-09 14:14 
GeneralRe: Radio Buttons (long answer) Pin
thebiostyle30-Dec-09 7:31
thebiostyle30-Dec-09 7:31 
GeneralRe: Radio Buttons (long answer) Pin
enhzflep30-Dec-09 11:56
enhzflep30-Dec-09 11:56 
That's alright - been idly thinking about the question since I saw it, yesterday was the first time I had some time spare to play with.

First things first - if you don't want labels as your poll doesn't require them, then just forget about the label object. For each radio button, create an img and a br, then simply append them to the target container's child list.

To just add a 'radio-button' without a label use this code (or a suitable modification):

function addRadioButton(groupName, optionValue, tgtContainer)
{
	// create the image object
	imgObj = document.createElement("img");
	imgObj.name = groupName;
	imgObj.src = "rb1.png";
	imgObj.width = "12";
	imgObj.height = "12";
	imgObj.value = optionValue;
	imgObj.onmouseout =  function(){ changeState(this, 1); updateImg(this); }
	imgObj.onmouseover = function(){ changeState(this, 1); updateImg(this); }
	imgObj.onclick = function(){doClick(this);}

	// create the br object
	newLineObj = document.createElement("br");
	
	// add the img & br objects to the target container
	tgtContainer.appendChild(imgObj);	
	tgtContainer.appendChild(newLineObj);
}


Next,
Nope! You can't see a thing in Dreamweaver's design mode - it's a 2 line body. (Although I know dw can show live previews of sites that use a database, I couldn't tell you if it does this via a clever trick, or if it just runs the page)

I think I'm getting a little lost in your question, If I understand what you're asking, I think the code in my first post does that.
I actively encourage the downloading and modification of source code for the purpose of learning.
(It's the way we learn to speak - by copying and modification to suit the situation)

However, let me point out that I have used anonymous functions for the event handlers. Doing this allows the called function to get access to the calling object via the word 'this'.

"When the page loads it also loads the buttons as the images" - pardon?



If I may - when you saved and ran the page I provided above, how was the functionality different from what you want? What doesn't work right?
GeneralRe: Radio Buttons (long answer) Pin
thebiostyle30-Dec-09 12:17
thebiostyle30-Dec-09 12:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.