What sould we do when value are identical ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

What sould we do when value are identical ?

Anthony Laquerre
Hi HtmlUnit guru :-)
I have a question for you :
Here is some sample a one of our Html code.

<TD>
Copy to    <A href="javascript:void(0)" onClick="do_copy();"><IMG src="arrow1.gif" border=0></A><BR>
Copy All   <A href="javascript:void(0)" onClick="do_copyAll();"><IMG src="arrow1.gif" border=0></A><BR>
Remove     <A href="javascript:void(0)" onClick="do_remove();"><IMG src="arrow2.gif" border=0></A><BR>
Remove All <A href="javascript:void(0)" onClick="do_removeAll();"><IMG src="arrow2.gif" border=0></A>
</TD>


I know the code may look weird, but that the we it was done long time ago :-)
My question, Since href are all identical, since img are identical in pair, how can I click on Remove ?

I know maybe I will need to do the html code but just asking :-)

thanks!
anthony




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|

RE: What sould we do when value are identical ?

Ben Kyrlach
Anthony...

I've had the most luck using HTMLUnits XPath support in tricks like this.
Here's a code snippet that "should" be able to get the anchor tag in
question for ya.

**Disclaimer: I suck at programming, so don't expect the code to be pretty.
:)

String expression = "//td[contains(text(), 'Remove')]/a
HtmlUnitXPath xpath = new HtmlUnitXPath(expression);
ArrayList nodes = xpath.selectNodes(your_page_object_here);
ClickableElement e = (ClickableElement) lArray.get(3);
HtmlPage newpage = (HtmlPage)e.click();

I hope that helps some,

Ben Kyrlach -- Operations Intern.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Anthony
Laquerre
Sent: Wednesday, October 19, 2005 10:50 AM
To: [hidden email]
Subject: [Htmlunit-user] What sould we do when value are identical ?


Hi HtmlUnit guru :-)
I have a question for you :
Here is some sample a one of our Html code.

<TD>
Copy to    <A href="javascript:void(0)" onClick="do_copy();"><IMG
src="arrow1.gif" border=0></A><BR>
Copy All   <A href="javascript:void(0)" onClick="do_copyAll();"><IMG
src="arrow1.gif" border=0></A><BR>
Remove     <A href="javascript:void(0)" onClick="do_remove();"><IMG
src="arrow2.gif" border=0></A><BR>
Remove All <A href="javascript:void(0)" onClick="do_removeAll();"><IMG
src="arrow2.gif" border=0></A>
</TD>


I know the code may look weird, but that the we it was done long time ago
:-)
My question, Since href are all identical, since img are identical in pair,
how can I click on Remove ?

I know maybe I will need to do the html code but just asking :-)

thanks!
anthony




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|

Re: What sould we do when value are identical ?

Marc Guillemot
In reply to this post by Anthony Laquerre
If you can modify the html code, just add ids to your links.

Otherwise you can use something like:
page.getDocumentElement().getHtmlElementsByAttribute("a", "onclick",
"do_remove();").get(0)

or use XPath expressions.

Marc.

Anthony Laquerre wrote:

> Hi HtmlUnit guru :-)
> I have a question for you : Here is some sample a one of our Html code.
>
> <TD>
> Copy to    <A href="javascript:void(0)" onClick="do_copy();"><IMG
> src="arrow1.gif" border=0></A><BR>
> Copy All   <A href="javascript:void(0)" onClick="do_copyAll();"><IMG
> src="arrow1.gif" border=0></A><BR>
> Remove     <A href="javascript:void(0)" onClick="do_remove();"><IMG
> src="arrow2.gif" border=0></A><BR>
> Remove All <A href="javascript:void(0)" onClick="do_removeAll();"><IMG
> src="arrow2.gif" border=0></A>
> </TD>
>
>
> I know the code may look weird, but that the we it was done long time
> ago :-)
> My question, Since href are all identical, since img are identical in
> pair, how can I click on Remove ?
>
> I know maybe I will need to do the html code but just asking :-)
>
> thanks!
> anthony
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Htmlunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|

Re: What sould we do when value are identical ?

Anthony Laquerre
In reply to this post by Anthony Laquerre
Hi all,
Just to continue my question.
Why web browser know that if I click on the img inside an anchor, the
onclick on the anchor is fire and not with htmlunit ?

I found a workaround by adding distinct name in the anchor, but still,
it would be great to have the same feature.
thanks

anthony

