Re: current path

2006-09-11 Thread Alexandre Jaquet

Thanks Jeff for the tips :) it's working fine right now

Jeff Bischoff wrote:
Or you can move that javascript to an actual function, rather than a 
one-liner in the onclick...


This is what I did:
--


function rollover(obj, filename) {
path =  "<%=request.getContextPath()%>";
path = path + filename;
obj.src = path;
obj.alt = path;
}


--
onmouseout="rollover(this, '/pages/images/my_home_button.gif')"
--


for you, this would become something like:
--


function openPage(filePath) {
String path = request.getContextPath();
</pre><tt>String basePath = request.getScheme() + "://" + 
</tt><tt>request.getServerName() + ":" + request.getServerPort() + path + "/";
</tt><pre style="margin: 0em;">
String fullPath = basePath + filePath;
</pre><tt>window.open(fullPath, 'secondefenetre', 
</tt><tt>'width=500,height=500,scrollbars');
</tt><pre style="margin: 0em;">
}


--
onclick="openPage('/core/salesforce/dealerList.jsf')"
--

Of course, you can make the others parameters as well, if they are not 
static.


Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Dennis Byrne wrote:
You can either create a request scoped attribute called basePath in 
the scriptlet or use the JSP EL ${pageContext.request.contextPath} in 
the page.


Dennis Byrne


-Original Message-
From: Alexandre Jaquet [mailto:[EMAIL PROTECTED]
Sent: Friday, September 8, 2006 09:15 AM
To: 'MyFaces Discussion'
Subject: current path

Hi,

I'm trying to put the current path in a component with the following 
code :


<%
   String path = request.getContextPath();
   String basePath = request.getScheme() + "://" + 
request.getServerName() + ":" + request.getServerPort() + path + "/";

%>

onclick="window.open(<%=basePath%>'/core/salesforce/dealerList.jsf', 
'secondefenetre', 'width=500,height=500,scrollbars');">


but basePath is not interpreted html code generated :

a href="#" 
onclick="window.open(<%=basePath%>'/core/salesforce/dealerList.jsf', 
'secondefenetre', 'width=500,height=500,scrollbars')


any idea ?

my best regards















Re: current path

2006-09-08 Thread Jeff Bischoff
Or you can move that javascript to an actual function, rather than a 
one-liner in the onclick...


This is what I did:
--


function rollover(obj, filename) {
path =  "<%=request.getContextPath()%>";
path = path + filename;
obj.src = path;
obj.alt = path;
}


--
onmouseout="rollover(this, '/pages/images/my_home_button.gif')"
--


for you, this would become something like:
--


function openPage(filePath) {
String path = request.getContextPath();
</pre><tt>		String basePath = request.getScheme() + "://" + 
</tt><tt>request.getServerName() + ":" + request.getServerPort() + path + "/";
</tt><pre style="margin: 0em;">
String fullPath = basePath + filePath;
</pre><tt>		window.open(fullPath, 'secondefenetre', 
</tt><tt>'width=500,height=500,scrollbars');
</tt><pre style="margin: 0em;">
}


--
onclick="openPage('/core/salesforce/dealerList.jsf')"
--

Of course, you can make the others parameters as well, if they are not 
static.


Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Dennis Byrne wrote:

You can either create a request scoped attribute called basePath in the 
scriptlet or use the JSP EL ${pageContext.request.contextPath} in the page.

Dennis Byrne


-----Original Message-
From: Alexandre Jaquet [mailto:[EMAIL PROTECTED]
Sent: Friday, September 8, 2006 09:15 AM
To: 'MyFaces Discussion'
Subject: current path

Hi,

I'm trying to put the current path in a component with the following code :

<%
   String path = request.getContextPath();
   String basePath = request.getScheme() + "://" + 
request.getServerName() + ":" + request.getServerPort() + path + "/";

%>

onclick="window.open(<%=basePath%>'/core/salesforce/dealerList.jsf', 
'secondefenetre', 'width=500,height=500,scrollbars');">


but basePath is not interpreted html code generated :

a href="#" 
onclick="window.open(<%=basePath%>'/core/salesforce/dealerList.jsf', 
'secondefenetre', 'width=500,height=500,scrollbars')


any idea ?

my best regards












Re: current path

2006-09-08 Thread Dennis Byrne
You can either create a request scoped attribute called basePath in the 
scriptlet or use the JSP EL ${pageContext.request.contextPath} in the page.

Dennis Byrne

>-Original Message-
>From: Alexandre Jaquet [mailto:[EMAIL PROTECTED]
>Sent: Friday, September 8, 2006 09:15 AM
>To: 'MyFaces Discussion'
>Subject: current path
>
>Hi,
>
>I'm trying to put the current path in a component with the following code :
>
><%
>String path = request.getContextPath();
>String basePath = request.getScheme() + "://" + 
>request.getServerName() + ":" + request.getServerPort() + path + "/";
> %>
>
>onclick="window.open(<%=basePath%>'/core/salesforce/dealerList.jsf', 
>'secondefenetre', 'width=500,height=500,scrollbars');">
>
>but basePath is not interpreted html code generated :
>
>a href="#" 
>onclick="window.open(<%=basePath%>'/core/salesforce/dealerList.jsf', 
>'secondefenetre', 'width=500,height=500,scrollbars')
>
>any idea ?
>
>my best regards
>




current path

2006-09-08 Thread Alexandre Jaquet

Hi,

I'm trying to put the current path in a component with the following code :

<%
   String path = request.getContextPath();
   String basePath = request.getScheme() + "://" + 
request.getServerName() + ":" + request.getServerPort() + path + "/";

%>

onclick="window.open(<%=basePath%>'/core/salesforce/dealerList.jsf', 
'secondefenetre', 'width=500,height=500,scrollbars');">


but basePath is not interpreted html code generated :

a href="#" 
onclick="window.open(<%=basePath%>'/core/salesforce/dealerList.jsf', 
'secondefenetre', 'width=500,height=500,scrollbars')


any idea ?

my best regards