Advertisement

02.25.2006 at 02:28PM PST, ID: 21751651
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

How does one create a new window containing the results of a submit button action?

Asked by mjcoyne in JavaScript

Tags: , ,

I know very little Javascript -- most of my programming is done in Perl.  Perhaps this is a simple question, but to me it's worth the points...:)

I have a JS function that is called when a user clicks on an object in a web page:

function makeWindow (title, caption, output, type) {
    outputWindow=window.open("","seqWindow","resizable=yes,menubar=yes,toolbar=yes,height=300,width=600,scrollbars=yes,status=yes,offscreenBuffering=false");
    outputWindow.focus();
    outputWindow.document.write ('<HTML><HEAD><TITLE>' + title + '</TITLE>');
    outputWindow.document.write ('</HEAD>');
    outputWindow.document.write ('<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#551A8B" alink="#0000FF">');
    outputWindow.document.write ('<font face="Arial,Helvetica">' + caption + '</font><br>');
    outputWindow.document.write ('<font face="Arial,Helvetica">Double-click the sequence to select it.</font>');
    outputWindow.status = 'Please wait...';
    outputWindow.document.write ('<FORM NAME="output">');
    outputWindow.document.write ('<br><TEXTAREA NAME="seq" ROWS="6" COLS="60" WRAP=SOFT>');
    outputWindow.document.write (output);
    outputWindow.document.write ('</TEXTAREA>');
    outputWindow.document.write ('</FORM>');
    outputWindow.document.write ('<FORM NAME="blastit" ACTION="http://www.ncbi.nlm.nih.gov/blast/Blast.cgi" METHOD=POST>');
    outputWindow.document.write ('<INPUT TYPE=hidden NAME=QUERY VALUE="' + output + '">');
    outputWindow.document.write ('<INPUT TYPE=hidden NAME=CMD VALUE="Put">');

    if (type == 'dna') {
        outputWindow.document.write ('<INPUT TYPE=hidden NAME=PROGRAM VALUE="blastn">');
    } else {
        outputWindow.document.write ('<INPUT TYPE=hidden NAME=PROGRAM VALUE="blastp">');
    }

    outputWindow.document.write ('<INPUT TYPE=hidden NAME=DATABASE VALUE="nr">');
    outputWindow.document.write ('<INPUT TYPE=hidden NAME=LAYOUT VALUE="TwoWindows">');
    outputWindow.document.write ('<INPUT TYPE=hidden NAME=AUTO_FORMAT VALUE="Fullauto">');
    outputWindow.document.write ('<INPUT TYPE=hidden NAME=SHOW_OVERVIEW VALUE="yes">');
    outputWindow.document.write ('<INPUT TYPE=hidden NAME=CDD_SEARCH VALUE="on">');
    outputWindow.document.write ('<INPUT TYPE="submit" VALUE="Blast" NAME="BlastButton">');
    outputWindow.document.write ('</FORM>');
    outputWindow.document.write ('</body></html>');
    outputWindow.status = 'Done.';
    outputWindow.document.close();
}

This function creates a pop-up window that contains in a text box the sequence (either dna or protein) of the gene on which the user clicked (the sequence is contained in the variable called output), along with some identifying information and a button to submit the sequence to the BLAST server at the National Institutes of Health.  As written above, it works fine, except that the NIH page loads in the original pop-up window when the user clicks the Blast button.  How can I have clicking the Blast button create a new window which will contain the page from the NIH server?

Thanks for any help...

MikeStart Free Trial
[+][-]02.25.2006 at 03:21PM PST, ID: 16047027

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.25.2006 at 03:39PM PST, ID: 16047086

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.25.2006 at 04:55PM PST, ID: 16047366

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.25.2006 at 05:03PM PST, ID: 16047401

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.25.2006 at 05:04PM PST, ID: 16047405

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Tags: window, new, javascript
Sign Up Now!
Solution Provided By: BogoJoker
Participating Experts: 1
Solution Grade: B
 
 
[+][-]03.01.2006 at 01:12PM PST, ID: 16079225

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.01.2006 at 07:07PM PST, ID: 16081603

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44