On Jun 22, 2012, at 7:05 AM, AnichoCode wrote:

> Hello All,
>  
> First time posting on prototypes mailing list please forgive me if I do not 
> provide the right type of information.
>  
> At current I am struggling to get the code below running, it works in 
> jsfiddler using <input and works in other locations of my development build 
> where we use <asp:imagebutton.
>  
> However on this one page it doesn't seem to execute/fire. There is nothing I 
> can see in asp.net c# that will stop the below from running. However there is 
> some javascript that could quite possibly affect it but because of my lack of 
> knowledge in prototype I am struggling to find the answer.
>  
> Thanks for your help in advanced.
>  
> Kind Regards,
>  
> Anis Ahmed Chohan
>  
> My asp/html:
> <div class="submitContainerConfirm" id="submit_Div">
> 
> <asp:PlaceHolder runat="server" id="phContinue">
> 
> <asp:ImageButton CssClass="ShowPleaseWait button" runat="server" 
> ID="ibtnContinue" OnClientClick="return false;" />
> 
> </asp:PlaceHolder>
> 
> </div>
> 

Can you show what this ASP will render into? (View Source and create a static 
HTML version that fails, and post that somewhere.) It's very hard for those of 
us who don't use ASP to translate this into the HTML DOM elements that 
Prototype (and JavaScript) care about.

My eye is drawn to that return false bit above, since I think that's going to 
stop any event from bubbling up, but without seeing how this renders, it's 
impossible to say.

Walter

> 
> I have the below in an external .js file this is what I am trying to run:
> 
> 
> function
> 
> 
> 
> pageLoad() {
> 
> 
> $$(
> 
> 
> ".ShowPleaseWait").each(function (el) {
> 
> 
> el.observe(
> 
> 
> "click", function (event) {
> 
> 
> 
> 
> if (Page_IsValid) {
> 
> 
> el.hide();
> 
> 
> el.insert({ after:
> 
> 
> '<img src="/content/images/processing.gif" /> Please Wait...' });
> 
> 
> alert(
> 
> 
> 'Is Valid');
> 
> 
> }
> 
> 
> alert(
> 
> 
> 'Is not Valid');
> 
> 
> });
> 
> 
> });
> 
> 
> }
> 
>  
> The following is javascript put on the page by other developers in the past:
>  
> <
> 
> 
> 
> script type="text/javascript">
> 
> <!--
> 
> 
> 
> var btnConfirm = $('<%= ibtnContinue.ClientID %>');
> 
> 
> 
> var defaultImage = $('<%= ConfirmImage.ClientID %>');
> 
> 
> 
> var greyImage = $('<%= ConfirmImageGrey.ClientID %>');
> 
> btnConfirm.src = defaultImage.src;
> 
> 
> 
> // When the button needs to be enabled / disabled
> 
> document.observe(
> 
> 
> "rate:changed", function(event) {
> 
> 
> 
> if (!btnConfirm)
> 
> 
> 
> return;
> 
> setTimeout(
> 
> 
> function() {
> 
> btnConfirm.disabled =
> 
> 
> false;
> 
> btnConfirm.src = defaultImage.src;
> 
> btnConfirm.setStyle({ cursor:
> 
> 
> 'pointer' });
> 
> }, 800);
> 
> });
> 
> document.observe(
> 
> 
> "rate:beforeChange", function (event) {
> 
> 
> 
> if (!btnConfirm)
> 
> 
> 
> return;
> 
> 
> 
> //TYM - don't allow the user to click on the grey image
> 
> 
> 
> if (greyImage)
> 
> greyImage.disabled =
> 
> 
> true;
> 
> btnConfirm.disabled =
> 
> 
> true;
> 
> btnConfirm.src = greyImage.src;
> 
> btnConfirm.setStyle({ cursor:
> 
> 
> 'progress' });
> 
> });
> 
> //-->
> 
> </
> 
> 
> 
> script>
> 
> 
>  
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/prototype-scriptaculous/-/aPsACpAYAy4J.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to