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
PatcsPatcs 

visualforce page with HTML5

Hi 

 

I have a requriment were they need the entrie opportunity page should be designed in HTML5, so we have designed  a opportunity edit  page in HTML5 but we are facing the issue in saving the record. we are not able to get the value which have enterted in HTML input type tag.

 

Please suggest some solution!!!

 

Thanks in advance....

bob_buzzardbob_buzzard

It would probably help to see some code.  If you are trying to use regular HTML inputs in conjunction with an apex:form, then that information won't be posted back to the controller.  If that's not the case, can you post some code?

PatcsPatcs

Hi 

 

This is just a sample code. I have no idea how to achive the given requirement. Please help me...

 

Sample Code:

 

<apex:page doctype="HTML-5.0" standardController="Opportunity">
<html>
<head>
<script type="text/Javascript">
function notEmpty(){
alert("dfsdfsfs");
var myTextField = document.getElementById('txt1');
if(myTextField.value != "")
alert("You entered: " + myTextField.value);
else
alert("Would you please enter some text?");
}

</script>
</head>
<body>
<form>
<table>
<tr>
<td>
Opportunity Name:</td>
<td>
<input id="txt1" type="text"/></td>
</tr>
<tr>
<td>
Amount:</td>
<td>
<input type="Text"/></td>
</tr>
<tr>
<td>
Close Date:</td>
<td>
<input Type="Text"/></td>
</tr>
<tr>
<td>
Type:</td>
<td>
<Input type="Text"/></td>
</tr>
<tr>
<td>
Account Name:</td>
<td>
<Input type="Text"/></td>
</tr>
<tr>
<td>
Stage:</td>
<td>
<Input Type="Text"/></td>
</tr>
<tr>
<td>
Forecast Category:</td>
<td>
<Input Type="text" /></td>
</tr>
<tr>
<Input type="button" value="Click Me" onclick="notEmpty()" />
</tr>
</table>
</form>
</body>
</html>
<apex:form >
<apex:commandbutton value="Save" onclick="notEmpty()" />
</apex:form>
</apex:page>

bob_buzzardbob_buzzard

I'd suggest you take a look at the visualforce introduction wiki page:

 

http://wiki.developerforce.com/page/An_Introduction_to_Visualforce

 

and then have a spin through the quick start information in the visualforce developer's guide.

Chamil MadusankaChamil Madusanka

Refer following link

 

http://blog.edlconsulting.com/salesforce-com/visualforce-html5-template/

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.