Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
Ğ Groups Home
iphone onclick shading
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Marcus Wu  
View profile  
 More options Nov 25 2007, 5:24 pm
From: "Marcus Wu" <jett...@gmail.com>
Date: Sun, 25 Nov 2007 17:24:29 -0500
Local: Sun, Nov 25 2007 5:24 pm
Subject: iphone onclick shading

I am working on a game using the canvas tag.  I had been planning on using
onclicks to capture events for use in the game.  It works, but not the way I
had planned.  The iPhone's Safari browser shades the clicked item during the
click and unshades it after the click.  It's useful functionality most of
the time so the user knows what control they clicked on the page, but for my
case, it is just annoying.  The entire canvas tag gets shaded and then
unshaded causing a flickering effect in the game.

Does anyone know of a way to turn that off or to avoid it entirely?

I tried adding onclick events to the entire window/document, but that does
not seem to work at all.
Any help/hints would be greatly appreciated.

Thanks,
Marcus Wu


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Randy Walker  
View profile  
 More options Nov 26 2007, 4:36 pm
From: Randy Walker <cleverda...@gmail.com>
Date: Mon, 26 Nov 2007 13:36:00 -0800
Subject: Re: iphone onclick shading

Iıve never heard any mention anywhere of that being controllable.  Itıs been
told to me by apple guys that itıs a built in way to let people know their
taps have been registered.  They obviously didnıt have game UI in mind when
telling people Safari was the sdk.  Feb is coming...
-=R

On 11/25/07 2:24 PM, "Marcus Wu" <jett...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wayne  
View profile  
 More options Nov 26 2007, 8:27 pm
From: wayne <nightli...@omegapoint.com>
Date: Mon, 26 Nov 2007 17:27:11 -0800 (PST)
Local: Mon, Nov 26 2007 8:27 pm
Subject: Re: iphone onclick shading
To disable tap highlight for an element add to its style
the following CSS tag:

    -webkit-tap-highlight-color:rgba(0,0,0,0);


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
anmldr  
View profile  
 More options Nov 30 2007, 4:06 pm
From: anmldr <anm...@bellsouth.net>
Date: Fri, 30 Nov 2007 13:06:41 -0800 (PST)
Local: Fri, Nov 30 2007 4:06 pm
Subject: Re: iphone onclick shading
This is to ask another similar question.

I have a link in each cell of a table.  I would like to highlight the
whole cell rather than just the link.

Is there another webkit call that would do this?

Thank you,
Linda

On Nov 26, 7:27 pm, wayne <nightli...@omegapoint.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
AwayBBL  
View profile  
 More options Dec 1 2007, 3:39 pm
From: AwayBBL <away...@gmail.com>
Date: Sat, 1 Dec 2007 12:39:03 -0800 (PST)
Local: Sat, Dec 1 2007 3:39 pm
Subject: Re: iphone onclick shading
Linda, You could probably do that with an onclick. When someone
clicks, change the bgcolor of the cell.

pseudo code...

function chColor(tdName) {
   document.getElementById(tdName).style.backgroundColor ="white";

}

<table><tr>
<td id="td_1" onclick="chColor('td_1')" >Stuff in the cell</td>
</tr></table>

On Nov 30, 4:06 pm, anmldr <anm...@bellsouth.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RobG  
View profile  
 More options Dec 3 2007, 2:25 am
From: RobG <rg...@iinet.net.au>
Date: Sun, 2 Dec 2007 23:25:30 -0800 (PST)
Local: Mon, Dec 3 2007 2:25 am
Subject: Re: iphone onclick shading

On Dec 2, 6:39 am, AwayBBL <away...@gmail.com> wrote:

> Linda, You could probably do that with an onclick. When someone
> clicks, change the bgcolor of the cell.

> pseudo code...

> function chColor(tdName) {
>    document.getElementById(tdName).style.backgroundColor ="white";

If you pass a reference to the td from the calling handler, your
function becomes:

  function chColor(el) {
    el.style.backgroundColor = 'white';
  }

which is much more efficient than hard-coding the ID value.  Since a
td element can have both a name and an ID, I wouldn't use a variable
that expects to get an ID "tdName".

> }

> <table><tr>
> <td id="td_1" onclick="chColor('td_1')" >Stuff in the cell</td>

And the handler:

  <td onclick="chColor(this);" ...

Another method is to add or remove a class name, that way you can
control display properties independently of your code.

--
Rob


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »