Jump to content

Javascript Function Parameter return VOID


lilmer

Recommended Posts

Good day, I've got a problem getting the value of the parameter on a function

I've got this code to append on my div

$(' .'+type).append('
<a href="#"  id="'+type+'-'+desId+'" class="admin-managers">
     <span class="admin-managers" id="'+name+'">'+name+'</span>
     <span id="'+desId+'" onclick="remove('+type+','+desId+')" class="remove" name="<?php echo $type; ?>"></span></a>
');

that is how I append the data and it is working fine,

 

But on the "remove(type,desId)" function on:

function remove(type,id){
   Alert(type); 
}

the id is working fine, but on the type everytime I alert it it return "javascript:void(0)">

 

What is that happening,? ?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.