|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
querystring exceeds size limit using window.open
of ID's using window.open in javascript. The number of the ID's exceeds the querystring length. Therefore, I would like to somehow use the POST method to submit. (or another method without rewriting the ASP page!) Please review the code below before submitting since this can be easily done but I am not sure how using <body onload... >. %> <body onload="myFunc('<%=request("wid")%>')"></body> <% <script language=javascript> function myFunc(w2) { var args = "&wono=" + w2; window.open("test_alert.asp?"+args, null,'width=600,height=550,scrollbars=yes,resizable=yes,status=yes,top=10,left=50'); } </script> Ben wrote:
> Thanks in advance for any help. I am attempting to pass a large This is not really an ASP question, but...> number of ID's using window.open in javascript. The number of > the ID's exceeds the querystring length. Therefore, I would > like to somehow use the POST method to submit... <form method="post" action="test_alert.asp" target="windowName" onsubmit="window.open('','windowName','width=600,height=550...')"> -- Dave Anderson Unsolicited commercial email will be read at a cost of $500 per message. Use of this email address implies consent to these terms. Thanks, but this page is being posted back to itself so there are many
different ways to submit. You are right... more javascript than an ASP post. Sorry about that. [Please quote what you are responding to]
Ben wrote: > Thanks, but this page is being posted back to itself so there I think you are missing the point. If you want to POST a form into a popup > are many different ways to submit. window, use the TARGET attribute of the FORM element and ensure that target is opened. I don't care how you implemented it -- my example was meant to illustrate the use of TARGET. Besides -- "posted back to itself" is inconsistent with passing "a large number of ID's using window.open". Are you saying that each successive instance of the script will opsn another copy of itself into yet another popup window? -- Dave Anderson Unsolicited commercial email will be read at a cost of $500 per message. Use of this email address implies consent to these terms. Dave wrote:
> I think you are missing the point. If you want to POST a form into a popup Thanks Dave... I appreciate your help. Maybe I should be getting away> window, use the TARGET attribute of the FORM element from <body onload... Anyway, below is my lastest attempt... opens the new window but no data submitted to new window. Can you see the problem? <form name="frmTemp" action="wor_alert.asp" method="POST" target="newWin"> <input type="hidden" name="wono" value="<%=request("wono")%>"> </form> <body onload="myFunc1();"></body> function myFunc1() { var newWin = window.open("wor_alert.asp","newWin","width=600,height=550,scrollbars=yes,resizable=yes,status=yes,top=10,left=50"); newWin.document.frmTemp.submit(); } Ben wrote:
> Anyway, below is my lastest attempt... opens the new window Yes:> but no data submitted to new window. Can you see the problem? > window.open("wor_alert.asp","newWin","width=600..."); That should be:window.open("","newWin","width=600..."); -- Dave Anderson Unsolicited commercial email will be read at a cost of $500 per message. Use of this email address implies consent to these terms.
Show quote
"Ben" <bcummi***@yahoo.com> wrote in message null,'width=600,height=550,scrollbars=yes,resizable=yes,status=yes,top=10,lenews:1147814230.894027.290470@i40g2000cwc.googlegroups.com... > Thanks in advance for any help. I am attempting to pass a large number > of ID's using window.open in javascript. The number of the ID's exceeds > the querystring length. Therefore, I would like to somehow use the POST > method to submit. (or another method without rewriting the ASP page!) > Please review the code below before submitting since this can be easily > done but I am not sure how using <body onload... >. > > %> > <body onload="myFunc('<%=request("wid")%>')"></body> > <% > > <script language=javascript> > function myFunc(w2) > { > var args = "&wono=" + w2; > > window.open("test_alert.asp?"+args, > ft=50'); > Changing to POST method WILL require some changes to the page.> } > </script> > Since the data for the Test_alert.asp page is already on the server why not store it somewhere and just send a tag for the data to the client. The Test_alert can use the tag to retrieve the actual data. Anthony. I was trying to stay away from Session Variables but it looks like I
need to use them. Thanks. "Ben" <bcummi***@yahoo.com> wrote in message A session variable is one way of doing it but not the only way. You couldnews:1147815786.681546.117260@y43g2000cwc.googlegroups.com... > I was trying to stay away from Session Variables but it looks like I > need to use them. Thanks. > use a table in an DB as an alternative. |
|||||||||||||||||||||||