S
Sudrien
I'm trying to make a bookmarklet/favlet thing that saves my bookmarks
remotely.
How it is supposed to work:
1. user clicks link on their toolbar.
2. javascript from my site loads, creating a lightbox-like prompt for
URL and title.
3. User hit form button to submit.
4. Ligthbox gives confimation message, then dissapears a few seconds
later
Part 4 is the problem. The confirmation comes up, but I keep on
recieving security errors (in firefox) from my remote script when I
try and see if the submission was a success.
the remote script is somthing like this:
=====
var body = document.getElementsByTagName('body')[0];
iframeDiv = document.createElement('div');
iframeDiv.style.position = "absolute";
iframeDiv.style.top = "0";
iframeDiv.style.left = "0";
iframeDiv.style.width = "100%";
iframeDiv.style.height = "100%";
iframeDiv.style.background = "#000";
iframeDiv.style.MozOpacity= "0.6";
iframe = document.createElement('iframe');
iframe.style.position = "absolute";
iframe.style.top = "50%";
iframe.style.left = "50%";
iframe.style.width = "300px";
iframe.style.height = "150px";
iframe.style.background = "#fff";
iframe.style.margin = "-75px 0 0 -150px";
iframe.style.MozOpacity= "1.0";
iframe.id = 'makeMarkIframe';
iframe.name = 'makeMarkIframe';
iframe.src = 'http://thirdleft.org/submit.php?url=' +
encodeURIComponent(document.URL) + '&title=' +
encodeURIComponent(document.title);
/*iframe.onload = function() { console.log(frames['makeMarkIframe']);}
*/
iframeDiv.appendChild(iframe);
body.appendChild(iframeDiv);
=====
iframe.onload triggers correctly - whenever the iframe loads a page -
but there doesn't seem to be anything I can test on the submissions
success without security issues (url parameters of the iframe are what
I've been trying for).
I already tried XMLHTTPRequest - the warnings just come faster there.
Ideas?
-Sud.
remotely.
How it is supposed to work:
1. user clicks link on their toolbar.
2. javascript from my site loads, creating a lightbox-like prompt for
URL and title.
3. User hit form button to submit.
4. Ligthbox gives confimation message, then dissapears a few seconds
later
Part 4 is the problem. The confirmation comes up, but I keep on
recieving security errors (in firefox) from my remote script when I
try and see if the submission was a success.
the remote script is somthing like this:
=====
var body = document.getElementsByTagName('body')[0];
iframeDiv = document.createElement('div');
iframeDiv.style.position = "absolute";
iframeDiv.style.top = "0";
iframeDiv.style.left = "0";
iframeDiv.style.width = "100%";
iframeDiv.style.height = "100%";
iframeDiv.style.background = "#000";
iframeDiv.style.MozOpacity= "0.6";
iframe = document.createElement('iframe');
iframe.style.position = "absolute";
iframe.style.top = "50%";
iframe.style.left = "50%";
iframe.style.width = "300px";
iframe.style.height = "150px";
iframe.style.background = "#fff";
iframe.style.margin = "-75px 0 0 -150px";
iframe.style.MozOpacity= "1.0";
iframe.id = 'makeMarkIframe';
iframe.name = 'makeMarkIframe';
iframe.src = 'http://thirdleft.org/submit.php?url=' +
encodeURIComponent(document.URL) + '&title=' +
encodeURIComponent(document.title);
/*iframe.onload = function() { console.log(frames['makeMarkIframe']);}
*/
iframeDiv.appendChild(iframe);
body.appendChild(iframeDiv);
=====
iframe.onload triggers correctly - whenever the iframe loads a page -
but there doesn't seem to be anything I can test on the submissions
success without security issues (url parameters of the iframe are what
I've been trying for).
I already tried XMLHTTPRequest - the warnings just come faster there.
Ideas?
-Sud.