Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: form radio dependencides
webiz
Junior Member

Posts: 2
Registered: 4/18/2005
Location: Ramat-Gan, Israel
Member Is Offline
posted on 4/18/2005 at 11:21 PM Reply With Quote
form radio dependencides


Hello,

I am trying to use a radio so that user can select which form is relevant for him without reloading the whole page.

so I actually need to use the same form, but to validate different value based on the user's selection.

here is my idea:
<script type="text/javascript">
function myformValidator()
{
if (getCheckedValue(document.forms['contentPagesProperties'].elements['pageType']) =='E')
{
var contentPagesPropertiesVal = new validator('contentPagesProperties', e_fields, o_config)
if(document.contentPagesProperties.onsubmit())
{//this check triggers the validations
document.contentPagesProperties.submit();
}
}
else
{
var contentPagesPropertiesVal = new validator('contentPagesProperties', o_fields, o_config)
if(document.contentPagesProperties.onsubmit())
{//this check triggers the validations
document.contentPagesProperties.submit();
}
}
}
</script>

<script type="text/javascript">
var o_fields = {
'pageTitle' : {'r': true, 'l': 'Page Title', 't': 'pageTitle'},
'pageCat' : {'r': true, 'l': 'Page Category', 't': 'pageCat'},
'pageCompany' : {'r': true, 'l': 'Page Company', 't': 'pageCompany'},
'pageBody' : {'r': true, 'l': 'Text', 't': 'pageBody'}
}

var o_config = {
'alert' : 1
}

var e_fields = {
'pageLink' : {'r': true, 'l': 'Source of external content', 't': 'pageLink'},
'pageKeyW' : {'r': true, 'l': 'Key Words', 't': 'pageKeyW'}
}
</script>

but as you guess, still, it doesn't work.
Tigra or anyone else, can you give me a possible solution please?

Thanks,
Daniel Engelman,
webiz IT, Israel.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Product Page
Product Demonstrations Product Demos
Registration Form Validation
Login Form Validation
Free Download Free Download
Product Documentation Documentation
Documenation Page
Change Log
Validators Comparison Table
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004