Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-19-2005, 02:17 PM   #1
SickFinga
Registered User
 
Join Date: Nov 2002
Posts: 77
Java-scri-pt help

I need to check if a uses selected radio in the form
here is what i got

PHP Code:
if (form.usr.checked hahahaha false){
    
alert("Please select Yes or NO:");
    
form.usr.focus();
    return 
false;
    } 

But it doesnt work, user does not get an alert message
SickFinga is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-19-2005, 02:23 PM   #2
Clarion
Confirmed User
 
Join Date: Jan 2005
Location: Ontario, OR
Posts: 148
Quote:
Originally Posted by SickFinga
I need to check if a uses selected radio in the form
here is what i got

PHP Code:
if (form.usr.checked hahahaha false){
    
alert("Please select Yes or NO:");
    
form.usr.focus();
    return 
false;
    } 

But it doesnt work, user does not get an alert message
is usr the name of the radio button and form the name of the form?
__________________
Structure Northwest :: the cure for the common code ::
AIM: Asatruel | Yahoo!: Asatruel | ICQ: 111-638-053
Clarion is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-19-2005, 02:31 PM   #3
SickFinga
Registered User
 
Join Date: Nov 2002
Posts: 77
Quote:
Originally Posted by Clarion
is usr the name of the radio button and form the name of the form?

Yes, it is
SickFinga is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-20-2005, 01:43 AM   #4
SickFinga
Registered User
 
Join Date: Nov 2002
Posts: 77
:2cents

bump
SickFinga is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-20-2005, 03:24 AM   #5
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
Post a link to a page that shows the whole setup, it's not that easy to debug it given the info given... (or hit me up on icq: 33375924 before I go to bed)
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-20-2005, 05:29 AM   #6
Cogitator
Confirmed User
 
Join Date: Feb 2002
Location: Florida
Posts: 672
You're kidding right? What kind of "if" statement is that?
__________________
- this space intentionally left blank -
Cogitator is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-20-2005, 05:41 AM   #7
celebx
Confirmed User
 
Join Date: Jul 2001
Location: The Netherlands
Posts: 197
mark the checkbox with id="checkbox_name" and access it using document.getelementById("checkbox_name")

if (document.getelementById("checkbox_name").checkedh ahahahafalse) {
alert();
}
__________________
Message me for more info: ICQ 8322641 (@gmail.com).
celebx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-20-2005, 06:02 AM   #8
celebx
Confirmed User
 
Join Date: Jul 2001
Location: The Netherlands
Posts: 197
ml_doc()

<script language="Javascript" type="text/javascript">
//By Snt ICQ 83226461 (@gmail.com)

// access an obect inside an document, compatible with ALL browsers
function ml_doc(id) {doc=(document.getElementById)?'getElementById("'+ id+'")'document.layers)?'layers["'+id+'"]'document.all)?'all["'+id+'"]':false;try {eval("document."+doc).constructor;} catch(e) {alert('function ml_doc() {\nreturn '+doc+'\n}\n\n'+e);}return eval("document."+doc);}

//usage:
// ml_doc('object_name').style.background='#FFFF00';


// hide an object
function ml_love(l) {for (i=1; i<arguments.length; i++) {if(lhahahaha1) {ml_doc(arguments[i]).style.visibility='hidden';} else {ml_doc(arguments[i]).style.display='none';}}}


//usage:
// ml_love(0,'object_name'); //visibility, object dimensional effect remains
// ml_love(1,'object_name'); //display, object is hidden completely

// unhide an object
function ml_unlove() {for (i=0; i<arguments.length; i++) {ml_doc(arguments[i]).style.visibility='visible';ml_doc(arguments[i]).style.display='';}}

//usage:
// ml_unlove('object_name');


function ml_lovestate(id) {if (ml_doc(id).style.visibilityhahahaha'hidden') {return 1;} else if (ml_doc(id).style.displayhahahaha'none') {return 2;} else {return 0;}}

//usage:
// if (ml_lovestate('object_name')) {
//alert();
//}

//usage:
// if (ml_lovestate('object_name')hahahaha2) {
//alert('display=none');
//}

</script>
__________________
Message me for more info: ICQ 8322641 (@gmail.com).
celebx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-20-2005, 06:10 AM   #9
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
Join Date: Jan 2002
Location: Holland
Posts: 9,870
i respect all these guys who are giving sample codes etc. to help a guy out with his problem. Although it looks like the guy has no program skills at all. Why not buy a book if you wanna learn programming. Learn the basics etc.
__________________
Don't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-20-2005, 07:44 AM   #10
DEA - banned for life
V.I.P.
 
Join Date: Nov 2004
Location: InYour Head
Posts: 7,886
Quote:
Originally Posted by grumpy
i respect all these guys who are giving sample codes etc. to help a guy out with his problem. Although it looks like the guy has no program skills at all. Why not buy a book if you wanna learn programming. Learn the basics etc.
Ditto x 2
DEA - banned for life is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-20-2005, 07:53 AM   #11
mortenb
Confirmed User
 
mortenb's Avatar
 
Join Date: Jul 2004
Location: Denmark ICQ: 7880009
Posts: 2,203
That seems to be a lot of code to accomplish such a small thing..

Code:
function chkform(form) {
    if(form.usr[0].checked!=true) {
        alert("Please select Yes or No:");
        form.usr[0].focus();
        return false;
    }
}
Just put the [0] part on the name of the radio element in the code.. it just refers to the first radio element with the "usr" name.. if you want to check the second, it would me [1]..
mortenb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.