Is this possible...

pooffck

New Member
I have a table with several rows, one each for every record in a recordset,<BR>each row has an imagebutton,<BR>each imagebutton is bound to a single event handler that gets passed the<BR>identifier of the record in its row.<BR>if I do this(after setting custom commandname and commandarg):<BR><BR>imagebutton.Command+= new<BR>System.Web.UI.WebControls.CommandEventHandler(myev enthandler);<BR><BR>myeventhandler fires.<BR><BR>No surprises here, everthing works as advertised, event fires,<BR>commandargument is passed.<BR><BR>----------------------------------------------------<BR><BR>In another part of my page (on PageLoad):<BR><BR>I Response.Write a javascript function who's purpose is to update a value in<BR>another window(the opener) wth the<BR><BR>opener.forms[0].myfield.value="blah"<BR><BR>if I do this:<BR><BR>imagebutton.Attributes.Add("OnClick", "javascript:myfunction()");<BR><BR>the javascript fires correctly (assuming I use a literal value for "blah").<BR><BR>Again, no surprises, works as advertised ho hum.<BR><BR>----------------------------------------------------<BR><BR>The Problem:<BR><BR>I need to somehow pass the command argument to the javascript and cause it<BR>to fire.<BR><BR>The Ideal solution would be to have the event fire, thereby writing the<BR>javascript (using the command argument in place of "blah") and then<BR>somehow getting the javascript to fire. So far, I have not been able to<BR>make this work. It seems to be a chicken/egg problem.<BR>
 
Back
Top