Calendar Thread Continues

interlates

New Member
This is a continuation of the calendar control thread below.Hi James,<BR><BR>Tried your suggestion (below), but I think I've got the syntax wrong.<BR><BR>In Calendar.aspx, I replaced:<BR><BR>strjscript = strjscript & "window.opener." & Httpcontext.Current.Request.Querystring("formname") & ".value = http://aspmessageboard.com/archive/index.php/'" & replace(Calendar1.SelectedDate, ".", "/") & "';window.close();"<BR><BR>with<BR><BR>strjscript = strjscript & "window.opener." & Httpcontext.Current.Request.Querystring("formname") & ".value = '" & replace(Calendar1.SelectedDate, ".", "/") & "'.focus();window.close();"<BR><BR>but I just got an error "Object doesn't support this property or method".<BR><BR>Awaiting instructions....<BR><BR>JON<BR><BR><BR><BR><BR><BR>RE: I don't know if it'll help you...<BR>James Avery - 3/20/2002 1:02:09 PM<BR> <BR>That is interesting... try setting the focus to that textbox after you set the value. Just use .focus() in javascript. Lets continue this on the new thread Calendar Thread Continues.<BR><BR>Yeah, you can't put it right in that line. You would need to do it like this: <BR><BR>strjscript = strjscript & "window.opener." & Httpcontext.Current.Request.Querystring("formname") & ".value = '" & replace(Calendar1.SelectedDate, ".", "/") & "';window.opener." & Httpcontext.Current.Request.Querystring("formname") & ".focus();window.close();"<BR>Hi,<BR><BR>Tried your suggested line. The good news is: no error messages, the syntax works, and it does put the focus in the text box after you leave the page and come back to it. It doesn't, however, preserve the viewstate - when you come back, the text box is blank.<BR><BR>Any other ideas?<BR><BR>JON
 
Back
Top