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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:13:16+00:00 2026-06-12T00:13:16+00:00

i have this markup <select id=helpamount name=helpamount><?= get_texto_clave(‘amount’)?> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option>

  • 0

i have this markup

<select id="helpamount" name="helpamount"><?= get_texto_clave('amount')?>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
    <option value="-1" class="convertoinput">more</option>
</select>

and this code to try to convert it to an input

$('body').on('click','.convertoinput',function(){
    $(this).parent().after('<input type="number" id="'+$(this).parent().attr('id')+'" name="'+$(this).parent().attr('id')+'" value="" placeholder="Especifica un valor numerico" /> ');
    $(this).parent().remove();
});

Any idea why this is only working in firefox?

  • 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-12T00:13:18+00:00Added an answer on June 12, 2026 at 12:13 am

    Cross browser ->

    $('body').on('change','#helpamount',function(){
        if($(this).val() == -1){
            $(this).after('<input type="number" id="'+$(this).prop('id')+'" name="'+$(this).prop('id')+'" value="" placeholder="Especifica un valor numerico" /> ');
            $(this).remove();
        }
        $('body').off('change', '#helpamount');
    });​
    

    jsFiddle example.

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

Sidebar

Related Questions

I have this markup <form name=sortbyformtop> <select onchange=location.href=sortbyformtop.sortbyselecttop.options[selectedIndex].value id=sortbyselecttop> <option value=/Search></option> <option value=/Search?sortby=accommodationtype>Accommodation type</option>
I have the following markup: <select style=display:none> <option value='1'>1</option> <option vlaue='2'>2</option> </select> <input type=text
I have some markup like this: <div class=field> <div class=selector id=uniform-blablabla> [select tag markup]
I have this markup one of my web pages, <div class=radio-spoof> <input type=radio name=enquiry
I have the following markup: <select onchange=jsFunction()> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option> </select>
I have this markup: <ul><li id=link-notifications> <ul class=list-notifications style=display:none> <li><a href=/link/to>Item 1</a></li> </ul> </li>
I have this markup: <div id=slider1> <div class=ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all> <a style=left:
Suppose I have this html markup: <div id=wrapper> <pre class=highlight> $(function(){ // hide all
I have this markup (removed all unneccesary info) <li> <a></a> <strong class=listingAmount>1</strong> <strong class=listingPrice>10</strong>
I have some message elements like this... <span class=error message>Whoops! Don't forget your name.</span>

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.