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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:53:18+00:00 2026-06-01T21:53:18+00:00

manifest.json { name: Summer, version: 1.0, manifest_version: 2, description: This is an addition extension,

  • 0

manifest.json

{
  "name": "Summer",
  "version": "1.0",
  "manifest_version": 2,
  "description": "This is an addition extension",
  "browser_action": {
    "default_icon": "icon.png",
    "default_popup": "popup.html"
  }
}

popup.html

<!doctype html>
<html>
  <head>
    <title>Getting Started Extension's Popup</title>

    <!-- JavaScript and HTML must be in separate files for security. -->
    <script src="popup.js"></script>
  </head>
  <body>
        <form name="form">
            <div id="sayi1">Sayı 1 :    <input type = "text" name="deger1"></div> 
            <div id="sayi2">Sayı 2 :    <input type = "text" name="deger2"></div> 
            <div id="sonuc">Sonuç :     <input type = "text" name="cevap"></div>
            <div id="button"><input type="button" value="Hesapla" onclick="hesaplama()" /></div>
        </form>
  </body>
</html>

popup.js

function hesaplama()
{
var sayi1 = window.document.form.deger1.value;
var sayi2 = window.document.form.deger2.value;
var toplam = parseFloat(sayi1) + parseFloat(sayi2) ;
window.document.form.cevap.value = toplam; 
}

When i load this extension, i can see normally. But when i filled the deger1 and deger2 textbox and clicked the button, function is not working, in the sonuc textbox (result textbox) is null.
How can i fix it? I am new at creating chrome extensions. Thanks for your help.

  • 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-01T21:53:20+00:00Added an answer on June 1, 2026 at 9:53 pm

    You’ve got manifest_version : 2 in your manifest, so please go read about the changes it introduces….
    http://code.google.com/chrome/extensions/manifestVersion.html
    You got in the console Refused to execute inline event handler because of Content-Security-Policy, because of the onclick event handler in your html (<input type="button" value="Hesapla" onclick="hesaplama()" />). With manifest version 2 this isnt allowed, you need to attach the event listner from your js code and not in the html.
    Here’s a working version of your code….
    popup.html

    <!doctype html>
    <html>
      <head>
        <title>Getting Started Extension's Popup</title>
    
        <!-- JavaScript and HTML must be in separate files for security. -->
        <script src="popup.js"></script>
      </head>
      <body>
            <form name="form">
                <div id="sayi1">Sayı 1 :    <input type = "text" name="deger1"></div> 
                <div id="sayi2">Sayı 2 :    <input type = "text" name="deger2"></div> 
                <div id="sonuc">Sonuç :     <input type = "text" name="cevap"></div>
                <div id="button"><input type="button" value="Hesapla" /></div>
            </form>
      </body>
    </html>
    

    popup.js

    function hesaplama()
    {
    var sayı1 = window.document.form.deger1.value;
    var sayı2 = window.document.form.deger2.value;
    var toplam = (parseFloat(sayı1) + parseFloat(sayı2)) ;
    window.document.form.cevap.value = toplam;
    }
    window.onload = function(){
        document.querySelector('input[value="Hesapla"]').onclick=hesaplama;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Manifiest.json { "name":"MyExtension", "version":"1.0", "description":"MyExtension Description.", "icons":{"128":"browseraction.png"}, "browser_action": { "default_icon":"icon.png", "default":"Mi default title", "popup":"popup.html"
I have problems in chrome-extension API (chrome.webrequest). My manifest.json { name: tesst, version: 1.0,
I have a manifest.json file that looks like this: { name: Zend Debugger Extension,
Here is my manifest JSON: { name: Name of addon, version: 1.0.0, description: Description,
In Chrome extension you take care for the short description in the manifest.json itself
Manifest: Manifest-Version: 1.0 Bundle-Name: Mahjong Bundle-Activator: MahjongActivator Bundle-SymbolicName: Mahjong Bundle-Version: 1.0.0 Import-Package: org.osgi.framework Compiling
Here I am working with chrome extension development. my manifest.json page as show {
Is there any way to get remote JS file to chrome extension? My manifest.json
The following manifest is added to my .exe.: <?xml version=1.0 encoding=UTF-8 standalone=yes?> <assembly xmlns=urn:schemas-microsoft-com:asm.v1
I have 3 gits wrapped by a manifest file (this manifest file is in

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.