Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8415337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:25:04+00:00 2026-06-10T01:25:04+00:00

I need to have this logic ( textfield ) (submit button) Person enters a

  • 0

I need to have this logic

( textfield ) (submit button)

Person enters a string of numbers/letters – if its right; a popup window happens showing a pdf. if its wrong validation happens and they are presented with an error message

I have gotten this to work as a DROP DOWN >> to >> PDF POPUP. But that wont work.

Can anyone help me with this — spent way to make hours getting the drop to pop working and need to change directions.

note: needs to work in wordpress page + template.

<form style="float:right;">
<table width="369" border="0" align="center" cellpadding="10" cellspacing="0">
 <tr>
 <td><select name="URL" style="font-size:20px;background:yellow;padding:9px 15px;-webkit-      border-radius: 5px;-moz-border-radius: 5px; background: -webkit-gradient(linear, left top, left 25, from(#FFFFFF), color-stop(4%, #000000), to(#FFFFFF)); background: -moz-linear-gradient(top, #FFFFFF, #000000 1px, #FFFFFF 25px);">
 <option value="">Select your number</option>
 <option value="123.pdf">123</option>
 <option value="456.pdf">456</option>
 </select></td>
 <td><p><input type="button" style="padding:9px 15px; background: #617798; border: 0; font-size: 14px; color: #FFFFFF;-webkit-border-radius: 5px;-moz-border-radius: 5px;!important;"   value="Check Number #" onclick="if (this.form.URL.value) window.open(this.form.URL.value, '_blank','toolbar=0','width=30','height=20');" /><br /></td>
 </tr>
 </table>
 </form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:25:05+00:00Added an answer on June 10, 2026 at 1:25 am

    HTML:

    <form onsubmit="return false;">
        <input type="text"/>
        <input type="submit"/>
    </form>
    ​
    

    Javascript:

    $('form').submit(function() {
        if ($('input[type=text]').val() == "some_pdf.pdf") {
            window.open("http://link_to_some_pdf.com/some_pdf.pdf");
        } else if ($('input[type=text]').val() == "some_other_pdf.pdf") {
            window.open("http://link_to_some_other_pdf.com/some_other_pdf.pdf");
        }  else {
            alert("Not a valid PDF! Try again!");
        }
    });
    

    ​

    jsfiddle: http://jsfiddle.net/vu26C/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this code, and need help with the logic end. I would like
Hi have this URL string which I need to extract possibly using regex but
I have this regex working but now need to allow numbers without the decimal
I have this need to place my app in the share/send context menu so
So I have this need to import (currently) about 15k products. Each product has
I have this unsafe code that I need to make safe so it can
I have this script and need to be able to call the $play variable
We have this current database which we need to replace some tables by anther
I have this link which i need to translate in a php variable. http://www.facebook.com/dialog/apprequests?app_id=346824075388300&to=1149862205&message=Facebook+Dialogs+are+so+easy%21&redirect_uri=http%3A%2F%2Fpenelope-ns.net%2Ffb%2F
I have this application that need to do some things in protected paths (like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.