Fork me on GitHub

#1 2015-08-13 16:01:40

Wolfy
Member
Registered: 2015-05-12
Posts: 313

Quote of the Day

Just before my internet connection crapped out for the third night in a row, I got inspired and repaired the memory leak in 'Quote of the Day'.  Then I noticed that it opened its links in a new browser window.  The app.eyecode loads the following html file from /extern/apps/QoTD/ into eyeIframize.

http://pastebin.com/V7c92Q71

The html file returns with 'quotebr.js'. The java script file always contains a link which shows up in the app's frame. Can we modify this html file to send the link to eyeNav or eyeIframize,  or do we need to go back to eyecode and fix it there? I've never used "base target" before.


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#2 2015-09-01 14:00:00

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: Quote of the Day

You need to create an event in events.eyecode:

function APPNAME_on_Open($params = null) {
	proc('launch', array('eyeNav', 'http://URL'));
}

Now you can call that event using JavaScript:

$on = 'sendMsg(' . strval($checknum) . ', "Open"); return false;';

Do not forget to make the global checknum variable available locally before that line!

global $checknum;

Best regards,
Lars Knickrehm

The oneye project.

Offline

Board footer

Powered by FluxBB