function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suma GangaSuma Ganga 

Home page component

Hi,

I have a requirement like " i have to show popup window when user clicks on Save Button which is on Standard EDIT Page."
i have created  Home page component, and added below script.. But not able to get the SFDC page ID to home component...
 
           var oformId = document.getElementById("!$Component.editPage"); // Form id
           alert('form id::'+oformId); // displaying NULL.
           var savebutton = document.getElementById("!$Component.topButtonRow"); // TD id
          
           alert('savebutton id::'+savebutton );   // displaying NULL.


Pease help....

-- Suma.
Best Answer chosen by Suma Ganga
Suma GangaSuma Ganga
HI all ...

I have complete this by using Custom LInks...

thanks all.

All Answers

SarfarajSarfaraj
Hi Suma

Try it on document ready,

<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
	$(document).ready(function(){
		var oformId = document.getElementById("editPage");
		alert('form id::'+oformId); 
		var savebutton = document.getElementById("topButtonRow");
		alert('savebutton id::'+savebutton );
	});
</script>


SarfarajSarfaraj
P.S. dont use any inline comment in your code (// will comment all subsequent code).
Suma GangaSuma Ganga
HI all ...

I have complete this by using Custom LInks...

thanks all.
This was selected as the best answer