[CLOSED] Get URL from form to load in new window

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Get URL from form to load in new window

    Hi,

    I'm following the load external website example (http://mvc.ext.net/#/Window_Basic/Lo...ernal_Website/)

    I have it working however want to be able to get the url to load from a textfield entry. Code so far is

       Html.X().TextField().TabIndex(9)
                            .FieldLabel("Website")
                            .Name("Website")
                            .ID("Website")
                                .Width(245)
                            .Padding(5)
                            ,
                            Html.X().Button()
                            .Text("Go")
                            .Icon(Icon.Application)
                            .Handler("App.WebsiteWindow.show(this);")
                            ,
    for the button and form field and

             @(Html.X().Window()
            .ID("WebsiteWindow")
            .Title("Company Website")
            .Width(1000)
            .Height(500)
            .X(200)
            .Y(50)
            .Modal(true)
            .AutoRender(false)
            .Collapsible(true)
            .Maximizable(true)
            .Hidden(true)
            .Loader(Html.X().ComponentLoader()
                        .Url("App.Website.getValue()")
                .Mode(LoadMode.Frame)
                .LoadMask(lm => lm.ShowMask = true)
            )
        )
    for the window, if there is an easier way to gain this functionality without the button I'd be happy to do it that way

    thanks
    Last edited by Daniil; Nov 26, 2014 at 2:47 PM. Reason: [CLOSED]
  2. #2
    Hi @OriCoder,

    Please:

    1. Remove the Url of ComponentLoader
    2. Set .AutoLoad(false) for the ComponentLoader
    3. Set this for the Button:

    .Handler("App.WebsiteWindow.show(); App.WebsiteWindow.load(App.Website.getValue());")
  3. #3
    Works a treat, thanks!

    You can now close off this thread.

Similar Threads

  1. [CLOSED] [2.5.] Web Form expends much time to load
    By FVNoel in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 10, 2014, 8:53 AM
  2. Disable TextField in Form Load
    By fkmbkk in forum 2.x Help
    Replies: 2
    Last Post: Jul 09, 2013, 12:12 AM
  3. [MVC + Razor] How to load data on the form?
    By Natalie in forum 2.x Help
    Replies: 4
    Last Post: Sep 18, 2012, 10:24 AM
  4. [CLOSED] Standard Form Window Instead of Event Edit Window
    By ppqrnd in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 07, 2011, 1:20 AM
  5. Replies: 2
    Last Post: Oct 11, 2011, 1:15 PM

Posting Permissions