> Hi HtmlUnit guru :-)
> I have a question for you : Here is some sample a one of our Html code.
>
> <TD>
> Copy to    <A href="javascript:void(0)" onClick="do_copy();"><IMG
> src="arrow1.gif" border=0></A><BR>
> Copy All   <A href="javascript:void(0)" onClick="do_copyAll();"><IMG
> src="arrow1.gif" border=0></A><BR>
> Remove     <A href="javascript:void(0)" onClick="do_remove();"><IMG
> src="arrow2.gif" border=0></A><BR>
> Remove All <A href="javascript:void(0)" onClick="do_removeAll();"><IMG
> src="arrow2.gif" border=0></A>
> </TD>
>
>
> I know the code may look weird, but that the we it was done long time
> ago :-)
> My question, Since href are all identical, since img are identical in
> pair, how can I click on Remove ?
>
> I know maybe I will need to do the html code but just asking :-)
>
> thanks!
> anthony
>
>
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|

RE: Re: What sould we do when value are identical ?

Ben Kyrlach
In reply to this post by Anthony Laquerre
Anthony...

As far as I can tell, it's a bug in HTMLUnit. I've noticed on several
occasionas that events do not properly bubble up. My most common example
would be...

<TR onclick="doSomething()">
  <TD>I really want to DO SOMETHING!</TD>
</TR>

If you use HTMLUnit to retrieve the TD from the HTML code snippet above and
call the click method on it, you get nadda. However, in either of the major
browsers (I.E. or FF), it works exactly like you'd expect it to.

Hope that sheds some light on the subject.

Thanks,

Ben Kyrlach -- Operations Intern.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Anthony
Laquerre
Sent: Wednesday, October 19, 2005 11:34 AM
To: Anthony Laquerre
Cc: [hidden email]
Subject: [Htmlunit-user] Re: What sould we do when value are identical ?


Hi all,
Just to continue my question.
Why web browser know that if I click on the img inside an anchor, the
onclick on the anchor is fire and not with htmlunit ?

I found a workaround by adding distinct name in the anchor, but still,
it would be great to have the same feature.
thanks

anthony

> Hi HtmlUnit guru :-)
> I have a question for you : Here is some sample a one of our Html code.
>
> <TD>
> Copy to    <A href="javascript:void(0)" onClick="do_copy();"><IMG
> src="arrow1.gif" border=0></A><BR>
> Copy All   <A href="javascript:void(0)" onClick="do_copyAll();"><IMG
> src="arrow1.gif" border=0></A><BR>
> Remove     <A href="javascript:void(0)" onClick="do_remove();"><IMG
> src="arrow2.gif" border=0></A><BR>
> Remove All <A href="javascript:void(0)" onClick="do_removeAll();"><IMG
> src="arrow2.gif" border=0></A>
> </TD>
>
>
> I know the code may look weird, but that the we it was done long time
> ago :-)
> My question, Since href are all identical, since img are identical in
> pair, how can I click on Remove ?
>
> I know maybe I will need to do the html code but just asking :-)
>
> thanks!
> anthony
>
>
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|

RE: Re: What sould we do when value are identical ?

Ben Kyrlach
In reply to this post by Anthony Laquerre
Marc...

My memory sucks, but here's what I can dredge up from the unseen depths.

