Re: WOImageButton id
Re: WOImageButton id
- Subject: Re: WOImageButton id
- From: "Mr. Pierre Frisch" <email@hidden>
- Date: Tue, 22 Jan 2008 16:06:54 -0800
Thank you
Pierre
--
Pierre Frisch
email@hidden
On Jan 22, 2008, at 15:15, Ian Joyner wrote:
On 22/01/2008, at 6:51 PM, Mr. Pierre Frisch wrote:
This is a bug. Can you file a bug report please.
Thank you
Done. Bug ID# 5700805:
Summary:
HTML element id not settable on WOImageButton in the binding in the
wod file
Steps to Reproduce:
Create a component with a WOImageButton, add id = "something" in the
binding. Our example is:
Search_button: WOImageButton {
id = "btnSearchTab1";
action = session.show_search_panel;
filename = "btn_search.gif";
framework = "app";
onMouseDown = "swap_image ('btnSearchTab1', 'img_search_hi');";
onMouseOut = "swap_image ('btnSearchTab1', 'img_search');";
name = "btnSearchTab1";
title = "Search mode"; vspace = 3;
}
Expected Results:
In the <input> tag in the generated HTML and "id" property should
appear (this is important so you can manipulate it in JavaScript
with document.getElementById).
Actual Results:
<input onmouseout="swap_image ('btnSearchTab1', 'img_search');"
vspace="3" onmousedown="swap_image ('btnSearchTab1',
'img_search_hi');" type="image" name="btnSearchTab1" src="/cgi-bin/
WebObjects/Stream3.woa/_wr_/wodata=/Users/ianjoyner/Development/
WebObjects/Eclipse/Stream3/build/Stream3.woa/Contents/
WebServerResources/btn_search.gif" width="32" height="23" />
no "id" attribute appears.
Regression:
We have this problem in WO 5.4 but have not tested earlier to
determine its presence or absence.
Notes:
Bug submission requested by Pierre Frisch.
Ian
Pierre
--
Pierre Frisch
email@hidden
On Jan 21, 2008, at 21:00, Ian Joyner wrote:
What I am trying to do is have a button show a pressed form when
clicked, and an unpressed form when a user moves the mouse out.
I'm trying to do this by swapping the image 'src' attribute in
JavaScript. However, to get the input field which is generated by
the WOImageButton, I'm using document.getElementById. However,
when I assign an id in the WO binding wod file, it never turns up
in the html. Testing it on a WOImage works just fine as http://en.wikibooks.org/wiki/Programming:WebObjects/Alternative_Technologies/Ruby_on_Rails#Myth
:_You_can.27t_assign_the_name_or_id_value_of_tags_in_WebObjects.
says it will do.
Binding looks like:
Search_button: WOImageButton {
id = "btnSearchTab1";
action = session.show_search_panel;
filename = "btn_search.gif";
framework = "app";
onMouseDown = "swap_image ('btnSearchTab1', 'img_search_hi');";
onMouseOut = "swap_image ('btnSearchTab1', 'img_search');";
name = "btnSearchTab1";
title = "Search mode";
vspace = 3;
}
Is there anyway to get id working?
Does anyone use an alternative method for this?
Thanks
Ian
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden