We help IT Professionals succeed at work.

Find a javascript function

M256
M256 asked
on
I'm adding a javascript handler for some source code here:
http://site2.cruizr.com/upload.php?ship=Oasis-of-the-Seas&cabin=12351

Click Add Files, add a random image, click Start.

There's a lot of Javascript there but I cannot, for the life of me, find out where to add to the source code.

I've tried inspecting with Firebug.

Please show me where the action part of the javascript is, and tell me how you found it.
Comment
Watch Question

Commented:
Try adding this code and putting what you ant to do inside the click event.  you should be able to add this to the first script file since it looks like you are including jQuery.

#Target being the id of the element you want to add the event to. You may need to ad an ID to the <span> Add Files...

$(document).ready({
     $("#target").click(function() {
              alert("Handler for .click() called.");
     });
});

Open in new window

Author

Commented:
I think that would work for the Add Files button, but the Start button does not exist on document ready.
Multitechnician
SILVER EXPERT
Distinguished Expert 2019
Commented:
if the start button is not present at page load, you may use on or the old live :
http://api.jquery.com/delegate/
http://api.jquery.com/live/

$(".start").click(function() { alert("ok"); });
or (same as) :
$(".start").bind("click", function() { alert("ok"); });
or :
$(".start").live("click", function() { alert("ok"); });
or :
$("body").on("click", ".start", function() { alert("ok"); });

Explore More ContentExplore courses, solutions, and other research materials related to this topic.