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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:52:39+00:00 2026-05-26T04:52:39+00:00

I am using the web2py ajax function, like this: In index.html {{=INPUT(_name=’total_buy’, _onkeyup= ajax(‘key’,[‘total_buy’],

  • 0

I am using the web2py ajax function, like this:

In index.html

{{=INPUT(_name='total_buy', _onkeyup=
  "ajax('key',['total_buy'], ':eval')")}}

<div id="target"></div>

and in default.py

def key():
return "jQuery('#target').html('%s');" % repr(float(request.vars.total_buy))

This works perfectly. When a number is typed into the input field, it is immediatly echoed to the target div.

However, when I copy this to another page it stops working. I do not see the input number being echoed.

For example, I move the code from index.html to plan.html and leave everything else untouched, I continue to see the echo in the index page, but not in the new plan page.

Taking a look at the server log, I see this:

127.0.0.1, 2011-10-15 13:55:50, POST, /medaim/default/key, HTTP/1.1, 200, 0.047000
127.0.0.1, 2011-10-15 13:55:52, POST, /medaim/default/key, HTTP/1.1, 200, 0.047000
127.0.0.1, 2011-10-15 13:55:52, POST, /medaim/default/key, HTTP/1.1, 200, 0.078000
127.0.0.1, 2011-10-15 13:55:59, GET, /medaim/default/plan/1, HTTP/1.1, 200, 0.094000
127.0.0.1, 2011-10-15 13:56:01, POST, /medaim/default/plan/key, HTTP/1.1, 500, 0.250000
127.0.0.1, 2011-10-15 13:56:01, POST, /medaim/default/plan/key, HTTP/1.1, 500, 0.218000
127.0.0.1, 2011-10-15 13:56:02, POST, /medaim/default/plan/key, HTTP/1.1, 500, 0.265000

It seems like, from the plan page, it is calling /medaim/default/plan/key rather than /medaim/default/key

How do I deal with this?

  • 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-26T04:52:40+00:00Added an answer on May 26, 2026 at 4:52 am

    Try

    {{=INPUT(_name='total_buy', _onkeyup=
        "ajax('%s', ['total_buy'], ':eval')" % URL('default', 'key'))}}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Flex 3, I would like to take an image snapshot such as this:
I am using $.ajax function to send json data to serverside function. var jsonObjects
I am using web2py to write a search engine like app. Is it possible
It looks like using CouchDB with the standard web2py DAL is still a ways
I've got an Apache2/web2py server running using the wsgi handler functionality. Within one of
using (var file_stream = File.Create(users.xml)) { var serializer = new XmlSerializer(typeof(PasswordManager)); serializer.Serialize(file_stream, this); file_stream.Close();
Using a restful resource in Rails, I would like to be able to insert
I am building an app using Web2py framework... I don't want to have to
Using Rails 3.2.0 with haml and sass: I Would like to link an external
Is using blueprint with web2py common or recommended? Does blueprint conflict with the default

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.