Home › Forums › General Questions › Event listener HTML element generated after iframe load
Tagged: Html
- This topic has 24 replies, 5 voices, and was last updated 1 month, 1 week ago by  c4cc. c4cc.
- 
		AuthorPosts
- 
		
			
				
2022-03-06 at 1:14 pm #49952victor.hamel CustomerHello, My interface loads the verge3d iframe when the page loads but I also generate some html elements after user interactions with the page and thus after all the verge3d elements and scripts have already loaded. This means some HTML event listener from the visual logic refer to items generated later on on the page via javascript. When the visual logic is loaded these items do not exist yet. Is there a way to re-assign the visual logic on elements with javascript or any other method after the iframe has already loaded ? Thank you for your help 
 Victor2022-03-07 at 8:09 am #49972 Yuri KovelenovStaff Yuri KovelenovStaffhi, yes, you can enable the event puzzle at any particular moment not just when the Verge3D scene is loaded. To do this, you can put this event puzzle inside a procedure puzzle, and then trigger it from your page via JavaScript 
 https://www.soft8soft.com/docs/manual/en/puzzles/Procedures.html#calling_procedures_javascript2025-09-02 at 4:26 pm #84393 c4ccCustomer c4ccCustomerHi Yuri, What if I want to enable the event puzzle from the html page’s elements the verge3d iframe is in? In my case the html elements are already part of that html page, not generated by verge3d puzzles - 
		This reply was modified 1 month, 4 weeks ago by  c4cc. c4cc.
 FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e 2025-09-05 at 3:18 am #84468 c4ccCustomer c4ccCustomerHi Yuri, speaking of enabling puzzles before Verge3d Scene is loaded, will the exec script puzzles run before the verge3d scene is loaded too? FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e 2025-09-11 at 8:09 am #84574 c4ccCustomer c4ccCustomerhi, yes, you can enable the event puzzle at any particular moment not just when the Verge3D scene is loaded. To do this, you can put this event puzzle inside a procedure puzzle, and then trigger it from your page via JavaScript 
 https://www.soft8soft.com/docs/manual/en/puzzles/Procedures.html#calling_procedures_javascriptI tried, but it doesn’t work when html document’s element is clicked on while verge3d is initialising. Only after does it work. Any way to get Verge3d puzzles, like HTML events to run before app is initialized? - 
		This reply was modified 1 month, 2 weeks ago by  c4cc. c4cc.
 FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e 2025-09-12 at 6:03 am #84602 Alexander KovelenovStaff Alexander KovelenovStaffHi, 
 Unfortunately the variables in the init tab are not shared with main tabs. If you still need to have them assigned, attach them as dictionary keys to the “window” object in the init tab and retrieve from that object in the main tabs. See the example:Init:  
 Main: - 
		This reply was modified 1 month, 2 weeks ago by  Alexander Kovelenov. Alexander Kovelenov.
 2025-09-12 at 7:14 am #84608 c4ccCustomer2025-09-15 at 6:09 pm #84652 c4ccCustomer2025-09-15 at 6:09 pm #84652 c4ccCustomer c4ccCustomerDo i need a “create empty dict” for the Javascript object Windows puzzle? FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e 2025-09-16 at 5:57 am #84653 PandernCustomer PandernCustomerThat “window” object is a nice tip. I have previously used ‘local storage’ to bring values from init tab to main tab. 2025-09-16 at 6:13 am #84654 c4ccCustomer c4ccCustomerJust how do I change puzzle variables’ values using Event listener during app/scene loading? FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e 2025-09-16 at 6:15 am #84655 PandernCustomer PandernCustomerDo i need a “create empty dict” for the Javascript object Windows puzzle? No, the window object exists already, you just add keys and values to it. Just add a ‘print to console’ in main tab to see if it works. 2025-09-16 at 6:24 am #84656 c4ccCustomer c4ccCustomerI tried, but using the event listener for HTML element puzzles before the app initialized did not update my variable values. What did I do wrong here? Event listener won’t change puzzle variables’ values during loading FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e 2025-09-16 at 6:32 am #84657 PandernCustomer PandernCustomerI tried, but using the event listener for HTML element puzzles before the app initialized did not update my variable values. What did I do wrong here? Event listener won’t change puzzle variables’ values during loading When/where is FullScreenstats triggered to run? 2025-09-16 at 6:37 am #84658 c4ccCustomer c4ccCustomerwhenever the main html document’s element for fullscreen is clicked. FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e 2025-09-16 at 6:51 am #84659 PandernCustomer PandernCustomerwhenever the main html document’s element for fullscreen is clicked. No, it won’t be triggered if it is inside a procedure, unless you call it from a javascript in the html document. Is the ID for the button just ‘fullscreen’? And is it in the parent HTML? 
- 
		This reply was modified 1 month, 4 weeks ago by 
- 
		AuthorPosts
- You must be logged in to reply to this topic.





