Skip to main content

Bug Tracker

Side navigation

#15237 closed bug (duplicate)

Opened September 10, 2014 10:51AM UTC

Closed October 16, 2014 07:39PM UTC

jQuery.load() remove ajax:select tag of AjaxTag Library

Reported by: jitujain Owned by:
Priority: high Milestone: None
Component: unfiled Version: 1.11.1
Keywords: Cc:
Blocked by: Blocking:
Description

I am using jQuery.load() function to load the content in Div dynamically. It is working fine with all the scenario but there is one issue in it.

When I include ajax:select tag of AjaxTag Library version 1.5.7 for populating dependent dropdown in my JSP page, jQuery.load() function remove ajax:select tag from my loaded JSP page.

I am stuck since last many day on these issue. Early Response to problem will be great.

Note: ajax:select is converted in tag when loaded as HTML in normal scenario.

Code Block :

container.jsp (main jsp in which dynamic content will be loaded on onload event of page)

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN"

"http:www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<%@page language="java" contentType="text/html; charset=ISO-8859-1"

pageEncoding="ISO-8859-1"%>

<%@taglib uri="http://ajaxtags.sourceforge.net/tags/ajaxtags"

prefix="ajax"%>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></meta>

<link type="text/css" rel="stylesheet" href="css/ajaxtags.css"></link>

<title>AJAX JSP Tag Library Examples</title>

<script type="text/javascript" src="ajaxtags/js/prototype-1.7.js"></script>

<script type="text/javascript" src="ajaxtags/js/scriptaculous/scriptaculous.js"></script>

<script type="text/javascript" src="ajaxtags/js/overlibmws/overlibmws.js"></script>

<script type="text/javascript" src="ajaxtags/js/ajaxtags.js"></script>

<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script>

</head>

<body>

<div id="header">AJAX JSP Tag Library Examples</div>

<div id="pageContent">

</div>

</body>

<script type="text/javascript">

function updateContainer( url , formData, divID ) {

var dynamicCon = '#'+divID;

var ObjTag = $( dynamicCon );

ObjTag.load( url , formData );

}

updateContainer("/dropdown.jsp","","pageContent");

</script>

</html>

dropdown.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://ajaxtags.sourceforge.net/tags/ajaxtags" prefix="ajax"%>

<form action="." class="basicForm">

<fieldset><legend>Choose Your Car</legend>

<div><img id="makerEmblem" src="img0/placeholder.gif" width="76" height="29" /></div>

<label for="make">Make:</label> <select id="make">

<option value="">Select make</option>

<option value="Ford">Ford</option>

<option value="Honda">Honda</option>

<option value="Mazda">Mazda</option>

</select> <span id="progressMsg" class="indicator" style="display: none;">Loading...</span>

<label for="model">Model:</label> <select id="model" disabled="disabled">

<option value="">Select model</option>

</select></fieldset>

</form>

<ajax:select baseUrl="dropdown.view" source="make" target="model"

parameters="make={make}" preFunction="initProgress"

emptyOptionName="Select model" postFunction=""

errorFunction="" />

Attachments (0)
Change History (1)

Changed October 16, 2014 07:39PM UTC by dmethvin comment:1

resolution: → duplicate
status: newclosed

Duplicate of #15236.