want to pass result of query to javascript popup w

Results 1 to 3 of 3

Thread: want to pass result of query to javascript popup w

  1. #1
    Join Date
    Dec 1969

    Default want to pass result of query to javascript popup w

    I have a user logging in, when the application finds he has several assignments through a database query, I want to pop-up a window making him choose which assignment he wants to work on. In the pop-up window I want to display the assignment number, date, company, etc (returned from the querry)<BR><BR>I am opening the window like this:<BR><BR>if assignmentcount &#062; 1 then<BR>%&#062; &#060;script language = javascript&#062; <BR> openmultiwindow = window.open(&#039;popupassignment.asp?,&#039;popup ***&#039;,&#039;WIDTH=400,HEIGHT=340 screenX=300,screenY=300,top=300,left=300&#039;);<B R>&#060;/script&#062;<BR><BR>How can I pass the results of my asp query to the popup window?<BR><BR>I&#039;m drawing a blank. Can you give me a start or a link to help me get going?<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default Best way...

    ...is probably to simply requery in the .ASP file for that popup.<BR><BR>Pass in just the userid in the querystring:<BR><BR>window.open(&#039;popupassignm ent.asp?userid=7392&#039;,&#039;popupass&#039;,<BR > &#039;WIDTH=......&#039;);<BR><BR>If the query results are very small (less than 500 characters *total*) then you perhaps could pass all of them in the querystring.<BR><BR>Another alternative would be to put the query results into a JavaScript array in the main page and then use JS code in the popup to grab the data from that main page and display it. If you aren&#039;t at least moderately good at writing JS code, I wouldn&#039;t choose this option (though it&#039;s probably the most efficient choice, but is efficiency important for a students&#039; web site?).<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: want to pass result of query to javascript pop

    javascript.internet.com in forms section will show you what you need to get started. The only caution I would have is that a large number of users have started using pop-up stoppers and there goes your plan.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts