Jump to content

Search the Community

Showing results for tags 'tuniurlframe'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 7 results

  1. How to know that a unigui session started inside a tuniurlframe was closed ? I would like to know when it was closed to hide the tunitabsheet where the uniframe is located...
  2. Hi, I cannot figure out how to fire the OnAjaxEvent from JS-code within the loaded page. ajaxRequest can be called with "parent.ajaxRequest", but I cannot determine the first parameter "sender" I tried: - parent.ajaxRequest(this, "ClickEvent", [ "param0=a", "param1=b" ]); - parent.ajaxRequest(O3C, "ClickEvent", [ "param0=a", "param1=b" ]); // where "O3C" is the JS-name of the UniURLFrame (added via code on startup) - tried to get a reference to the UniURLFrame-control with: - var x = parent.getElementById("O3C"); // x is null - var x = parent.getElementById("O3C_id"); // x is null nothing works. Can anybody help please? best regards steve
  3. Hi, I'm trying to set up a TUniURLFrame (or TUniHTMLFrame perhaps) to allow me to basically do a POST to a specific URL, with specified form parameters, the key being that both the URL and the form (Post body) parameters are to be specified by the UniGUI application state and not necessarily entered by the user. That is to say, we thereby deliver a seamless integration with an external site within a UniGUI URLFrame (and within a browser IFrame.) There are obviously several ways to approach this, from the very dynamic (creating a form element at runtime to post with) or using JQuery Ajax call (say), to the more static option of creating a form in the HTML body and then doing the required URL and form parameter modifications in (say) the JS submit() event or the JS document.ready() event. Now from a simple web page I've managed to do this already, with HTML page as follows: <!doctype html> <html> <head> <meta charset="utf-8" /> <title>Gateway page</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> <script type="text/javascript"> $(document).ready( function () { var reference = ""; //329039512 var token = ""; //"0025215009068098f6b58417eaa9c325aa235cda7eda09e8e89490f" $("#gateway").val(token); $("#reference").val(reference); if (token != "") { $("#gateway").hide(); $("#lblgateway").hide(); } else { $("#gateway").show(); $("#lblgateway").show(); }; if (reference != "" && token != "") { $("#sub").hide(); $("form#portal").submit(); } else { $("#sub").show(); } $("form#portal").submit( function (e) { if ($("#reference").val() == "") { alert("You must supply the reference to view."); return false; } if ($("#gateway").val() == "") { alert("You must supply the token to authorize viewing."); return false; } $("#portal").attr("action", "https://some.site.com/gateway?reference="+$("#reference").val()); } ); } ); </script> </head> <body> <div id="lblreference">Reference to view:</div> <input type="text" name="reference" id="reference" value="" /> <div> <form id="portal" method="post" name="portal"> <div id="lblgateway">Access token:</div><input type="text" name="gateway" id="gateway" value=""></input> <input type="submit" name="sub" id="sub" value="submit" /> </form> </div> </body> </html> When you view this page in a browser it will determine what values are set and then automatically submit the page (e.g. via POST), updating the reference URL parameter as relevant (the "action") and setting the token value in the form parameters, thus performing a POST to the specified URL with the required URL and form param. (If the specified/hard coded values are left blank then it will wait for you to enter them manually and wait for you to click submit before performing the same.) This is great, however I'm trying to achieve the same in a seamless manner from a UniURLFrame and having trouble doing so. The goal is for the UniGUI application to supply the reference and access token (which it will obtain/calculate) and have the UniGUI frame then comply with the remote portal's API which (as above) demands that the reference parameter is passed via URL query string and the access token be passed via form parameter using a POST operation. Things I've tried: I've tried wholesale replacing the HTML of the UniURLFrame with the values embedded, using UniURLFrame.HTML.Clear() followed by UniURLFrame.HTML.Add() calls to essentially put the above HTML with the required valued in the HMTL. This fails and somehow ends up showing our UniGUI application login form in the UniURLFrame?!? Ive also tried setting the HTML as one big string (e.g. assigning to HTML.Text). This at least displays the form in the frame, but the document.ready() code does not fire and so the form parameter (token) and reference is empty. Moreover like before clicking submit results in the UniGUI login form appearing?! I've further tried various permutations of UniURLFrame.JSInterface.JSAdd() and UniURLFrame.JSInterface.JSCall, but couldn't figure out how and when these are supposed to be used. I've also tried these in UniURLFrame "OnFrameLoaded()" event handler but this never triggered(???) so I gave up on that. Ideally I'd like to set up the "static" content in the TUniURLFrame's HTML and then simply issue a call to a predefined JS method to achieve the setting and POSTing of the reference and the token (for example, see here or here). UniURLFrame.JSInterface.JSCall would seem like this should be the way to do this but as I say I've not been able to make this work. Nor have I been able to figure out how to do the "usual" UniSessoin.AddJS() way with the UniURLFrame as target instead. It's rather unobvious how these components are to be used and more generally how to interface between UniGUI server side and the JS in the browser. Some examples and documentation would be highly helpful. (I did check the demos as well but did not spot anything close to what I'm trying to do, apologies if I've missed something relevant!) Edit: To add, simply pasting the HTML code above into the HTML text (at design time) of the UniURLFrame, and then manually typing the reference and token parameters into the page and clicking submit works entirely as expected (apart from the fact that it's then a manual process which is precisely what I'm trying to avoid.) So my question is basically, how do I hook into this page and change the reference and token value from within the UniGUI application, such that the page code runs and seamlessly fetches the requested page without requiring the user to enter anything? Edit2: I've now tried modifying the HTML to insert the reference and token via string substitution and replacing the HTML.Text. This results in the URLFrame showing the application's login form in the frame again. I get the impression this is because I'm trying to submit the form from within the document.ready() code? I'll try to avoid doing this, but if not in the document ready, how do I trigger the submit from the UniURLFrame? Help?! Walter
  4. Hi, I'm trying the URLFrame demo (and in our own application) where trying to fetch (for example) www.google.co.uk results in failure and the following error in the browser console: From what I've read ideally this restriction should be removed at the server end. But what if this is not an option? Is there any way to avoid this problem from the UniGUI side? Thanks in advance, Walter
  5. hi, how can i load picture into TUniURLFrame? I tried next those two dont work URLViewer.HTML.Add('<img src="/cache/Workflow_exe/'+ CacheFolder + '/' + Node.Text +'?fake='+ DateTimeToStr(Now) + '" style="width:100%;height:100%">') //DONT WORK URLViewer.HTML.Add('<iframe style="width:100%;height:100%;border:none;background-repeat:no-repeat;background-sizecontain;background-image:url(/cache/Workflow_exe/'+ CacheFolder + '/' + Node.Text +'?fake='+ DateTimeToStr(Now) +'");"></iframe>') //DONT WORK This one is working but sizes of picture are two big. scrollers appear. URLViewer.URL:= '/cache/Workflow_exe/' + CacheFolder + '/' + Node.Text +'?fake=' + DateTimeToStr(Now);
  6. My app runs as exe or service. I try to show all the content of UniServerModule.FilesFolderURL in a TUniURLFrame: myURLFrame.URL := ExcludeTrailingPathDelimiter( UniSession.URL ) + UniServerModule.FilesFolderURL ; In other words, i try to show http://localhost:8077/files/in the browser. I always get a "Invalid Session or Session timeout". It is possible to set "Directory listing" on for this directory. In general, how to set a directory for simple directory listing in UniServer? example: http://localhost:8077/myOwnDirectory/
  7. I need automatically fill in web forms, fill in the fields, perform the functions of the buttons, logging in automatically on a page. must also read the result of a form. In Delphi i use the TWebBrowser that does the job perfectly. I'm having trouble using the TUniURLFrame. someone help me, or know if it is possible to do this with TUniURLFrame? In Delphi with TWebBrowser works well: sample: PROCEDURE TForm1.Button1Click(Sender: TObject); VAR Doc3: IHTMLDocument3; BEGIN WebBrowser1.Navigate('https://pt-br.facebook.com/'); Doc3 := Webbrowser1.Document AS IHTMLDocument3; Doc3.getElementById('email').setAttribute('value', 'neto@hotmail.com', 0); Doc3.getElementById('pass').setAttribute('value', 'pAsswOrd', 0); WebBrowser1.OleObject.Document.all.Item('loginbutton', 0).click; WebBrowser1.Silent; END; Anyone have any idea how to do this UniGUI?
×
×
  • Create New...