questhaven
Programmer
Below you will find my original post in the javascript forum - from which I was told is not feasible because ASP does not work this way, and to try and post here for ideas for a work around. I desperately need to find another solution!
What I am trying to do is launch a pop-up that contains a drop down menu. Based on what is chosen in the drop down menu, an asp function needs to be called, and the value returned to the opening window. I was trying to post the form in the pop-up with javascript so I could maintain the location of the opening window, however - since I can not get the value from the drop down if I post it though javascript, I am at a loss. Does anyone have any ideas?
ORIGINAL POST: Hi there - I would really appreciate any help anyone could give me. I am trying to get the value of the drop down in the form below, which I am submitting using javascript, and use it within an ASP function, prior to submitting the results of that ASP function to the opening page. I have included my code below. The form value would need to go between the code that says "##FORM VALUE NEEDS TO BE HERE##".
Is this even possible? I feel like I have tried everything!
<HEAD>
<%templateMSG= parseTokens(##FORM VALUE NEEDS TO BE HERE##, 743,3 ,0,0)%>
<script language=javascript>
function sendValue(s){
var selvalue = s.options[s.selectedIndex].value;
top.opener.document.NoteForm.message.value = ' <%=templateMSG%> ';
}
</script>
</HEAD>
<body>
<%
dim txtTemplate
Response.Write("<form name=selectform>"
Response.Write("<INPUT type=""hidden"" name=""action"" value=""2"">"
Response.Write("<INPUT type=""hidden"" name=""winOpen"" value="""">"
txtTemplate = cboGenericDropDownDetails("0", "txtTemplate","","exec sql_Templates"
txtTemplate = cboGenericDropDownSelect(txtTemplate, templateID)
Response.Write("<P>Choose a template: " & txtTemplate & " <input type=button value=""Add"" onClick=""sendValue(this.form.txtTemplate);"">"
Response.write("</form>"
%>
</body>
What I am trying to do is launch a pop-up that contains a drop down menu. Based on what is chosen in the drop down menu, an asp function needs to be called, and the value returned to the opening window. I was trying to post the form in the pop-up with javascript so I could maintain the location of the opening window, however - since I can not get the value from the drop down if I post it though javascript, I am at a loss. Does anyone have any ideas?
ORIGINAL POST: Hi there - I would really appreciate any help anyone could give me. I am trying to get the value of the drop down in the form below, which I am submitting using javascript, and use it within an ASP function, prior to submitting the results of that ASP function to the opening page. I have included my code below. The form value would need to go between the code that says "##FORM VALUE NEEDS TO BE HERE##".
Is this even possible? I feel like I have tried everything!
<HEAD>
<%templateMSG= parseTokens(##FORM VALUE NEEDS TO BE HERE##, 743,3 ,0,0)%>
<script language=javascript>
function sendValue(s){
var selvalue = s.options[s.selectedIndex].value;
top.opener.document.NoteForm.message.value = ' <%=templateMSG%> ';
}
</script>
</HEAD>
<body>
<%
dim txtTemplate
Response.Write("<form name=selectform>"
Response.Write("<INPUT type=""hidden"" name=""action"" value=""2"">"
Response.Write("<INPUT type=""hidden"" name=""winOpen"" value="""">"
txtTemplate = cboGenericDropDownDetails("0", "txtTemplate","","exec sql_Templates"
txtTemplate = cboGenericDropDownSelect(txtTemplate, templateID)
Response.Write("<P>Choose a template: " & txtTemplate & " <input type=button value=""Add"" onClick=""sendValue(this.form.txtTemplate);"">"
Response.write("</form>"
%>
</body>