A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.
    Bumped by Community user
2 It seems like there is not value in "chatt" and "deploy" variable. However these queries are producing expected results when run in developer console.
source | link

I want to include javascript in my web-to-case from. My sole purpose of doing so is to Query from Salesforce Database in that form. How can I achieve this functionality. Can I use some controller as extension to my Web-to-Case form?

--> alert('dgdgg'); var chatt = sforce.connection.query("SELECT Id FROM LiveChatButton where DeveloperName = 'Chat_Button'") ;

        var deploy = sforce.connection.query("SELECT Id FROM LiveChatDeployment where DeveloperName = 'Customer_Support_Chat'") ;  
    </script>
    <form name="myformMSG" id="myformMSG" hidden="true">
        <label id="prova"></label>
    </form>

    <form id="myform" name="myform" action="https://www.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8"  method="POST">
    <input type="hidden" name="orgid" value="{!$Organization.Id}"/>
    <input type="hidden" name="retURL" value="{!$Site.Domain}{!URLFOR($Page.Thanks)}"/>

I want to include javascript in my web-to-case from. My sole purpose of doing so is to Query from Salesforce Database in that form. How can I achieve this functionality. Can I use some controller as extension to my Web-to-Case form?

I want to include javascript in my web-to-case from. My sole purpose of doing so is to Query from Salesforce Database in that form. How can I achieve this functionality. Can I use some controller as extension to my Web-to-Case form?

--> alert('dgdgg'); var chatt = sforce.connection.query("SELECT Id FROM LiveChatButton where DeveloperName = 'Chat_Button'") ;

        var deploy = sforce.connection.query("SELECT Id FROM LiveChatDeployment where DeveloperName = 'Customer_Support_Chat'") ;  
    </script>
    <form name="myformMSG" id="myformMSG" hidden="true">
        <label id="prova"></label>
    </form>

    <form id="myform" name="myform" action="https://www.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8"  method="POST">
    <input type="hidden" name="orgid" value="{!$Organization.Id}"/>
    <input type="hidden" name="retURL" value="{!$Site.Domain}{!URLFOR($Page.Thanks)}"/>
1
source | link

Javascript in Web-to-Case form

I want to include javascript in my web-to-case from. My sole purpose of doing so is to Query from Salesforce Database in that form. How can I achieve this functionality. Can I use some controller as extension to my Web-to-Case form?