BullGuard Antivirus Sale - 60% Off with openElement !
Forum Home Forum Home >

openElement

> openElement General Discussion
  New Posts New Posts RSS Feed - Problem Setting FTP Address as Button Link
  FAQ FAQ  Forum Search   Register Register  Login Login

Problem Setting FTP Address as Button Link

 Post Reply Post Reply
Author
Message
davidjacob1985 View Drop Down
Newbie
Newbie
Avatar

Joined: Apr 03 2017
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote davidjacob1985 Quote  Post ReplyReply Direct Link To This Post Topic: Problem Setting FTP Address as Button Link
    Posted: Jun 21 2017 at 6:30pm
I'm having trouble creating a button that links to my FTP file server. The link window in OE won't let me use an FTP, only HTTP, etc. Is there any easy way around this? Any help with this would be greatly appreciated.

I've been trying to use javascript to change the attributes of the button, but I'm also not having any luck with that. In my below code the button is set to link to www.google.com in OE and I'm trying to change that to 192.168.0.1 using javascript.

Here is the HTML for the button:
<div id="WE3d5cca77b4" class="BaseDiv RNone OEWELinkButton OESK_WELinkButton_fffdda74" style="z-index:1016" onclick="return OE.Navigate.blank(event,'http://www.google.com')">
      <div class="OESZ OESZ_DivLeft1 OESZG_WE3d5cca77b4"></div>
      <div class="OESZ OESZ_DivLeft2 OESZG_WE3d5cca77b4"></div>
      <div class="OESZ OESZ_DivLeft3 OESZG_WE3d5cca77b4"></div>
      <div class="OESZ OESZ_DivLeft4 OESZG_WE3d5cca77b4"></div>
      <div class="OESZ OESZ_DivContent OESZG_WE3d5cca77b4">
       <a class="OESZ OESZ_Text OESZG_WE3d5cca77b4 ContentBox" href="http://www.google.com">Vehicle Maintenance Request Form<br /></a>
      </div>
      <div class="OESZ OESZ_DivRight1 OESZG_WE3d5cca77b4"></div>
      <div class="OESZ OESZ_DivRight2 OESZG_WE3d5cca77b4"></div>
      <div class="OESZ OESZ_DivRight3 OESZG_WE3d5cca77b4"></div>
      <div class="OESZ OESZ_DivRight4 OESZG_WE3d5cca77b4"></div>
     </div>

And here is my end-of-body script:
function changeftplink() {
     document.getElementById('WE3d5cca77b4').setAttribute("onclick", "return OE.Navigate.blank(event,'ftp://192.168.0.1')");
     document.getElementsByClassName('OESZ OESZ_Text OESZG_WE3d5cca77b4 ContentBox')[0].setAttribute("href", "ftp://192.168.0.1");
}

Edited by davidjacob1985 - Jun 21 2017 at 6:34pm
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Jun 25 2017 at 10:22am
Hi,

At the bottom of the link configuration form, choose LOCAL instead of HTTP on the left of the URL field.
Back to Top
davidjacob1985 View Drop Down
Newbie
Newbie
Avatar

Joined: Apr 03 2017
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote davidjacob1985 Quote  Post ReplyReply Direct Link To This Post Posted: Jun 26 2017 at 5:43pm
Hi Dmit,

Thank you for your response. When I use Local the two forward slashes are removed from the resulting HTML. So when I type in "ftp://192.168.0.1" I get "ftp:192.168.0.1" and the resulting link doesn't work.
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Jun 26 2017 at 9:13pm
Look at the very bottom of the link configuration form. You may see that the slashes are still present. I've made a test, and I managed to type this URL and make it stay in the resulting code.

Alternatively, use a Code Block Visual with something like this inside:

<a href="ftp://192.168.0.1">My FTP</a>
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.