Classic ASP send stringtext back to parent page textbox that has focus [Answered]RSS

2 replies

Last post Sep 04, 2013 07:34 AM by Rovastar

  • Classic ASP send stringtext back to parent page textbox that has focus

    Sep 04, 2013 04:32 AM|Whambham|LINK

    i

     have a classic asp webpage

    and i need to populate a textbox value on a parent page from a chaild page that pops up

    so on the parent page i have a link in javascript that opens a new popup window WHILE retaining focus on the textbox

    <input type="text" class="field_required2"

    name="sEcode"

    size="15"

    value="<%=sEcode %>"

    onBlur="validateEcode(this.value);" onFocus="setBGColor(this);" >

    <a onClick="searchEcodeFunc();"><img src="img/next.gif" border="0"></a>

     

    The on click  will run java script and open a popup window

    <script language="javascript">

    function searchEcodeFunc() {

    document.forms.submitter.sEcode.focus();

    window.open('ecodeSearch.asp?ecodestr'null'height=400,width=500,status=yes,toolbar=no,m enubar=no,location=no');  }

    </script>

     

    on the popup page an asp function will populate a variable and session variable with my data call it session("ecode")

     

    i need to send this session variable or a variable to the parent page textbox that is in focus

     

    the only way i have so far is via session variables

     

    on the parent page i have a further javascript that is called by the

    onBlur="validateEcode(this.value);" of the textbox

     

    the javascript it runs is

    function validateEcode(myVal) {

    var textbox = document.getElementsByName('sEcode')[0]

     textbox.value ='<%=session("Ecode") %>';

     

     

    this works but it only works when i refresh the page and do postback as the session variable is still set to the old value

  • Re: Classic ASP send stringtext back to parent page textbox that has focus

    Sep 04, 2013 05:16 AM|slepix|LINK

    Hi, I think you will have more succes with your question on http://forums.asp.net/ . The issue you are having is not related to IIS itself, but your application .

    My personal techie blog - http://www.winblogs.net
  • Rovastar Rovastar

    5445 Posts

    MVP

    Moderator

    Re: Classic ASP send stringtext back to parent page textbox that has focus

    Sep 04, 2013 07:34 AM|Rovastar|LINK

    Sadly and confusingly classic asp forum support is supplied inside the IIS forums as within Microsoft classic asp is managed by the IIS division and not the asp.net division.

    Obviously it makes more sense to have have classic asp forum with the other developer forums.......but that is the way it is.

    So the post is in the right place but sadly I personally have little clasic asp programming knowledge anymore.

    Troubleshoot IIS in style
    https://www.leansentry.com/