I have a form, I select eventname from my form and after selecting,it displays the values related to it from database but when it shows other values, the value in eventname disappers.
Can any one please help or tell me what i am doing wrong here.
the code is here:
<select name='eventtype' onchange='eventtypeselect(this)'>
<option value=''></option>
<option value=''>TechnicalPre-screen</option>
<option value=''>Passport1</span></option>
<option value=''>Passport2</option>
<option value=''>Passport3</option>
<option value=''>Passport4</option>
<option value=''>DesignReview</span></option>
</select>
</td>
function eventtypeselect(selobj)
{
// alert('in eventtypeselect ') ;
// alert('Option value: ' + selobj.options[selobj.selectedIndex].value);
// alert('Text Value: ' + selobj.options[selobj.selectedIndex].text);
var mystring = selobj.options[selobj.selectedIndex].text ;
var projectstring = "" ;
var myobj = document.all('saveprojectname');
projectstring = myobj.value
if (projectstring == ""
{
alert("You must select a project first."
;
window.location="createevent.jsp" ;
return;
}
window.location="createevent.jsp?projectname=" + projectstring + "&eventtype=" + mystring ;
return ;
Can any one please help or tell me what i am doing wrong here.
the code is here:
<select name='eventtype' onchange='eventtypeselect(this)'>
<option value=''></option>
<option value=''>TechnicalPre-screen</option>
<option value=''>Passport1</span></option>
<option value=''>Passport2</option>
<option value=''>Passport3</option>
<option value=''>Passport4</option>
<option value=''>DesignReview</span></option>
</select>
</td>
function eventtypeselect(selobj)
{
// alert('in eventtypeselect ') ;
// alert('Option value: ' + selobj.options[selobj.selectedIndex].value);
// alert('Text Value: ' + selobj.options[selobj.selectedIndex].text);
var mystring = selobj.options[selobj.selectedIndex].text ;
var projectstring = "" ;
var myobj = document.all('saveprojectname');
projectstring = myobj.value
if (projectstring == ""
alert("You must select a project first."
window.location="createevent.jsp" ;
return;
}
window.location="createevent.jsp?projectname=" + projectstring + "&eventtype=" + mystring ;
return ;