Insomania February 2016

How to use javascript:void(0) in a form action in Laravel? [Laravel 5.1]

as we all know javascript:void(0) is used to set action as undefined in simple html.
But i need to use same thing in laravel blade as stated below:

{!! Form::open(array('url' => '#', 'class' => 'form-search', 'id'=>'search_form')) !!}

how to set form action as javascript:void(0) in the above code.

Please help me to sort out this issue.

Thanks.

Answers


Jinto Antony February 2016

{!! Form::open(array('url' => '#', 'class' => 'form-search','id'=>'search_form')) !!}  
<!-- Content -->
        <input type="submit" value="Submit" onclick="function()" >
</div>
{!! Form::close() !!}

And In the Function()

javascript:void(0)

Post Status

Asked in February 2016
Viewed 2,505 times
Voted 14
Answered 1 times

Search




Leave an answer