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
DaniHellDaniHell 

How can I call / open another visualforce page. Open in the same Frame

Hello,

I want to open another visualforce page ("test") with the following tag.

How can I call that?

 

<li><a href="test"style="font-size: 18px;">Text</a></li>

Best Answer chosen by Admin (Salesforce Developers) 
Srinath TeramSrinath Teram

Hi,

 

As far as I understand, you might want to try something like this:

In VF Page:

<apex:commandLink value'"Text" action="{!testing} />

In the controller:

public pagereference testing() {

Page.test; //Call the 'test' page you already have in your org.

OR

PageReference testpage = new PageReference('/' + page.id);

testpage.setRedirect(true);

return testpage;

}

 

Hope this helps.

All Answers

Srinath TeramSrinath Teram

Hi,

 

As far as I understand, you might want to try something like this:

In VF Page:

<apex:commandLink value'"Text" action="{!testing} />

In the controller:

public pagereference testing() {

Page.test; //Call the 'test' page you already have in your org.

OR

PageReference testpage = new PageReference('/' + page.id);

testpage.setRedirect(true);

return testpage;

}

 

Hope this helps.

This was selected as the best answer
DaniHellDaniHell

But it possible that it looks like the normal Button with the apex commandlink?

 

<a href="#" data-role="button"><apex:form><apex:commandLink value="Textsdads" action="{!testing}"/>

</apex:form>

</a>

 

It looks different to the normal button. Any suggestion?