You need to sign in to do that
Don't have an account?
Maxxum
(URGENT) Maximum size for HTML in S-Control....
One of the S-Controls that I am developing has reached the maximum length limit for the HTML that can be coded as part of S-Control (I get bad data error upon save).
How do you handle large HTMLs as part of an S-Control?
Thanks in advance for your help.
How do you handle large HTMLs as part of an S-Control?
Thanks in advance for your help.
cheers.
Could you please tell me how I can reference the scontrol from the main control?
Hi Maxxum,
First, yes, you can reference other scontrols from an scontrol. You might do this using iframes or just navigating to another scontrol url.
The suggestion for putting as much js in a file is a good one, but I would not put the js in a separate scontrol, but instead into a document or better yet, into the file part of the scontrol.
If I include JS in a separate file and attach it to a S-Control, how can I reference it in my s-control?
Cheers.
for your script tag use:
<script type="text/javascript" src="{!Scontrol_URL}"></script>
Regards.
I must have been having a 'duh' moment. Thanks.
Hello, good morning to all.
annex some the code that I am trying to implement, the code is a SCONTROL which has a file (. js) attached.
It lines her of the body he/she gives problems when calling to the function onload = "initPage (); " that this defined one in the file .js attached, the same as gives problems when calling to the function to Center (); that it is after </ body>
why I can't call functions defined in the.js attached? the error: "an object was expected"
--------- CODE ---------------------
html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>:: FNAC :: Reparaciones - Clientes ::</title>
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js" type="text/javascript"></script>
<script type="text/javascript" src="{!Scontrol_URL}"></script>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" onload="initPage();">
.
.
.
</body>
<script type="text/javascript">
Centrar();
</script>
</html>
--------- CODE ---------------------
I built a file called CodeJs.js with the following code:
<script>
function MessageBox ()
{
alert ("Hello World... ");
}
</ script>
Then buil a SCONTROL and with the siguente code:
<html>
<head>
<put http-equiv = "Content-Type" content = "text/html; charset=windows-1252">
<title>:: FNAC:: Repairs - Clients:: </ title>
<script type = "text/javascript" src="{! Scontrol_URL} "> </ script>
</ head>
<body topmargin = "0" leftmargin = "0" rightmargin = "0" bottommargin = "0" onload = "MessageBox (); ">
Test
</ body>
</ html>
Is it correct?? if it is correct because when loading the page it doesn't show the alert of the function MessageBox ()??
In this case embedded code of file CodeJs.js into SCONTROL works correctly. but i need use CodeJs.js to separate HTML and JS code.
html>
head>
meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
title>:: FNAC :: Reparaciones - Clientes ::</title>
script type="text/javascript" src="{!Scontrol_URL}"></script>
script>
function MessageBox()
{
alert("Hello World...");
}
</script>
</head>
body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" onload="MessageBox();">
Test
</body>
</html>