Variable substitution of URLs in the form form of DWZ

Source: Internet
Author: User
Tags add time

The address format of the action in form form "__url__/edit/{xxx}", "xxx" in curly braces is the variable name, and the main function is to use it together with the table component.

The deletion, editing, and modification of passwords are replaced with URL variables:

Delete, edit, modify password using the variable {sid_user}, especially note that the variable named format, must start with "Sid_" , so the background can be directly in the variable "Sid" receive.

<tbody> <tr target= "Sid_user" rel= "<%= value%>" >

When a row is selected, the Rel value on the TR is automatically replaced with the URL variable.

code example:

1 <aclass= "Delete"href= "__url__/foreverdelete/{sid_user}"Target= "Ajaxtodo"title= "Are you sure you want to delete it?" "warn= "Please select User"><span>Delete</span></a>2 3 <aclass= "Edit"href= "__url__/edit/{sid_user}"Target= "Dialog"Mask= "true"warn= "Please select User"><span>Edit</span></a>4 5 <aclass= "icon"href= "__url__/password/{sid_user}"Target= "Dialog"Mask= "true"warn= "Please select User"><span>Change Password</span></a>6 7 <Tableclass= "List"width= "100%"Layouth= "The ">8     <thead>9     <TR>Ten         <thwidth= "$">Number</th> One         <thwidth= "+">User name</th> A         <th>Nickname</th> -         <th>Email</th> -         <thwidth= "+">Add Time</th> the         <thwidth= "+">Last Login</th> -         <thwidth= "a">Number of Logins</th> -         <thwidth= "a">State</th> -     </TR> +     </thead> -     <tbody> +     <volistID= "Vo"name= "List"> A         <TRTarget= "Sid_user"rel= "<%= ID%>"> at             <TD><%=ID%></TD> -             <TD><%= Account%></TD> -             <TD><%=Nickname%></TD> -             <TD><%=Email%></TD> -             <TD><%=create_time%></td> -             <TD><%=last_login_time%></td> in             <TD><%=Login_count%></TD> -             <TD><%=Status%></td> to         </TR> +     </volist> -     </tbody> the </Table>

Note: The URL variable name {sid_user} and TR's target="Sid_user" remain consistent.

In the recent work process, found a bug, I wrote the form form of the action "action= ' # '", through the JS event to change the action value, but if you do not select the list item directly click on the new or delete button, the page does not normally prompt "Please select information" prompt, But directly in the pop-up layer to load the home page, and then through the leadership of the guidance to find that is because I wrote the cause of the action; later, in order to ensure that JS dynamically change the action address while implementing the function of pop-up reminders, I will default to the action value of "action={sid_ User} "format, which finally implements the requirements in advance.

Variable substitution of URLs in the form form of DWZ

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.