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 6470375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:06:14+00:00 2026-05-25T06:06:14+00:00

I have a website where people post links from Google+. I am trying to

  • 0

I have a website where people post links from Google+. I am trying to make sure that people can only post specific links from Google plus. An example would be, someone would need to post a link like
https://plus.google.com/games/907809777960/params/%22%7B%5C%22encPrms%5C%22%3A%5C%22eyJiYXBpVGlja2V0SWQiOiI4MzFhNGQ0Ny0yYTU4LTQ2OTktYmI1Yy1hN2ExYTAzY2U4ZTMiLCJsYW5kaW5nUGFnZSI6Im5ld3NmZWVkL2JvbnVzYWJsZUZlZWQvbWFydmVsY29tcGxldGUvNTQ3Mjc3LzEzMTQ0NzA0MjUvMCIsInJlZl9pZCI6IjEwOTkyODAzNzUzNzQ2Mjk5NzAxMCIsInRyYWNrIjoibmV3c2ZlZWQtYm9udXNfbWFydmVsQ29tcGxldGUtMCIsInNlbmRfdGltZXN0YW1wIjoiMTMxNDQ3MDQyNyJ9%5C%22%7D%22/source/3.
I want to make sure that the link starts with or at least contains https://plus.google.com/games/907809777960/params/, if not, it will not submit the link and alert that the link is invalid. The code I have so far is.

<script type="text/javascript" language="JavaScript"> 
function checkForm(theForm) {
if (form.bonuslink.indexOf("https://plus.google.com/games/907809777960/params/") == -1)
    { alert('You can only enter authentic Google + links'); return false; }             
else { 
return true; }
}
</script>
<form action="submitbonus.php" onsubmit="return checkForm(this);" method="post">
 Bonus Link: <input name="bonuslink" type="text" size="40" />  <input name="Submit" type="submit" value="Submit Bonus" /><br />
</form>

I cannot get it to work for some reason. It submits every time regardless of what it typed. I am not that familiar with javascript, so any help would be appreciated.

  • 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-05-25T06:06:15+00:00Added an answer on May 25, 2026 at 6:06 am

    edit edit: you have two problems you need to reference the bonuslink value not the DOM element itself and you need to call it as a member of the ‘theForm’ instead of ‘form’ since that is what you called the parameter. Other than that everything should be fine.

    <script type="text/javascript" language="JavaScript"> 
    function checkForm(theForm) {
        if (theForm.bonuslink.value.indexOf("https://plus.google.com/games/907809777960/params/") == -1){ 
            alert('You can only enter authentic Google + links'); 
            return false; 
        } else { 
            return true;
        }
    }
    </script>
    <form action="submitbonus.php" onsubmit="return checkForm(this);" method="post">
     Bonus Link: <input name="bonuslink" type="text" size="40" />  <input name="Submit" type="submit" value="Submit Bonus" /><br />
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my website I have tags that people can use to post on my
I have a website that allows people to post things. When they post, it
I have a picture sharing website that when people post a picture, it updates
I have a website that allows people to post events and it automatically posts
I have a website where people can upload documents, and view them later at
I have an website where people can place a vote like this: http://mysite.com/vote/25 This
I have an ecommerce website that works in a classical way: people sign up,
I have a niche website that needs to allow users to post events and
So, I'm making a website similar to FML and others, where people can post
I have a website where people can contact each other, and quite often people

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.