[jQuery] Re: Append Area to Map

2007-06-08 Thread Matt Stith

A bit of HTML would help a bit!

On 6/8/07, Jimmy Glass [EMAIL PROTECTED] wrote:


I have been trying to append a freaking Area tag to a MAP tag for about 2
hours now...

The data argument is always a string.

function(data)
{

$('#s7Image').attr('usemap','');

$('#MapContainer').empty();
thisMap = 'MAP
ID=thisMap2 NAME=thisMap2/MAP';


$('#MapContainer').append(thisMap);


$('#thisMap').append(data);


$('#s7Image').attr('usemap','thisMap2');
}

Is there something obvious that I'm missing here? Any thoughts would be
greatly appreciated.

Jimmy G



[jQuery] Re: Append Area to Map

2007-06-08 Thread Erik Beeson

Well, you create a map with ID thisMap2, then you select something with id
thisMap. Also, it may be redundant to change the usemap attribute at the
beginning of the function, but if you are going to do that, you may want to
use $('#s7Image').removeAttr('usemap').

--Erik


On 6/8/07, Jimmy Glass [EMAIL PROTECTED] wrote:


I have been trying to append a freaking Area tag to a MAP tag for about 2
hours now...

The data argument is always a string.

function(data)
{

$('#s7Image').attr('usemap','');

$('#MapContainer').empty();
thisMap = 'MAP
ID=thisMap2 NAME=thisMap2/MAP';


$('#MapContainer').append(thisMap);


$('#thisMap').append(data);


$('#s7Image').attr('usemap','thisMap2');
}

Is there something obvious that I'm missing here? Any thoughts would be
greatly appreciated.

Jimmy G



[jQuery] Re: Append Area to Map

2007-06-08 Thread Jimmy Glass
Absolutely! 

Before:
DIV ID=MapContainer

MAP id=thisMap NAME=thisMap2

/MAP

/DIV

img src=http://sf-ips-01/is/image/DWR/IS_10147; id=s7Image 
USEMAP=thisMap2 /

