Skip to main content
Inspiring
August 30, 2006
Question

urgent drop down help

  • August 30, 2006
  • 5 replies
  • 454 views
using Javascript

I have a drop down with the following

1. jobs
2. annoucements
3.cars

I have few textfields in the same form, one of the textfield is called
"position" and is not validated and i want to validate it

I want to know how can i write the validation in javascript or VB script if
someone selects from the dropdown JOBS only the the position textfield shud
be validated saying that

" you have selected the jobs from the drop down so pls fill the positition
field "


This topic has been closed for replies.

5 replies

Inspiring
August 30, 2006
<option onBlur="FireAction" id="whatever"
Value="whatever">Description</option>

But, note that I did not provide code - you're still going to need to
construct the actual JS funciton.

Jon

"Techy" <anwar@clickbahrain.com> wrote in message
news:ed49uv$5m$1@forums.macromedia.com...
> Dear Crash
>
> thank you for replying but I dont get how to do
>
> my dropdown name is " cmdType"
>
> and how do i add another function to the form tag cos i am already calling
> a fucntion in the same fomr
>
> <form onsubmit=return validateform() ></form>
>


Inspiring
August 30, 2006
Dear Crash

thank you for replying but I dont get how to do

my dropdown name is " cmdType"

and how do i add another function to the form tag cos i am already calling a
fucntion in the same fomr

<form onsubmit=return validateform() ></form>


Inspiring
August 30, 2006
Murray, thanks for catching me.

OnFocus nothing will be set. You will need blur or change, I think, not
offFocus.

a.. blur - The input focus was lost.
b.. change - An element lost the focus since it was changed.
c.. focus - The input focus was obtained.
d.. reset - The user reset the object, usually a form.
e.. select - Some text is selected
f.. submit - The user submitted an object, usually a form.
from :
http://www.comptechdoc.org/independent/web/cgi/javamanual/javaevents.html
"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:ed48qe$s44$1@forums.macromedia.com...
> <select onFocus="CalljsScript()">
>
> ?
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "crash" <crash@bcdcdigital.com> wrote in message
> news:ed47ls$qq6$1@forums.macromedia.com...
>> Process, not script:
>>
>> <form>
>> <DropDownList offFocus="CalljsScript()">
>> </form>
>>
>> jsScript {
>> if FormName.FieldName.Value(forDropDown) == JobsValue then
>> set FormName.FieldName.Value(forPosition) == 'you have selected the
>> jobs from the drop down so pls fill the positition field'
>> }
>>
>>
>> "Techy" <anwar@clickbahrain.com> wrote in message
>> news:ed32s8$e75$1@forums.macromedia.com...
>>> using Javascript
>>>
>>> I have a drop down with the following
>>>
>>> 1. jobs
>>> 2. annoucements
>>> 3.cars
>>>
>>> I have few textfields in the same form, one of the textfield is called
>>> "position" and is not validated and i want to validate it
>>>
>>> I want to know how can i write the validation in javascript or VB script
>>> if someone selects from the dropdown JOBS only the the position
>>> textfield shud be validated saying that
>>>
>>> " you have selected the jobs from the drop down so pls fill the
>>> positition field "
>>>
>>
>>
>
>


Inspiring
August 30, 2006
<select onFocus="CalljsScript()">

?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"crash" <crash@bcdcdigital.com> wrote in message
news:ed47ls$qq6$1@forums.macromedia.com...
> Process, not script:
>
> <form>
> <DropDownList offFocus="CalljsScript()">
> </form>
>
> jsScript {
> if FormName.FieldName.Value(forDropDown) == JobsValue then
> set FormName.FieldName.Value(forPosition) == 'you have selected the
> jobs from the drop down so pls fill the positition field'
> }
>
>
> "Techy" <anwar@clickbahrain.com> wrote in message
> news:ed32s8$e75$1@forums.macromedia.com...
>> using Javascript
>>
>> I have a drop down with the following
>>
>> 1. jobs
>> 2. annoucements
>> 3.cars
>>
>> I have few textfields in the same form, one of the textfield is called
>> "position" and is not validated and i want to validate it
>>
>> I want to know how can i write the validation in javascript or VB script
>> if someone selects from the dropdown JOBS only the the position textfield
>> shud be validated saying that
>>
>> " you have selected the jobs from the drop down so pls fill the
>> positition field "
>>
>
>


Inspiring
August 30, 2006
Process, not script:

<form>
<DropDownList offFocus="CalljsScript()">
</form>

jsScript {
if FormName.FieldName.Value(forDropDown) == JobsValue then
set FormName.FieldName.Value(forPosition) == 'you have selected the jobs
from the drop down so pls fill the positition field'
}


"Techy" <anwar@clickbahrain.com> wrote in message
news:ed32s8$e75$1@forums.macromedia.com...
> using Javascript
>
> I have a drop down with the following
>
> 1. jobs
> 2. annoucements
> 3.cars
>
> I have few textfields in the same form, one of the textfield is called
> "position" and is not validated and i want to validate it
>
> I want to know how can i write the validation in javascript or VB script
> if someone selects from the dropdown JOBS only the the position textfield
> shud be validated saying that
>
> " you have selected the jobs from the drop down so pls fill the positition
> field "
>