Jump to content
php.lv forumi

Recommended Posts

Posted

Jokus pie malas. Viss nopietni -_-

 

Tiek izmantots jQuery.

Javascript:

<script language="javascript">
function jauns_logs(identifikators) {	
$(document).ready(function() { 
       $.blockUI({ 
	message: $('#jaunslogs'),
	 css: { 
               width: '520px', 
		}
	}); 
	$('.close').attr('title','Click to unblock').click($.unblockUI); 
}); 
}
</script>

 

Un diasplayed none div's, kurš pēc <a href="#" onclick="jauns_logs('1');">spied te</a> nospiešanas parādās.

 

<div style="display:none;" id="jaunslogs">

Chau

</div>

 

Kā var pēc tā Chau dabūt identifikatoru?

Es tiešām esmu nūģis javaskriptā.

Posted

identifikatoru kam? div'am? maybe parent? , hmm es nezinu ko es te muldu :D

 

Nu ķipa

echo identifikators, bet es nezinu kā javaskriptā.

Posted

php echo vietā ir js alert(), ja tu to domāji

 

Man nevajag alertus. Es biju domājis tā,ka to identifikatoru, kas tika piešķirts tai 'jauns_logs' funkcijai, viņu itkā echo aiz Chau

 

<div style="display:none;" id="jaunslogs">

Chau [identifikators te]

</div>

Posted (edited)

document.getElementById("jaunslogs").innerHTML += "blabla identifikators";

 

Paldies.Izdevās.

 

Dīvaini, kāpēc man likās, ka jābūt kaut kam līdzīgam echo variable.lol

Edited by who_i_am

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...