After: ( I get the Areas as a string)
DIV ID=MapContainer
MAP id=thisMap NAME=thisMap2
area href=javascript:alert(#39;10147#39;); tenabledthis=true 
template=javascript:alert(#39;10147#39;);return false; 
templateenabled=false alt=10147 #45; Chair shape=poly 
coords=192,154,192,352,390,352,390,154
area href=javascript:alert(#39;10148#39;); tenabledthis=true 
template=javascript:alert(#39;10147#39;);return false; 
templateenabled=false alt=10147 #45; Ottoman shape=poly 
coords=0,187,0,386,198,386,198,187
/MAP
/DIV
img src=http://sf-ips-01/is/image/DWR/IS_10147; id=s7Image 
USEMAP=thisMap2 /


From: Matt Stith [EMAIL PROTECTED]
Sent: Friday, June 08, 2007 4:11 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Append Area to Map 

A bit of HTML would help a bit!

On 6/8/07, Jimmy Glass [EMAIL PROTECTED] wrote:
I have been trying to append a freaking Area tag to a MAP tag for about 2 hours 
now... 

The data argument is always a string.

function(data)
{   

$('#s7Image').attr('usemap','');

   $('#MapContainer').empty();
thisMap = 'MAP 
ID=thisMap2 NAME=thisMap2/MAP';


$('#MapContainer').append(thisMap);

   $('#thisMap').append(data);



$('#s7Image').attr('usemap','thisMap2');
}

Is there something obvious that I'm missing here? Any thoughts would be greatly 
appreciated.

Jimmy G




[jQuery] Re: Append Area to Map

2007-06-08 Thread Jimmy Glass
Hi Erik, 
Thanks... Yeah, this is just a typo for the example... In the offending code, 
it is correct... I added the removeAttr per your suggestion... But, the adding 
and remove of this attributes appear to be the problem.

function(data)
{
//$('#s7Image').removeAttr('usemap','');

$('#thisMap2').empty();  // 
Clear Out Areas
thisMap = 'MAP 
ID=thisMap2 NAME=thisMap2/MAP'; // Create New Map
thisArea = 'area 
href=index.html  shape=poly coords=192,154,192,352,390,352,390,154'; // 
Create One Area

$('#MapContainer').append(thisMap); // Append Map To Container


$('#thisMap2').append(thisArea); // Append Area to Map (THIS FAILS).


//$('#s7Image').attr('usemap','thisMap2');
}


From: Erik Beeson [EMAIL PROTECTED]
Sent: Friday, June 08, 2007 4:23 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Append Area to Map 

Well, you create a map with ID thisMap2, then you select something with id 
thisMap. Also, it may be redundant to change the usemap attribute at the 
beginning of the function, but if you are going to do that, you may want to use 
$('#s7Image').removeAttr('usemap').

--Erik

On 6/8/07, Jimmy Glass [EMAIL PROTECTED] wrote:
I have been trying to append a freaking Area tag to a MAP tag for about 2 hours 
now... 

The data argument is always a string.

function(data)
{   

$('#s7Image').attr('usemap','');

   $('#MapContainer').empty();
thisMap = 'MAP 
ID=thisMap2 NAME=thisMap2/MAP';


$('#MapContainer').append(thisMap);

   $('#thisMap').append(data);



$('#s7Image').attr('usemap','thisMap2');
}

Is there something obvious that I'm missing here? Any thoughts would be greatly 
appreciated.

Jimmy G




[jQuery] Re: Append Area to Map

2007-06-08 Thread Daemach

Can you make a test page available?  1.1.2 had a bug that prevented
attaching select tags and colgroup tags which is fixed for 1.1.3 and
it's possible that the map or area tags are also a problem.  The
append mechanism appends the tag to a div as it's building and before
attaching to the final element, so if the area tag is not valid in a
div, the browser probably is not creating it.

Any thoughts Brandon?

On Jun 8, 4:14 pm, Jimmy Glass [EMAIL PROTECTED] wrote:
 Absolutely!

 Before:
 DIV ID=MapContainer

 MAP id=thisMap NAME=thisMap2

 /MAP

 /DIV

 img src=http://sf-ips-01/is/image/DWR/IS_10147; id=s7Image 
 USEMAP=thisMap2 /

 After: ( I get the Areas as a string)
 DIV ID=MapContainer
 MAP id=thisMap NAME=thisMap2
 area href=javascript:alert(#39;10147#39;); tenabledthis=true 
 template=javascript:alert(#39;10147#39;);return false; 
 templateenabled=false alt=10147 #45; Chair shape=poly 
 coords=192,154,192,352,390,352,390,154
 area href=javascript:alert(#39;10148#39;); tenabledthis=true 
 template=javascript:alert(#39;10147#39;);return false; 
 templateenabled=false alt=10147 #45; Ottoman shape=poly 
 coords=0,187,0,386,198,386,198,187
 /MAP
 /DIV
 img src=http://sf-ips-01/is/image/DWR/IS_10147; id=s7Image 
 USEMAP=thisMap2 /

 
 From: Matt Stith [EMAIL PROTECTED]
 Sent: Friday, June 08, 2007 4:11 PM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] Re: Append Area to Map

 A bit of HTML would help a bit!

 On 6/8/07, Jimmy Glass [EMAIL PROTECTED] wrote:
 I have been trying to append a freaking Area tag to a MAP tag for about 2 
 hours now...

 The data argument is always a string.

 function(data)
 {
 
 $('#s7Image').attr('usemap','');

$('#MapContainer').empty();
 thisMap = 'MAP 
 ID=thisMap2 NAME=thisMap2/MAP';

 
 $('#MapContainer').append(thisMap);

$('#thisMap').append(data);

 
 $('#s7Image').attr('usemap','thisMap2');
 }

 Is there something obvious that I'm missing here? Any thoughts would be 
 greatly appreciated.

 Jimmy G



[jQuery] Re: Append Area to Map

2007-06-08 Thread Erik Beeson

Maybe try closing the area tag (either area .../area or area ... /),
or maybe try creating the area tag manually:

var thisArea = document.createElement('area');
thisArea.href = ...;
...
$('#thisMap2').append(thisArea);

--Erik

On 6/8/07, Jimmy Glass [EMAIL PROTECTED] wrote:


Hi Erik,
Thanks... Yeah, this is just a typo for the example... In the offending
code, it is correct... I added the removeAttr per your suggestion... But,
the adding and remove of this attributes appear to be the problem.

function(data)
{
//$('#s7Image').removeAttr('usemap','');


$('#thisMap2').empty();  // Clear Out Areas
thisMap = 'MAP
ID=thisMap2 NAME=thisMap2/MAP'; // Create New Map
thisArea = 'area
href=index.html  shape=poly
coords=192,154,192,352,390,352,390,154'; // Create One Area

$('#MapContainer').append(thisMap); // Append Map To Container


$('#thisMap2').append(thisArea); // Append Area to Map (THIS FAILS).


//$('#s7Image').attr('usemap','thisMap2');
}

--
*From*: Erik Beeson [EMAIL PROTECTED]
*Sent*: Friday, June 08, 2007 4:23 PM
*To*: jquery-en@googlegroups.com
*Subject*: [jQuery] Re: Append Area to Map

Well, you create a map with ID thisMap2, then you select something with id
thisMap. Also, it may be redundant to change the usemap attribute at the
beginning of the function, but if you are going to do that, you may want to
use $('#s7Image').removeAttr('usemap').

--Erik


On 6/8/07, Jimmy Glass [EMAIL PROTECTED] wrote:

 I have been trying to append a freaking Area tag to a MAP tag for about
 2 hours now...

 The data argument is always a string.

 function(data)
 {

 $('#s7Image').attr('usemap','');

 $('#MapContainer').empty();
 thisMap = 'MAP
 ID=thisMap2 NAME=thisMap2/MAP';


 $('#MapContainer').append(thisMap);


 $('#thisMap').append(data);


 $('#s7Image').attr('usemap','thisMap2');
 }

 Is there something obvious that I'm missing here? Any thoughts would be
 greatly appreciated.

 Jimmy G






[jQuery] Re: Append Area to Map

2007-06-08 Thread Jimmy Glass
Hi Daemach, 
I believe you are spot on with your assessment of the issue. Everything worked 
beautifully once I wrapped the AREAs in a MAP tag in the string. This is a 
satisfactory solution for the time being, whens the 1.1.3 release scheduled for 
public release?

Thanks,
Jimmy G


From: Daemach [EMAIL PROTECTED]
Sent: Friday, June 08, 2007 4:35 PM
To: jQuery (English) jquery-en@googlegroups.com
Subject: [jQuery] Re: Append Area to Map 

Can you make a test page available?  1.1.2 had a bug that prevented
attaching select tags and colgroup tags which is fixed for 1.1.3 and
it's possible that the map or area tags are also a problem.  The
append mechanism appends the tag to a div as it's building and before
attaching to the final element, so if the area tag is not valid in a
div, the browser probably is not creating it.

Any thoughts Brandon?

On Jun 8, 4:14 pm, Jimmy Glass  wrote:
 Absolutely!

 Before:
 

 

 

 

 

 After: ( I get the Areas as a string)
 
 
 
 
 
 
 

 
 From: Matt Stith 
 Sent: Friday, June 08, 2007 4:11 PM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] Re: Append Area to Map

 A bit of HTML would help a bit!

 On 6/8/07, Jimmy Glass  wrote:
 I have been trying to append a freaking Area tag to a MAP tag for about 2 
 hours now...

 The data argument is always a string.

 function(data)
 {
 
 $('#s7Image').attr('usemap','');

$('#MapContainer').empty();
 thisMap = '';

 
 $('#MapContainer').append(thisMap);

$('#thisMap').append(data);

 
 $('#s7Image').attr('usemap','thisMap2');
 }

 Is there something obvious that I'm missing here? Any thoughts would be 
 greatly appreciated.

 Jimmy G