Jump to content

Check if onclick has been clicked


karimali831

Recommended Posts

Yes, it can be done. You do have to save this in a file or database, but here is a method of using global variables to spy on the users:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Save File</title>
<script type="text/javascript">
var store = 'User click on ';

function tattle(stuff){
store += '-'+stuff;
}

function kick(){
document.getElementById('here').innerHTML = store;
}
</script>
  </head>
<body>

<input value="First" type="button" onclick="tattle('getNextParticipants')" />
<input value="Second" type="button" onclick="tattle('second')" />
<input value="Last" type="button" onclick="tattle('getNextUglyFaces')" />

<br /><br /><br />

<input value="Reveal the sneaky stuff" type="button" onclick="kick()" />

<div id="here">sneeky stuff here</div>

</body>
</html>

I'm really sorry if this is off the question but have noticed this is what I no longer require..

 

ok, this <div> tag:

 

<div id="from_0" class="rPosButton '.$active_1_20.'" style="height: 184px;" onclick="getNextParticipants(this);this.blur();" onmouseover="Tip( get_value(\'1 - 20\'),  TEXTALIGN, \'justify\', ABOVE,\'true\',  TEXTALIGN, \'justify\', PADDING,10,  TEXTALIGN, \'justify\', OPACITY,90,  TEXTALIGN, \'justify\', FIX,[300,450],  TEXTALIGN, \'justify\', DELAY,1,  TEXTALIGN, \'justify\' );" onmouseout="UnTip();">

 

will trigger the onclick event:

 

		function getNextParticipants(button){
			from = $(button).id.split('_')[1];
			$('ULLIST_0').innerHTML = $('Loader').innerHTML;
			$$('.PosButtons').each(function(f){
				$(f).select('.active').each(function(e){
					e.removeClassName('active');
				});
			});
			$(button).addClassName('active');

			var listname = 'ranking';
			if(friends){ 			
				var listname = 'friends';
			}

			new Ajax.Updater('ULLIST_0', webRoot + '?site=standings&ladderID=<?php echo $_GET[ladderID]; ?>', {

				method: 'post',
				parameters: {
					listname: listname
				},
				onComplete: function(transport){

					//var bnts = $('RSCROLLBAR').childElements();
					bnts = get_visible_elements($('RSCROLLBAR').childElements());

					for(i=0; i < bnts.length; i++){
						if(bnts[i].id==button.id){
							if(i==0){
								$('ladders_button_up').addClassName('previous_button_disabled');
								if(bnts.length > 1){ 
									$('ladders_button_down').removeClassName('next_button_disabled');
								}else{ 
									$('ladders_button_down').addClassName('next_button_disabled');
								} 
							}else if(i==(bnts.length-1)){ 
								$('ladders_button_up').removeClassName('previous_button_disabled');
								$('ladders_button_down').addClassName('next_button_disabled');
							}else{ 
								$('ladders_button_up').removeClassName('previous_button_disabled');
								$('ladders_button_down').removeClassName('next_button_disabled');
							}
						}
					}
					markMyPosition();
					prepareTooltips();
					ptt_init();
				}
			});
		}

 

in PARENT target, I want it to open in top target.

 

So I tried...

 

new Ajax.Updater('ULLIST_0', top.location = '?site=standings&ladderID=<?php echo $_GET[ladderID]; ?>', {

 

but this will open the page on pageload, without "top.location =" it opens page without pageload but opens in parent instead of top target.

 

I would really appreciate if someone can help me with this...

 

thank you!

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.