I believe the event continues to bubble until an event handler it encounters
stops it from proceeding futher. I believe (again, this is based on my
memory... which isn't to be trusted) that when an event handler returns
false, that prevents the event from going any further. I believe that the
way the event handlers are registered can change the way that the event
bubbles.

Probably Google is better than my memory though. I'll check when I get back
from lunch.

Thanks,

Ben Kyrlach -- Operations Intern.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Marc
Guillemot
Sent: Wednesday, October 19, 2005 11:57 AM
To: [hidden email]
Subject: Re: [Htmlunit-user] Re: What sould we do when value are
identical?


Quite funny: I've had the same problem for ~ half an hour and seen that
this functionality was missing in htmlunit.

Does someone know when onclick handlers of parent nodes are invoked?
Does the event bubble up to the first handler and stop or are all
handlers invoked. If I correctly remember, it's possible for an handler
to change the way the event is propagated. Correct?

Marc.

Ben Kyrlach wrote:

> Anthony...
>
> As far as I can tell, it's a bug in HTMLUnit. I've noticed on several
> occasionas that events do not properly bubble up. My most common example
> would be...
>
> <TR onclick="doSomething()">
>   <TD>I really want to DO SOMETHING!</TD>
> </TR>
>
> If you use HTMLUnit to retrieve the TD from the HTML code snippet above
and
> call the click method on it, you get nadda. However, in either of the
major

> browsers (I.E. or FF), it works exactly like you'd expect it to.
>
> Hope that sheds some light on the subject.
>
> Thanks,
>
> Ben Kyrlach -- Operations Intern.
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Anthony
> Laquerre
> Sent: Wednesday, October 19, 2005 11:34 AM
> To: Anthony Laquerre
> Cc: [hidden email]
> Subject: [Htmlunit-user] Re: What sould we do when value are identical ?
>
>
> Hi all,
> Just to continue my question.
> Why web browser know that if I click on the img inside an anchor, the
> onclick on the anchor is fire and not with htmlunit ?
>
> I found a workaround by adding distinct name in the anchor, but still,
> it would be great to have the same feature.
> thanks
>
> anthony
>
>
>>Hi HtmlUnit guru :-)
>>I have a question for you : Here is some sample a one of our Html code.
>>
>><TD>
>>Copy to    <A href="javascript:void(0)" onClick="do_copy();"><IMG
>>src="arrow1.gif" border=0></A><BR>
>>Copy All   <A href="javascript:void(0)" onClick="do_copyAll();"><IMG
>>src="arrow1.gif" border=0></A><BR>
>>Remove     <A href="javascript:void(0)" onClick="do_remove();"><IMG
>>src="arrow2.gif" border=0></A><BR>
>>Remove All <A href="javascript:void(0)" onClick="do_removeAll();"><IMG
>>src="arrow2.gif" border=0></A>
>></TD>
>>
>>
>>I know the code may look weird, but that the we it was done long time
>>ago :-)
>>My question, Since href are all identical, since img are identical in
>>pair, how can I click on Remove ?
>>
>>I know maybe I will need to do the html code but just asking :-)
>>
>>thanks!
>>anthony
>>
>>
>>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Htmlunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Htmlunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Re: What sould we do when value are identical?

Marc Guillemot
In reply to this post by Ben Kyrlach
Quite funny: I've had the same problem for ~ half an hour and seen that
this functionality was missing in htmlunit.

Does someone know when onclick handlers of parent nodes are invoked?
Does the event bubble up to the first handler and stop or are all
handlers invoked. If I correctly remember, it's possible for an handler
to change the way the event is propagated. Correct?

Marc.

Ben Kyrlach wrote:

> Anthony...
>
> As far as I can tell, it's a bug in HTMLUnit. I've noticed on several
> occasionas that events do not properly bubble up. My most common example
> would be...
>
> <TR onclick="doSomething()">
>   <TD>I really want to DO SOMETHING!</TD>
> </TR>
>
> If you use HTMLUnit to retrieve the TD from the HTML code snippet above and
> call the click method on it, you get nadda. However, in either of the major
> browsers (I.E. or FF), it works exactly like you'd expect it to.
>
> Hope that sheds some light on the subject.
>
> Thanks,
>
> Ben Kyrlach -- Operations Intern.
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Anthony
> Laquerre
> Sent: Wednesday, October 19, 2005 11:34 AM
> To: Anthony Laquerre
> Cc: [hidden email]
> Subject: [Htmlunit-user] Re: What sould we do when value are identical ?
>
>
> Hi all,
> Just to continue my question.
> Why web browser know that if I click on the img inside an anchor, the
> onclick on the anchor is fire and not with htmlunit ?
>
> I found a workaround by adding distinct name in the anchor, but still,
> it would be great to have the same feature.
> thanks
>
> anthony
>
>
>>Hi HtmlUnit guru :-)
>>I have a question for you : Here is some sample a one of our Html code.
>>
>><TD>
>>Copy to    <A href="javascript:void(0)" onClick="do_copy();"><IMG
>>src="arrow1.gif" border=0></A><BR>
>>Copy All   <A href="javascript:void(0)" onClick="do_copyAll();"><IMG
>>src="arrow1.gif" border=0></A><BR>
>>Remove     <A href="javascript:void(0)" onClick="do_remove();"><IMG
>>src="arrow2.gif" border=0></A><BR>
>>Remove All <A href="javascript:void(0)" onClick="do_removeAll();"><IMG
>>src="arrow2.gif" border=0></A>
>></TD>
>>
>>
>>I know the code may look weird, but that the we it was done long time
>>ago :-)
>>My question, Since href are all identical, since img are identical in
>>pair, how can I click on Remove ?
>>
>>I know maybe I will need to do the html code but just asking :-)
>>
>>thanks!
>>anthony
>>
>>
>>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Htmlunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Htmlunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Re: What sould we do when value are identical ?

Marc Guillemot
In reply to this post by Ben Kyrlach
I guess too that Google would help to find the answer. On the other hand
perhaps a simple minimal implementation would be enough in a first time.

Marc.

Ben Kyrlach wrote:

