i have 3 tabs at top of page i.e
home | profile | +
now i want that user can create their own custom page while click the (+) icon/button...!! how can i do that with php ajax
One way may be like this:
1: When + link is clicked, you prompt the user for entering title of the page to be created.
2: User enters page name; request goes to a php script via ajax
3: PHP scripts creates a page in db with submitted title.
4: With ajax response; you redirect user to new created page and edit it.
There can be many solutions to that though.
Related
I have website build from another programming on laravel
Website contain one page + registration form + admin control panel
When user registration on form record save and I can browse form admin side
But when I try edit the record and save give me this error
BadMethodCallException
Method Illuminate\Validation\Validator::validate/^[19][09]*$/ does not exist.
https://maysoor.sa/admin/driver/17
Bad Method Call
Did you mean Illuminate\Validation\Validator::validate() ?
// Path of page
Illuminate\Validation\Validator::__call
vendor/laravel/framework/src/Illuminate/Validation/Validator.php:1292
1292 ==> throw new BadMethodCallException(sprintf(
error image
I have a form to update user information including username. on the same page, there is a sidebar that has a profile button href="{{route('profile',auth()->user())}}"
once the form is saved I redirect to the same page, the route to update user info is
Route::post('/profile/{user:name}/update' , 'ProfileController#update')->name('update-profile');
so it contains the name ( not the id).
the issue is when the page is redirected back to the same page the profile button is still containing the old user name, which leads to 404. Is there any solution to redirect back and updating the auth user in the sidebar with a new username?
Thank you
That's strange it should normally work. You can do
\Auth::setUser($newUser);
to set a new one.
I have a AjaxFallbackLink to add a product into the wishlist of a customer. When a guest clicks the Link he is redirected to the login page with a RestartResponseAtInterceptPage. After successful login he returned to the first Page. But the URL contains the IBehaviorListener of my "add to wishlist" Link and every Ajax Link does nothing except to reload the page with no changes. I think the problem is the incorrect match of Page instance and BehaviorListener instance because my Page started with instance 1 and returned with instance 4 from Login Page. Everything works when the guest is already logged in.
How can i remove the illegal URL parameter or call the right Link callback to add the product to wishlist after successful login?
I think you need to do the following, in YourApplication#init() add:
getPageSettings().setCallListenerInterfaceAfterExpiry(true)
You can override it per Page if you don't want to enable it globally, see org.apache.wicket.Component#canCallListenerInterfaceAfterExpiry()
I am building a wordpress site with this requirement: when the user attempts to navigate to certain pages, they will be forced to fill out a small form (enter their email address) before they can get to the desired page.
On a standalone site, I'd do it like this: on each "protected" page, I'd look for a cookie named "email". If this cookie doesn't exist, redirect to an email capture page, along with a url parameter indicating the page to go to after they enter their email. The email form would call a PHP script that would set the "email" cookie, then redirect to the desired page
How to do this in wordpress? Would I create my cookie testing code in a template and assign that to the protected pages?
Create a template and page for your php code and when user try to navigate to protected pages check for cookie if doesnt exist go to email page (instead it would be fine if the form appears in a pop up window).There when you get the email onsubmit use ajax to go create cookie from php page and once the cookie is set the navigation should take place .you should create a template for the php page ,and give the page id in ajax code
I hope this is what u r looking for.
**I have a modal window that displays a list of my groups that I create, I want by clicking on the name of the group modal window closes and redirects to the group profile is made
here is the link line
echo $this->htmlLink($link, $group->getTitle());
$link is a static link like domaine/group/4
thank you**
You can do it using javascript:
parent.Smoothbox.close();
and then redirect using javascript (with parent which means change location property of the parent window).