Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 10-05-2016, 04:20 AM   #1
saikumar011
Registered User
 
Join Date: Sep 2016
Posts: 51
Lightbulb Ajax - how to identify the target wrapper element

More of a discussion than a technical question really, just wondering what alternative methods are used to identify the target wrapper for an Ajax content request.

At the moment in my simple Ajax framework, I simply update the parentElement.innerHTML. However, I probably need a better way to identify the target element.

The ways I have currently considered:

Duplicate name:
Code:
<div name = "target1">
<div>
<a href=... name="target1" class="AjaxLink">

Ajax wrapper class in parent tree:
Code:
<div class = "AlaxTarget">
<div>
<a href=... class="AjaxLink">

Custom Id attribute:
Code:
<div id = "Target1">
<div>
<a href=... class="AjaxLink" data-target="Target1">

Pass string to relative target object:
Code:
<div class = "AjaxTarget">
<div>
<a href=... class="AjaxLink" target="this.parentElement.parentElement">

Any thoughts, what does everyone else do, are there any standards evolving on how to best identify the target?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
saikumar011 is offline   Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What Means google webmaster Target country vedanta Google 1 06-27-2016 03:54 AM
Identify Business Market nazarseo Search Engine Optimization 1 07-21-2014 10:43 PM
Target type long tail keywords rubberfender Yahoo 0 12-02-2012 07:45 PM
find the right target promotion forum kunxiang Search Engine Optimization 0 11-15-2012 08:46 PM


All times are GMT -7. The time now is 02:58 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.