Bug Tracker

Opened 10 years ago

Closed 9 years ago

#6110 closed bug

jQuery.get() doesn't transport form-elements in firefox

Reported by: janbuecker Owned by: janbuecker
Priority: low Milestone: 1.5
Component: ajax Version: 1.4.1
Keywords: get firefox form "missing elements" Cc:
Blocked by: Blocking:

Description

Using jQuery.get() does not transport form-elements in firefox

call: $.get('/content/ajax.php', { action: 'myAction' }, function (data) { $('#myDiv').html(data); });

expected data:

<div class="myclass">

<form name="myform" method="post" action="">

...some elements..

</form>

</div>

received data:

<div class="myclass">

...some elements..

</div>

if i place a <form></form> before the <form>-tag, the <div>-container disappears - so the data looks like:

sent:

<div class="myclass">

<form></form> <form name="myform"...>

..some elements..

</form>

</div>

recieved data:

<div class="myclass"></div>

<form name="myform"...>

..some elements..

</form>

</div>

Change History (4)

comment:1 Changed 9 years ago by mgailey

I have the same issue, but it is a POST instead of a GET. When the div's html is set, the form tag is removed completely from the resultant html

comment:2 in reply to:  1 Changed 9 years ago by mgailey

Replying to mgailey:

I have the same issue, but it is a POST instead of a GET. When the div's html is set, the form tag is removed completely from the resultant html

Workaround: If you place the real form inside another tag such as span and then before the real form place an empty form tag, like so:

<div> <span> <form /> <form action="" method="post"> </form> </span> </div>

then the desired result will be rendered:

<div> <form action="" method="post"> </form> </div>

comment:3 Changed 9 years ago by SlexAxton

Milestone: 1.4.11.5
Owner: set to janbuecker
Priority: low
Status: newpending

Can you provide a live test case of this occuring on jsFiddle so we can more accurately test the problem? Thanks!

comment:4 Changed 9 years ago by trac-o-bot

Status: pendingclosed

Automatically closed due to 14 days of inactivity.

Note: See TracTickets for help on using tickets.