Mark,

If you want to load the page with the data pre-rendered in a hidden
modal that pops up, you just need to make sure that your modal html is
in the page, and your link/button associated with it points to the right
element ID.

If you want to load the page not knowing what the form will be like or
what data will be in it until the user does something, then my best
recommendation to you is to provide a way to get that data from your
server using an XmlHTTPRequest in javascript, and populate your modal
form using javascript instead.

Most frontend MVC frameworks (e.g., AngularJS, Ember, etc.) make this
pretty easy to do.

-Ian

On 09/11/15 09:35, D Mark Weiss wrote:
> I am using bootstrap.
>
> I understand I can define a modal in the HTML and have it open on top of
> the page. For instance to enter a new student.
>
> Those are static fields.
>
>
> But suppose I want to edit a student record and instead of going to a
> new page, I just want to open a model dialog on top of the page?
>
> In this case, I can�t use the pre-loaded html on the page, but need to
> do a search and from that search open the model and fill the fields with
> the data I intend to edit.
>
> This example is exactly what i want to do
> http://formvalidation.io/examples/loading-saving-data-modal/
>
> It�s like when clicking a link. I want to execute a query, put the
> results in a variable and then open the dialog loading the information
> in the variables.
>
> So like select name from students where rowid=456.
>
> <@assign user$name �<@col1>�>
>
> Open model dialog and
>
> <form>
> <input type=text name=�name� value=�@@user$name�>
> <INPUT TYPE=SUBMIT NAME="Submit" VALUE="Submit">
>
>
> </form>
>
> I guess the question is how do I open a model dialog in bootstrap that
> contains dynamic data according to the link selected.
>
> Thanks
>
> Mark
>
>
>
> ------------------------------------------------------------------------
> To unsubscribe from this list, please send an email to
> [email protected] <mailto:[email protected]> with
> "unsubscribe terascript-talk" in the body.



----------------------------------------

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.

Reply via email to