• Vickal Gupta
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hello
I have like this in my visualforce page
<apex:page controller="somename">

<apex:form>
<apex:inputHiddenField value="{!firstname}" id="hiddenfield">
<apex:inputText value="{!firstName}" id="fname" onchange="GetFirstName(this);"  />

<apex:commandButton value="Save" action="{!SaveChanges}"/>
</apex:form>
<script type="text/javascript">
  function GetFirstName(data)
  {
      var hiddenvalue=document.getElementByID('data').value;
      alert(hiddenfield);  // am getting the correct value in alert
 }
</script>
</apex:page>
Now what I require is to have value of javascript variable(hiddenvalue) in my apex controller.
I want to do some action when I click the button so inside button code I need to have the value of javascript variable.
I hope I am clear.
without using action function or apex:param is there a way to do this?

pls let me know, urgent.

thanks
krishna
Hi,
scenario is I created a button ,
on click of button I need to open VF page along with parameters
if I hard code url in button for community users not working
bcz of  community name in not there URL
is this any way to form URL dynamically

I tried URLFOR in Formula
{!URLFOR($Page.ProcurementDetailsPage, null, [Id=SomeId])}
I am getting Error Page.ProcurementDetailsPage does not Exist
Can any one help on this


Thanks,
raghu