> Marc...
>
> My memory sucks, but here's what I can dredge up from the unseen depths.
>
> I believe the event continues to bubble until an event handler it encounters
> stops it from proceeding futher. I believe (again, this is based on my
> memory... which isn't to be trusted) that when an event handler returns
> false, that prevents the event from going any further. I believe that the
> way the event handlers are registered can change the way that the event
> bubbles.
>
> Probably Google is better than my memory though. I'll check when I get back
> from lunch.
>
> Thanks,
>
> Ben Kyrlach -- Operations Intern.
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Marc
> Guillemot
> Sent: Wednesday, October 19, 2005 11:57 AM
> To: [hidden email]
> Subject: Re: [Htmlunit-user] Re: What sould we do when value are
> identical?
>
>
> Quite funny: I've had the same problem for ~ half an hour and seen that
> this functionality was missing in htmlunit.
>
> Does someone know when onclick handlers of parent nodes are invoked?
> Does the event bubble up to the first handler and stop or are all
> handlers invoked. If I correctly remember, it's possible for an handler
> to change the way the event is propagated. Correct?
>
> Marc.
>
> Ben Kyrlach wrote:
>
>>Anthony...
>>
>>As far as I can tell, it's a bug in HTMLUnit. I've noticed on several
>>occasionas that events do not properly bubble up. My most common example
>>would be...
>>
>><TR onclick="doSomething()">
>>  <TD>I really want to DO SOMETHING!</TD>
>></TR>
>>
>>If you use HTMLUnit to retrieve the TD from the HTML code snippet above
>
> and
>
>>call the click method on it, you get nadda. However, in either of the
>
> major
>
>>browsers (I.E. or FF), it works exactly like you'd expect it to.
>>
>>Hope that sheds some light on the subject.
>>
>>Thanks,
>>
>>Ben Kyrlach -- Operations Intern.
>>
>>-----Original Message-----
>>From: [hidden email]
>>[mailto:[hidden email]]On Behalf Of Anthony
>>Laquerre
>>Sent: Wednesday, October 19, 2005 11:34 AM
>>To: Anthony Laquerre
>>Cc: [hidden email]
>>Subject: [Htmlunit-user] Re: What sould we do when value are identical ?
>>
>>
>>Hi all,
>>Just to continue my question.
>>Why web browser know that if I click on the img inside an anchor, the
>>onclick on the anchor is fire and not with htmlunit ?
>>
>>I found a workaround by adding distinct name in the anchor, but still,
>>it would be great to have the same feature.
>>thanks
>>
>>anthony
>>
>>
>>
>>>Hi HtmlUnit guru :-)
>>>I have a question for you : Here is some sample a one of our Html code.
>>>
>>><TD>
>>>Copy to    <A href="javascript:void(0)" onClick="do_copy();"><IMG
>>>src="arrow1.gif" border=0></A><BR>
>>>Copy All   <A href="javascript:void(0)" onClick="do_copyAll();"><IMG
>>>src="arrow1.gif" border=0></A><BR>
>>>Remove     <A href="javascript:void(0)" onClick="do_remove();"><IMG
>>>src="arrow2.gif" border=0></A><BR>
>>>Remove All <A href="javascript:void(0)" onClick="do_removeAll();"><IMG
>>>src="arrow2.gif" border=0></A>
>>></TD>
>>>
>>>
>>>I know the code may look weird, but that the we it was done long time
>>>ago :-)
>>>My question, Since href are all identical, since img are identical in
>>>pair, how can I click on Remove ?
>>>
>>>I know maybe I will need to do the html code but just asking :-)
>>>
>>>thanks!
>>>anthony
>>>
>>>
>>>
>>
>>
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by:
>>Power Architecture Resource Center: Free content, downloads, discussions,
>>and more. http://solutions.newsforge.com/ibmarch.tmpl
>>_______________________________________________
>>Htmlunit-user mailing list
>>[hidden email]
>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by:
>>Power Architecture Resource Center: Free content, downloads, discussions,
>>and more. http://solutions.newsforge.com/ibmarch.tmpl
>>_______________________________________________
>>Htmlunit-user mailing list
>>[hidden email]
>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Htmlunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Htmlunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|

RE: Re: What sould we do when value are identical ?

Ben Kyrlach
In reply to this post by Anthony Laquerre
Marc...

Here's a website which you might find usefull.

http://www.quirksmode.org/js/events_order.html

Of course, simple and minimal are always nice too... especially since
they'll see release quicker, and take less of your effort.

Anyways, just trying to help.

Ben Kyrlach -- Operations Intern.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Marc
Guillemot
Sent: Wednesday, October 19, 2005 12:10 PM
To: [hidden email]
Subject: Re: [Htmlunit-user] Re: What sould we do when value are
identical ?


