Skip to main content

Bug Tracker

Side navigation

#6110 closed bug ()

Opened February 17, 2010 10:21AM UTC

Closed November 11, 2010 11:09PM UTC

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>

Attachments (0)
Change History (4)

Changed August 11, 2010 06:29PM UTC by mgailey comment:1

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

Changed August 11, 2010 06:33PM UTC by mgailey comment:2

Replying to [comment:1 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>

Changed October 25, 2010 07:00AM UTC by SlexAxton comment:3

milestone: 1.4.11.5
owner: → 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!

Changed November 11, 2010 11:09PM UTC by trac-o-bot comment:4

status: pendingclosed

Automatically closed due to 14 days of inactivity.