Bug Tracker


Ticket #4007 (closed bug: invalid)

Opened 5 years ago

Last modified 2 years ago

replaceWith error

Reported by: jmtoporek Owned by:
Priority: major Milestone: 1.2.1
Component: unfiled Version: 1.2.1
Keywords: Cc:
Blocking: Blocked by:


I wrote a javascript function to validate phone numbers, and included it in a simple HTML file so numbers can be submitted through a text field, then used jquery to print on the same page the results of the validation.

I used replaceWith() in the function to print the results. However after the first click the function no longer worked. When I changed the replaceWith statement with 2 jquery calls, an empty() & append(), numbers could be submitted repeatedly. That would lead me to believe the replaceWith is causing some kind of problem.


test_number.html Download (1.1 KB) - added by jmtoporek 5 years ago.
the file where I discovered this issue

Change History

Changed 5 years ago by jmtoporek

the file where I discovered this issue

comment:1 Changed 5 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

The replaceWith method *replaces* the error div, which is why it only works for one click. That's working as documented.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.


Add a comment

Modify Ticket

as closed

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.