I guess too that Google would help to find the answer. On the other hand
perhaps a simple minimal implementation would be enough in a first time.

Marc.

Ben Kyrlach wrote:
> Marc...
>
> My memory sucks, but here's what I can dredge up from the unseen depths.
>
> I believe the event continues to bubble until an event handler it
encounters
> stops it from proceeding futher. I believe (again, this is based on my
> memory... which isn't to be trusted) that when an event handler returns
> false, that prevents the event from going any further. I believe that the
> way the event handlers are registered can change the way that the event
> bubbles.
>
> Probably Google is better than my memory though. I'll check when I get
back

> from lunch.
>
> Thanks,
>
> Ben Kyrlach -- Operations Intern.
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Marc
> Guillemot
> Sent: Wednesday, October 19, 2005 11:57 AM
> To: [hidden email]
> Subject: Re: [Htmlunit-user] Re: What sould we do when value are
> identical?
>
>
> Quite funny: I've had the same problem for ~ half an hour and seen that
> this functionality was missing in htmlunit.
>
> Does someone know when onclick handlers of parent nodes are invoked?
> Does the event bubble up to the first handler and stop or are all
> handlers invoked. If I correctly remember, it's possible for an handler
> to change the way the event is propagated. Correct?
>
> Marc.
>
> Ben Kyrlach wrote:
>
>>Anthony...
>>
>>As far as I can tell, it's a bug in HTMLUnit. I've noticed on several
>>occasionas that events do not properly bubble up. My most common example
>>would be...
>>
>><TR onclick="doSomething()">
>>  <TD>I really want to DO SOMETHING!</TD>
>></TR>
>>
>>If you use HTMLUnit to retrieve the TD from the HTML code snippet above
>
> and
>
>>call the click method on it, you get nadda. However, in either of the
>
> major
>
>>browsers (I.E. or FF), it works exactly like you'd expect it to.
>>
>>Hope that sheds some light on the subject.
>>
>>Thanks,
>>
>>Ben Kyrlach -- Operations Intern.
>>
>>-----Original Message-----
>>From: [hidden email]
>>[mailto:[hidden email]]On Behalf Of Anthony
>>Laquerre
>>Sent: Wednesday, October 19, 2005 11:34 AM
>>To: Anthony Laquerre
>>Cc: [hidden email]
>>Subject: [Htmlunit-user] Re: What sould we do when value are identical ?
>>
>>
>>Hi all,
>>Just to continue my question.
>>Why web browser know that if I click on the img inside an anchor, the
>>onclick on the anchor is fire and not with htmlunit ?
>>
>>I found a workaround by adding distinct name in the anchor, but still,
>>it would be great to have the same feature.
>>thanks
>>
>>anthony
>>
>>
>>
>>>Hi HtmlUnit guru :-)
>>>I have a question for you : Here is some sample a one of our Html code.
>>>
>>><TD>
>>>Copy to    <A href="javascript:void(0)" onClick="do_copy();"><IMG
>>>src="arrow1.gif" border=0></A><BR>
>>>Copy All   <A href="javascript:void(0)" onClick="do_copyAll();"><IMG
>>>src="arrow1.gif" border=0></A><BR>
>>>Remove     <A href="javascript:void(0)" onClick="do_remove();"><IMG
>>>src="arrow2.gif" border=0></A><BR>
>>>Remove All <A href="javascript:void(0)" onClick="do_removeAll();"><IMG
>>>src="arrow2.gif" border=0></A>
>>></TD>
>>>
>>>
>>>I know the code may look weird, but that the we it was done long time
>>>ago :-)
>>>My question, Since href are all identical, since img are identical in
>>>pair, how can I click on Remove ?
>>>
>>>I know maybe I will need to do the html code but just asking :-)
>>>
>>>thanks!
>>>anthony
>>>
>>>
>>>
>>
>>
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by:
>>Power Architecture Resource Center: Free content, downloads, discussions,
>>and more. http://solutions.newsforge.com/ibmarch.tmpl
>>_______________________________________________
>>Htmlunit-user mailing list
>>[hidden email]
>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by:
>>Power Architecture Resource Center: Free content, downloads, discussions,
>>and more. http://solutions.newsforge.com/ibmarch.tmpl
>>_______________________________________________
>>Htmlunit-user mailing list
>>[hidden email]
>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Htmlunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Htmlunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/htmlunit-user
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Re: What sould we do when value are identical?

Marc Guillemot
> Here's a website which you might find usefull.
>
> http://www.quirksmode.org/js/events_order.html

really nice tutorial. Thanks.

Marc.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user